Don't let a user accidentally exit the setup wizard if they chose to use it
This commit is contained in:
1
TODO
1
TODO
@@ -6,7 +6,6 @@ Fixes:
|
||||
-- Show full network error? Make it copy-able?
|
||||
|
||||
Tasks:
|
||||
- Add a "do you want to skip tutorial" dialog to back button
|
||||
- More layouts for intro and setup (tune for each screen size)
|
||||
- Create and bundle better network status icons
|
||||
- Subclass EmailListFragment for each default mailbox
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.support.v7.app.ActionBarActivity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import i2p.bote.android.R;
|
||||
import i2p.bote.android.config.EditIdentityActivity;
|
||||
@@ -18,6 +19,12 @@ public class SetupActivity extends ActionBarActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_setup);
|
||||
|
||||
// If a user has chosen to enter the setup wizard, don't let them
|
||||
// accidentally exit it early.
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
|
||||
getSupportActionBar().setHomeButtonEnabled(false);
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.container, new SetPasswordFragment())
|
||||
@@ -25,6 +32,13 @@ public class SetupActivity extends ActionBarActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
// If a user has chosen to enter the setup wizard, don't let them
|
||||
// accidentally exit it early.
|
||||
Toast.makeText(this, R.string.please_finish_setup, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set password.
|
||||
|
||||
Reference in New Issue
Block a user