mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 21:37:34 +00:00
Allow editing of contact names.
Took care to properly format CJK names.
This commit is contained in:
70
res/layout/activity_contact_name_edit.xml
Normal file
70
res/layout/activity_contact_name_edit.xml
Normal file
@@ -0,0 +1,70 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/TextSecure.LightActionBar"
|
||||
android:background="@color/signal_primary"
|
||||
android:elevation="4dp"/>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||
android:id="@+id/name_edit_display_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:textSize="20sp"
|
||||
tools:text="Peter Parker"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
||||
android:id="@+id/name_edit_prefix"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/ContactNameEditActivity_prefix"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
||||
android:id="@+id/name_edit_given_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/ContactNameEditActivity_given_name"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
||||
android:id="@+id/name_edit_middle_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/ContactNameEditActivity_middle_name"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
||||
android:id="@+id/name_edit_family_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/ContactNameEditActivity_family_name"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
||||
android:id="@+id/name_edit_suffix"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/ContactNameEditActivity_suffix"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
@@ -28,6 +28,15 @@
|
||||
android:ellipsize="end"
|
||||
tools:text="Peter Parker"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/editable_contact_name_edit_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_create_white_24dp"
|
||||
android:tint="@color/signal_primary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
|
@@ -97,6 +97,13 @@
|
||||
<string name="ContactsDatabase_message_s">Message %s</string>
|
||||
<string name="ContactsDatabase_signal_call_s">Signal Call %s</string>
|
||||
|
||||
<!-- ContactNameEditActivity -->
|
||||
<string name="ContactNameEditActivity_given_name">Given name</string>
|
||||
<string name="ContactNameEditActivity_family_name">Family name</string>
|
||||
<string name="ContactNameEditActivity_prefix">Prefix</string>
|
||||
<string name="ContactNameEditActivity_suffix">Suffix</string>
|
||||
<string name="ContactNameEditActivity_middle_name">Middle name</string>
|
||||
|
||||
<!-- ContactShareEditActivity -->
|
||||
<string name="ContactShareEditActivity_type_home">Home</string>
|
||||
<string name="ContactShareEditActivity_type_mobile">Mobile</string>
|
||||
|
Reference in New Issue
Block a user