Setup finished page, moved setup buttons to bottom of screen
This commit is contained in:
@@ -376,7 +376,6 @@ public class EmailListActivity extends ActionBarActivity implements
|
||||
} else if (requestCode == RUN_SETUP) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
// TODO implement a UI tutorial?
|
||||
Toast.makeText(this, "Setup complete.", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else if (requestCode == REQUEST_START_I2P) {
|
||||
if (resultCode == RESULT_OK) {
|
||||
|
||||
@@ -115,9 +115,32 @@ public class SetupActivity extends ActionBarActivity {
|
||||
}
|
||||
|
||||
private void nextPage() {
|
||||
// TODO have a "finished" page?
|
||||
getActivity().setResult(RESULT_OK);
|
||||
getActivity().finish();
|
||||
getFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new SetupFinishedFragment())
|
||||
.commit();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup finished.
|
||||
*/
|
||||
public static class SetupFinishedFragment extends Fragment {
|
||||
|
||||
public SetupFinishedFragment() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View rootView = inflater.inflate(R.layout.fragment_setup_finished, container, false);
|
||||
((Button)rootView.findViewById(R.id.button_finish)).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
getActivity().setResult(RESULT_OK);
|
||||
getActivity().finish();
|
||||
}
|
||||
});
|
||||
return rootView;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user