Skip to content

Commit

Permalink
Merge pull request #22 from prprhyt/master
Browse files Browse the repository at this point in the history
fix: #20
  • Loading branch information
zyundamochi080 authored May 24, 2019
2 parents ba11dd4 + 4ba3009 commit 743ebb9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void onClick(View v) {
public void onClick(View v) {
if(fragmentManager != null) {
Bundle bundle = new Bundle();
bundle.putInt("position", position);
bundle.putString("itemID", itemList.getItemID());
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
// BackStackを設定
fragmentTransaction.addToBackStack(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,20 @@
import androidx.recyclerview.widget.RecyclerView;

public class DetailFragment extends Fragment {
private int position;
private String itemID;


private TimelineDataBean.TimelineData getTimelineDataFromItemID(String itemID){
for(TimelineDataBean.TimelineData d:MainActivity.timelineData.getData()){
if(null==d || null==d.getItemID()){
continue;
}
if(d.getItemID().equals(itemID)){
return d;
}
}
return null;
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Expand All @@ -28,11 +41,14 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

Bundle bundle = getArguments();
if (bundle != null) {
position = bundle.getInt("position");
itemID = bundle.getString("itemID");
}

if (MainActivity.timelineData != null) {
final TimelineDataBean.TimelineData timelineData = MainActivity.timelineData.getData().get(position);
final TimelineDataBean.TimelineData timelineData = getTimelineDataFromItemID(itemID);
if(null==timelineData){
return v;
}
RecyclerView detailRecyclerView = v.findViewById(R.id.presenterRecyclerView);
DetailAdapter detailAdapter = new DetailAdapter(timelineData, getFragmentManager(), this);

Expand Down
1 change: 1 addition & 0 deletions docs/time-table.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
]
},
{
"itemID": "0017",
"title": "準天頂衛星受信機の動向について",
"body": "衛星測位受信機の市場は、従来マルチ GNSS 搬送波受信機とコード受信機に大別、前者は主 に測量分野で利用され、後者は小型端末(最近では時計、IoT 端末等)に搭載される傾向がある。 近年、自動走行車への衛星測位機能搭載トレンドが出始め、また、農機等で搬送波受信機を使っ たRTK測位の利用が活発になってきた。現在、これらの動きに対応し安価で小型の受信機開 発の動きが顕在化しつつある。本報告では、最近の受信機動向と今後のトレンドについて述べ る。",
"presenterNames": [
Expand Down

0 comments on commit 743ebb9

Please sign in to comment.