diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-28 15:21:20 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-28 16:26:22 -0600 |
commit | bee6ebe3b419c08661b1f0aa8e555ecb62d2798b (patch) | |
tree | 2a4e619ca0fb559e1a8303877dd8d438154c13db /ui/src/main/res/layout | |
parent | 5989298d3fc3a0fda4d3f88d5a13b4506ccb0cae (diff) |
TunnelEditor: move generate button to inside box
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/res/layout')
-rw-r--r-- | ui/src/main/res/layout/tunnel_editor_fragment.xml | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/ui/src/main/res/layout/tunnel_editor_fragment.xml b/ui/src/main/res/layout/tunnel_editor_fragment.xml index 7e568f5b..0eb5c249 100644 --- a/ui/src/main/res/layout/tunnel_editor_fragment.xml +++ b/ui/src/main/res/layout/tunnel_editor_fragment.xml @@ -93,9 +93,10 @@ android:layout_height="wrap_content" android:layout_margin="4dp" android:hint="@string/private_key" - app:layout_constraintEnd_toStartOf="@id/generate_private_key_button" - app:layout_constraintHorizontal_chainStyle="spread" - app:layout_constraintHorizontal_weight="0.7" + app:endIconMode="custom" + app:endIconDrawable="@drawable/ic_action_generate" + app:endIconContentDescription="@string/generate_new_private_key" + app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/interface_name_layout"> @@ -108,21 +109,6 @@ app:filter="@{KeyInputFilter.newInstance()}" /> </com.google.android.material.textfield.TextInputLayout> - <com.google.android.material.button.MaterialButton - android:id="@+id/generate_private_key_button" - style="@style/Widget.MaterialComponents.Button.TextButton" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_margin="4dp" - android:onClick="@{() -> config.interface.generateKeyPair()}" - android:text="@string/generate" - android:textColor="?attr/colorSecondary" - app:layout_constraintBaseline_toBaselineOf="@id/private_key_text_layout" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_weight="0.3" - app:layout_constraintStart_toEndOf="@id/private_key_text_layout" - app:rippleColor="?attr/colorSecondary" /> - <com.google.android.material.textfield.TextInputLayout android:id="@+id/public_key_label_layout" style="@style/TextInputLayoutBase" |