Changeset View
Changeset View
Standalone View
Standalone View
app/src/main/java/it/reyboz/bustorino/ActivityExperiments.java
Show All 26 Lines | |||||
public class ActivityExperiments extends GeneralActivity implements CommonFragmentListener { | public class ActivityExperiments extends GeneralActivity implements CommonFragmentListener { | ||||
final static String DEBUG_TAG = "ExperimentsActivity"; | final static String DEBUG_TAG = "ExperimentsActivity"; | ||||
@Override | @Override | ||||
protected void onCreate(Bundle savedInstanceState) { | protected void onCreate(Bundle savedInstanceState) { | ||||
super.onCreate(savedInstanceState); | super.onCreate(savedInstanceState); | ||||
setContentView(R.layout.activity_experiments); | setContentView(R.layout.activity_container_fragment); | ||||
ActionBar actionBar = getSupportActionBar(); | ActionBar actionBar = getSupportActionBar(); | ||||
if (actionBar != null) { | if (actionBar != null) { | ||||
actionBar.setDisplayHomeAsUpEnabled(false); | actionBar.setDisplayHomeAsUpEnabled(false); | ||||
actionBar.setIcon(R.drawable.ic_launcher); | actionBar.setIcon(R.drawable.ic_launcher); | ||||
} | } | ||||
if (savedInstanceState==null) { | if (savedInstanceState==null) { | ||||
getSupportFragmentManager().beginTransaction() | getSupportFragmentManager().beginTransaction() | ||||
.setReorderingAllowed(true) | .setReorderingAllowed(true) | ||||
/* .add(R.id.fragment_container_view, LinesDetailFragment.class, | /* .add(R.id.fragment_container_view, LinesDetailFragment.class, | ||||
LinesDetailFragment.Companion.makeArgs("gtt:4U")) | LinesDetailFragment.Companion.makeArgs("gtt:4U")) | ||||
*/ | */ | ||||
//.add(R.id.fragment_container_view, LinesGridShowingFragment.class, null) | //.add(R.id.fragment_container_view, LinesGridShowingFragment.class, null) | ||||
//.add(R.id.fragment_container_view, IntroFragment.class, IntroFragment.makeArguments(0)) | //.add(R.id.fragment_container_view, IntroFragment.class, IntroFragment.makeArguments(0)) | ||||
//.commit(); | //.commit(); | ||||
//.add(R.id.fragment_container_view, LinesDetailFragment.class, | //.add(R.id.fragment_container_view, LinesDetailFragment.class, | ||||
// LinesDetailFragment.Companion.makeArgs("gtt:4U")) | // LinesDetailFragment.Companion.makeArgs("gtt:4U")) | ||||
.add(R.id.fragment_container_view, TestSavingFragment.class, null) | .add(R.id.fragment_container_view, BackupImportFragment.class, null) | ||||
.commit(); | .commit(); | ||||
} | } | ||||
} | } | ||||
@Override | @Override | ||||
public void showFloatingActionButton(boolean yes) { | public void showFloatingActionButton(boolean yes) { | ||||
Log.d(DEBUG_TAG, "Asked to show the action button"); | Log.d(DEBUG_TAG, "Asked to show the action button"); | ||||
} | } | ||||
Show All 20 Lines | public void showLineOnMap(String routeGtfsId){ | ||||
tr.replace(R.id.fragment_container_view, LinesDetailFragment.class, | tr.replace(R.id.fragment_container_view, LinesDetailFragment.class, | ||||
LinesDetailFragment.Companion.makeArgs(routeGtfsId)); | LinesDetailFragment.Companion.makeArgs(routeGtfsId)); | ||||
tr.addToBackStack("LineonMap-"+routeGtfsId); | tr.addToBackStack("LineonMap-"+routeGtfsId); | ||||
tr.commit(); | tr.commit(); | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register