Back to project page android-facade-example.
The source code is released under:
MIT License
If you think the Android project android-facade-example listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ruenzuo.weatherapp.activities; //from w w w .j a v a 2 s .c om import android.app.Activity; import android.os.Bundle; import android.view.MenuItem; import com.ruenzuo.weatherapp.R; import com.ruenzuo.weatherapp.fragments.StationDataListFragment; import com.ruenzuo.weatherapp.models.StationData; /** * Created by ruenzuo on 10/05/14. */ public class StationDataActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_station_data); getActionBar().setDisplayHomeAsUpEnabled(true); StationData stationData = (StationData) getIntent().getExtras().getSerializable("StationData"); StationDataListFragment fragment = new StationDataListFragment(); fragment.setStationData(stationData); getFragmentManager().beginTransaction().replace(R.id.placeholder_container, fragment, "stationDataListFragment").commit(); } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) { finish(); return true; } return super.onOptionsItemSelected(item); } }