Back to project page Joetz-Android-V2.
The source code is released under:
GNU General Public License
If you think the Android project Joetz-Android-V2 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.example.jens.myapplication.bookingHistory; /* w w w.j a v a 2s. co m*/ import android.support.v4.app.FragmentActivity; import android.support.v4.app.NavUtils; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.os.Build; import com.example.jens.myapplication.R; import com.example.jens.myapplication.activities.ActivityDetailFragment; import com.example.jens.myapplication.apimanager.manager.ActivityManager; import com.example.jens.myapplication.apimanager.manager.LoginManager; import com.example.jens.myapplication.sam.JoetzApplication; /** * Activity showing more detailed information about a booking the user has made */ public class BookingHistoryDetailActivity extends FragmentActivity { public static final String ARG_BOOKING_ID = "argBookingId"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LoginManager loginManager = JoetzApplication.getContext().getLoginManager(); if(!loginManager.isLoggedIn()){ finish(); } setContentView(R.layout.activity_booking_history_detail); if (savedInstanceState == null) { Bundle extras = getIntent().getExtras(); if(extras == null || !extras.containsKey(ARG_BOOKING_ID)){ throw new IllegalArgumentException("Booking ID required, use extra ARG_BOOKING_ID"); } Fragment fragment = BookingHistoryDetailFragment.newInstance(extras.getLong(ARG_BOOKING_ID)); getSupportFragmentManager().beginTransaction() .add(R.id.container, fragment) .commit(); } } @Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == android.R.id.home) { // NavUtils.navigateUpFromSameTask(this); finish(); return true; } return super.onOptionsItemSelected(item); } }