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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,17 +56,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/create_identity"
|
||||
android:id="@+id/button_set_password"
|
||||
android:layout_below="@+id/textView4"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin" />
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip"
|
||||
android:id="@+id/button_skip"
|
||||
android:layout_alignTop="@+id/button_set_password"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
62
app/src/main/res/layout/fragment_setup_finished.xml
Normal file
62
app/src/main/res/layout/fragment_setup_finished.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
tools:context="i2p.bote.android.intro.SetupActivity.SetPasswordFragment">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:id="@+id/textView"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:text="@string/setup_finished" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/textView2"
|
||||
android:layout_below="@+id/textView"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||
android:text="@string/setup_finished_1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/setup_finished_2"
|
||||
android:id="@+id/textView3"
|
||||
android:layout_below="@+id/textView2"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/setup_finished_3"
|
||||
android:id="@+id/textView4"
|
||||
android:layout_below="@+id/textView3"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/go_to_inbox"
|
||||
android:id="@+id/button_finish"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -56,17 +56,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/set_password"
|
||||
android:id="@+id/button_set_password"
|
||||
android:layout_below="@+id/textView4"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_marginTop="@dimen/activity_vertical_margin" />
|
||||
android:layout_alignParentStart="true" />
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/skip"
|
||||
android:id="@+id/button_skip"
|
||||
android:layout_alignTop="@+id/button_set_password"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -26,6 +26,11 @@
|
||||
<string name="setup_create_identity_1">To receive emails, you need an Identity. This is a set of cryptographic keys that enables you to encrypt and decrypt emails.</string>
|
||||
<string name="setup_create_identity_2">A Destination is the public part of an Identity. This is the address that you will give to your contacts so they can send emails to you. When you send emails using an Identity, its Destination is included in the From field so the recipient can reply.</string>
|
||||
<string name="setup_create_identity_3">If you do not create an Identity now, you can do so later from the Settings menu. If you only want to send emails, you do not need an Identity, because Bote emails can be sent anonymously. However the recipient will be unable to reply to you.</string>
|
||||
<string name="setup_finished">Setup finished</string>
|
||||
<string name="setup_finished_1">Bote is configured and ready to use.</string>
|
||||
<string name="setup_finished_2">To send and receive emails, Bote needs to connect to the distributed network. You can do this from the menu.</string>
|
||||
<string name="setup_finished_3">While Bote is offline, you can read emails that have already been downloaded. You can also write emails and put them in the Outbox; they will be sent the next time Bote is online.</string>
|
||||
<string name="go_to_inbox">Go to inbox</string>
|
||||
<string name="action_new_email">New email</string>
|
||||
<string name="action_send_email">Send email</string>
|
||||
<string name="action_start_bote">Connect to network</string>
|
||||
|
||||
Reference in New Issue
Block a user