diff options
Diffstat (limited to 'OpenKeychain/src/main/res')
3 files changed, 14 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/res/layout/linked_create_https_fragment_step1.xml b/OpenKeychain/src/main/res/layout/linked_create_https_fragment_step1.xml index a18c1883a..8b6047e21 100644 --- a/OpenKeychain/src/main/res/layout/linked_create_https_fragment_step1.xml +++ b/OpenKeychain/src/main/res/layout/linked_create_https_fragment_step1.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" android:layout_height="match_parent"> @@ -37,7 +38,7 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:text="@string/linked_create_https_1_3" /> - <org.sufficientlysecure.keychain.ui.widget.HttpsPrefixedText + <org.sufficientlysecure.keychain.ui.widget.PrefixedEditText android:id="@+id/linked_create_https_uri" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -46,6 +47,7 @@ android:ems="10" android:inputType="textUri" android:layout_gravity="center_horizontal" + custom:prefix="https://" /> <TextView diff --git a/OpenKeychain/src/main/res/layout/linked_create_twitter_fragment_step1.xml b/OpenKeychain/src/main/res/layout/linked_create_twitter_fragment_step1.xml index 129939e5b..87ceaee6f 100644 --- a/OpenKeychain/src/main/res/layout/linked_create_twitter_fragment_step1.xml +++ b/OpenKeychain/src/main/res/layout/linked_create_twitter_fragment_step1.xml @@ -1,7 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:custom="http://schemas.android.com/apk/res-auto" android:layout_width="wrap_content" - android:layout_height="match_parent"> + android:layout_height="match_parent" + > <ScrollView android:layout_width="match_parent" @@ -37,7 +39,7 @@ android:textAppearance="?android:attr/textAppearanceMedium" android:text="@string/linked_create_twitter_1_3" /> - <EditText + <org.sufficientlysecure.keychain.ui.widget.PrefixedEditText android:id="@+id/linked_create_twitter_handle" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -45,7 +47,9 @@ android:layout_marginTop="16dp" android:ems="10" android:layout_gravity="center_horizontal" - android:hint="@string/linked_create_twitter_handle"/> + android:hint="@string/linked_create_twitter_handle" + custom:prefix="\@" + /> </LinearLayout> diff --git a/OpenKeychain/src/main/res/values/attr.xml b/OpenKeychain/src/main/res/values/attr.xml index 7a2f3054e..74584a1e5 100644 --- a/OpenKeychain/src/main/res/values/attr.xml +++ b/OpenKeychain/src/main/res/values/attr.xml @@ -29,4 +29,8 @@ <attr name="color_strong" format="color" /> </declare-styleable> + <declare-styleable name="PrefixedEditText"> + <attr name="prefix" format="string" /> + </declare-styleable> + </resources>
\ No newline at end of file |