diff --git a/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/Adapter/TimelineAdapter.java b/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/Adapter/TimelineAdapter.java index 787a10f..0cd685a 100644 --- a/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/Adapter/TimelineAdapter.java +++ b/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/Adapter/TimelineAdapter.java @@ -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); diff --git a/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/fragment/DetailFragment.java b/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/fragment/DetailFragment.java index 1c7d4bf..846d5f3 100644 --- a/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/fragment/DetailFragment.java +++ b/app/src/main/java/jagsc/jp/abc2019Sconferenceapp/fragment/DetailFragment.java @@ -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) { @@ -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); diff --git a/docs/time-table.json b/docs/time-table.json index c3d2524..8bdcf33 100644 --- a/docs/time-table.json +++ b/docs/time-table.json @@ -214,6 +214,7 @@ ] }, { + "itemID": "0017", "title": "準天頂衛星受信機の動向について", "body": "衛星測位受信機の市場は、従来マルチ GNSS 搬送波受信機とコード受信機に大別、前者は主 に測量分野で利用され、後者は小型端末(最近では時計、IoT 端末等)に搭載される傾向がある。 近年、自動走行車への衛星測位機能搭載トレンドが出始め、また、農機等で搬送波受信機を使っ たRTK測位の利用が活発になってきた。現在、これらの動きに対応し安価で小型の受信機開 発の動きが顕在化しつつある。本報告では、最近の受信機動向と今後のトレンドについて述べ る。", "presenterNames": [