Display user profile information in settings activity

Allow for editing

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-08-16 12:01:26 -07:00
parent df99deb480
commit c11f2eddf5
15 changed files with 222 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -16,7 +16,8 @@
<ImageView android:id="@+id/avatar"
android:layout_width="64dp"
android:layout_height="64dp"/>
android:layout_height="64dp"
android:transitionName="avatar"/>
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
android:id="@+id/name"

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<ImageView android:id="@+id/avatar"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_margin="16dp"
android:transitionName="avatar"/>
<LinearLayout android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginStart="10dp">
<TextView android:id="@+id/profile_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:textSize="20sp"
tools:text="Voltarine DeClyre"/>
<TextView android:id="@+id/number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="+14151231234"/>
</LinearLayout>
</LinearLayout>

View File

@@ -73,6 +73,10 @@
<!-- CallScreen -->
<string name="CallScreen_Incoming_call">Incoming call</string>
<!-- ClearProfileActivity -->
<string name="ClearProfileActivity_remove">Remove</string>
<string name="ClearProfileActivity_remove_profile_photo">Remove profile photo?</string>
<!-- ConfirmIdentityDialog -->
<string name="ConfirmIdentityDialog_your_safety_number_with_s_has_changed">Your safety number with %1$s has changed. This could either mean that someone is trying to intercept your communication, or that %2$s simply reinstalled Signal.</string>
<string name="ConfirmIdentityDialog_you_may_wish_to_verify_your_safety_number_with_this_contact">You may wish to verify your safety number with this contact.</string>
@@ -613,6 +617,14 @@
<string name="UpdateApkReadyListener_Signal_update">Signal update</string>
<string name="UpdateApkReadyListener_a_new_version_of_signal_is_available_tap_to_update">A new version of Signal is available, tap to update</string>
<!-- UntrustedSendDialog -->
<string name="UntrustedSendDialog_send_message">Send message?</string>
<string name="UntrustedSendDialog_send">Send</string>
<!-- UnverifiedSendDialog -->
<string name="UnverifiedSendDialog_send_message">Send message?</string>
<string name="UnverifiedSendDialog_send">Send</string>
<!-- VerifyIdentityActivity -->
<string name="VerifyIdentityActivity_your_contact_is_running_an_old_version_of_signal">Your contact is running an old version of Signal. Please ask them to update before verifying your safety number.</string>
<string name="VerifyIdentityActivity_your_contact_is_running_a_newer_version_of_Signal">Your contact is running a newer version of Signal with an incompatible QR code format. Please update to compare.</string>
@@ -1087,6 +1099,7 @@
<string name="AndroidManifest__linked_devices">Linked devices</string>
<string name="AndroidManifest__invite_friends">Invite friends</string>
<string name="AndroidManifest_archived_conversations">Archived conversations</string>
<string name="AndroidManifest_remove_photo">Remove photo</string>
<!-- arrays.xml -->
<string name="arrays__import_export">Import / export</string>
@@ -1409,10 +1422,7 @@
<!-- transport_selection_list_item -->
<string name="transport_selection_list_item__transport_icon">Transport icon</string>
<string name="UntrustedSendDialog_send_message">Send message?</string>
<string name="UntrustedSendDialog_send">Send</string>
<string name="UnverifiedSendDialog_send_message">Send message?</string>
<string name="UnverifiedSendDialog_send">Send</string>
<!-- EOF -->

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<org.thoughtcrime.securesms.preferences.ProfilePreference
android:key="preference_category_profile"/>
<Preference android:key="preference_category_sms_mms"
android:title="@string/preferences__sms_mms"
android:icon="@drawable/ic_textsms_24dp"/>