add twilio shoutout to registration

// FREEBIE
This commit is contained in:
Jake McGinty 2015-07-02 11:10:18 -07:00 committed by Moxie Marlinspike
parent 59772504e3
commit 59c51127f6
7 changed files with 21 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -93,5 +93,13 @@
android:textAppearance="?android:attr/textAppearanceMedium"/> android:textAppearance="?android:attr/textAppearanceMedium"/>
</LinearLayout> </LinearLayout>
<ImageView android:id="@+id/twilio_shoutout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_twilio_shoutout_white"
android:layout_gravity="right"
android:tint="@color/grey_800"
android:contentDescription="@string/registration_activity__powered_by_twilio"/>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -632,6 +632,7 @@
<string name="registration_activity__phone_number">PHONE NUMBER</string> <string name="registration_activity__phone_number">PHONE NUMBER</string>
<string name="registration_activity__register">Register</string> <string name="registration_activity__register">Register</string>
<string name="registration_activity__registration_will_transmit_some_contact_information_to_the_server_temporariliy">Registration transmits some contact information to the server. It is not stored.</string> <string name="registration_activity__registration_will_transmit_some_contact_information_to_the_server_temporariliy">Registration transmits some contact information to the server. It is not stored.</string>
<string name="registration_activity__powered_by_twilio">Powered by twilio</string>
<!-- registration_problems --> <!-- registration_problems -->
<string name="registration_problems__some_possible_problems_include">Some possible problems <string name="registration_problems__some_possible_problems_include">Some possible problems
@ -980,7 +981,6 @@
<string name="transport_selection_list_item__transport_icon">Transport icon</string> <string name="transport_selection_list_item__transport_icon">Transport icon</string>
<!-- EOF --> <!-- EOF -->
</resources> </resources>

View File

@ -3,6 +3,7 @@ package org.thoughtcrime.securesms;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.text.Editable; import android.text.Editable;
@ -91,6 +92,17 @@ public class RegistrationActivity extends BaseActionBarActivity {
} else { } else {
this.skipButton.setVisibility(View.INVISIBLE); 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"));
startActivity(intent);
}
});
} }
private void initializeSpinner() { private void initializeSpinner() {