diff --git a/res/drawable-hdpi/ic_info_white_18dp.png b/res/drawable-hdpi/ic_info_white_18dp.png
new file mode 100644
index 0000000000..7bc6eb1c5f
Binary files /dev/null and b/res/drawable-hdpi/ic_info_white_18dp.png differ
diff --git a/res/drawable-mdpi/ic_info_white_18dp.png b/res/drawable-mdpi/ic_info_white_18dp.png
new file mode 100644
index 0000000000..5d692dcc10
Binary files /dev/null and b/res/drawable-mdpi/ic_info_white_18dp.png differ
diff --git a/res/drawable-xhdpi/ic_info_white_18dp.png b/res/drawable-xhdpi/ic_info_white_18dp.png
new file mode 100644
index 0000000000..00f53edce0
Binary files /dev/null and b/res/drawable-xhdpi/ic_info_white_18dp.png differ
diff --git a/res/drawable-xxhdpi/ic_info_white_18dp.png b/res/drawable-xxhdpi/ic_info_white_18dp.png
new file mode 100644
index 0000000000..a5062dd031
Binary files /dev/null and b/res/drawable-xxhdpi/ic_info_white_18dp.png differ
diff --git a/res/drawable-xxxhdpi/ic_info_white_18dp.png b/res/drawable-xxxhdpi/ic_info_white_18dp.png
new file mode 100644
index 0000000000..0db142917e
Binary files /dev/null and b/res/drawable-xxxhdpi/ic_info_white_18dp.png differ
diff --git a/res/drawable/pill_button.xml b/res/drawable/pill_button.xml
new file mode 100644
index 0000000000..163c49aeda
--- /dev/null
+++ b/res/drawable/pill_button.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/registration_activity.xml b/res/layout/registration_activity.xml
index d2fc488781..316e28dcef 100644
--- a/res/layout/registration_activity.xml
+++ b/res/layout/registration_activity.xml
@@ -8,28 +8,17 @@
-
-
-
-
+
+
+
+
+
+
+
-
+ android:layout_height="wrap_content"/>
-
+ android:layout_height="wrap_content"/>
+
Last active %s
Today
+
+ unknown file
+
Optimize for missing Play Services
This device does not support Play Services. Tap to disable system battery optimizations that prevent Signal from retrieving messages while inactive.
@@ -526,6 +529,8 @@
I understand
Play Services Error
Google Play Services is updating or temporarily unavailable. Please try again.
+ More information
+ Less information
Possible problems
@@ -676,6 +681,9 @@
Quick response unavailable when Signal is locked!
Problem sending message!
+
+ Open Directory
+
Signal
New message
@@ -931,7 +939,7 @@
PHONE NUMBER
Register
- Registration transmits some contact information to the server. It is not stored.
+ Signal makes it easy to communicate by using your existing phone number and address book. Friends and contacts who already know how to contact you by phone will be able to easily get in touch by Signal.\n\nRegistration transmits some contact information to the server. It is not stored.
Powered by twilio
@@ -1344,8 +1352,6 @@
Transport icon
- Open Directory
- unknown file
diff --git a/src/org/thoughtcrime/securesms/RegistrationActivity.java b/src/org/thoughtcrime/securesms/RegistrationActivity.java
index 7b835a68ba..ef252f8436 100644
--- a/src/org/thoughtcrime/securesms/RegistrationActivity.java
+++ b/src/org/thoughtcrime/securesms/RegistrationActivity.java
@@ -1,11 +1,10 @@
package org.thoughtcrime.securesms;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
-import android.net.Uri;
import android.os.Bundle;
+import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.TextUtils;
@@ -15,14 +14,12 @@ import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ArrayAdapter;
-import android.widget.Button;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
-import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.i18n.phonenumbers.AsYouTypeFormatter;
import com.google.i18n.phonenumbers.NumberParseException;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
@@ -58,8 +55,11 @@ public class RegistrationActivity extends BaseActionBarActivity {
private Spinner countrySpinner;
private TextView countryCode;
private TextView number;
- private Button createButton;
- private Button skipButton;
+ private TextView createButton;
+ private TextView skipButton;
+ private TextView informationView;
+ private View informationToggle;
+ private TextView informationToggleText;
private MasterSecret masterSecret;
@@ -86,37 +86,29 @@ public class RegistrationActivity extends BaseActionBarActivity {
private void initializeResources() {
this.masterSecret = getIntent().getParcelableExtra("master_secret");
- this.countrySpinner = (Spinner)findViewById(R.id.country_spinner);
- this.countryCode = (TextView)findViewById(R.id.country_code);
- this.number = (TextView)findViewById(R.id.number);
- this.createButton = (Button)findViewById(R.id.registerButton);
- this.skipButton = (Button)findViewById(R.id.skipButton);
+ this.countrySpinner = (Spinner) findViewById(R.id.country_spinner);
+ this.countryCode = (TextView) findViewById(R.id.country_code);
+ this.number = (TextView) findViewById(R.id.number);
+ this.createButton = (TextView) findViewById(R.id.registerButton);
+ this.skipButton = (TextView) findViewById(R.id.skipButton);
+ this.informationView = (TextView) findViewById(R.id.registration_information);
+ this.informationToggle = findViewById(R.id.information_link_container);
+ this.informationToggleText = (TextView) findViewById(R.id.information_label);
+
+ DrawableCompat.setTint(this.createButton.getBackground(), getResources().getColor(R.color.signal_primary));
+ DrawableCompat.setTint(this.skipButton.getBackground(), getResources().getColor(R.color.grey_400));
this.countryCode.addTextChangedListener(new CountryCodeChangedListener());
this.number.addTextChangedListener(new NumberChangedListener());
this.createButton.setOnClickListener(new CreateButtonListener());
this.skipButton.setOnClickListener(new CancelButtonListener());
+ this.informationToggle.setOnClickListener(new InformationToggleListener());
if (getIntent().getBooleanExtra("cancel_button", false)) {
this.skipButton.setVisibility(View.VISIBLE);
} else {
this.skipButton.setVisibility(View.INVISIBLE);
}
-
- findViewById(R.id.twilio_shoutout).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent intent = new Intent();
- intent.setAction(Intent.ACTION_VIEW);
- intent.addCategory(Intent.CATEGORY_BROWSABLE);
- intent.setData(Uri.parse("https://twilio.com"));
- try {
- startActivity(intent);
- } catch (ActivityNotFoundException e) {
- Log.w(TAG,e);
- }
- }
- });
}
private void initializeSpinner() {
@@ -374,4 +366,17 @@ public class RegistrationActivity extends BaseActionBarActivity {
finish();
}
}
+
+ private class InformationToggleListener implements View.OnClickListener {
+ @Override
+ public void onClick(View v) {
+ if (informationView.getVisibility() == View.VISIBLE) {
+ informationView.setVisibility(View.GONE);
+ informationToggleText.setText(R.string.RegistrationActivity_more_information);
+ } else {
+ informationView.setVisibility(View.VISIBLE);
+ informationToggleText.setText(R.string.RegistrationActivity_less_information);
+ }
+ }
+ }
}