hi Sean,
this is what i have done.
i Have 3 activities. Activity A, Activity B, and Activity C.
Activity A is the starting Activity.
according to a user action Activity A will navigate to Activity B like
this.
finish();
startActivityForResult(Activity B, 102);
Activity A --> Activity B
after 5 seconds Activity B will starts Activity C
StartActivity(Activity C)
and will not finish Activity B.
on top of Activity B, Activity C will be run.
this is Activity C onCreate method
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Bundle b = getIntent().getExtras();
msg_id = b.getLong("ID");
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
setContentView(R.layout.blur_blue);
}
this is manifest.xml
<activity android:name=".Activity C" android:theme="@style/
Theme.Blue"/>
this is my theme.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="Blue">#770000ff</drawable>
<drawable name="Green">#7700ff00</drawable>
<drawable name="Purple">#70970468</drawable>
<drawable name="Pink">#70de6496</drawable>
<drawable name="Red">#7f00</drawable>
<drawable name="Orange">#70ff7e00</drawable>
<drawable name="Yellow">#70fff000</drawable>
</resources>
so Activity C will run on top of Activity B.
so when i pressed back button from activity C
application should redirects to Activity A.
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
if (keyCode == KeyEvent.KEYCODE_BACK) {
finish();
finishActivity(102);
startActivity(new Intent(Acitivyt C, Activity A ));
return true;
}
return false;
}
Application redirects to Activity A and when i pressed back from
Activity A
again it redirects to Activity B and will not close the application.
this is what i'm doing in Activity A
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
boolean b = false;
if (keyCode == KeyEvent.KEYCODE_BACK) {
// int x = android.os.Process.SIGNAL_QUIT;
finish();
finishActivity(102);
}
return b;
}
so Sean what do you think?? what can be done.
regards,
Randika
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en