Archived
If user clicks on header, then go to the main screen and clear history.
This commit is contained in:
1 parent
e55b948c0f
commit
3dfb28a80b
2 files changed
+11
No files matched your search
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/header"
|
||||
android:onClick="clickHandler"
|
||||
android:layout_height="80dip"
|
||||
android:layout_width="fill_parent" >
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ public abstract class BaseDnsActivity extends Activity {
|
||||
public void clickHandler(View v) {
|
||||
Intent intent = new Intent();
|
||||
|
||||
/* Program button was pushed: */
|
||||
if (v.getId() == R.id.program_button) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
|
||||
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
@@ -17,12 +18,21 @@ public abstract class BaseDnsActivity extends Activity {
|
||||
intent.setClass(this, ProgramListActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
/* Join button was pushed: */
|
||||
} else if (v.getId() == R.id.bli_med_button) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY
|
||||
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
|
||||
intent.setClass(this, JoinUsActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
/* The header was pushed: */
|
||||
} else if (v.getId() == R.id.header) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
|
||||
| Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
|
||||
intent.setClass(this, DnsActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user