Extract styles
This commit is contained in:
@@ -8,13 +8,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/email_input_layout"
|
android:id="@+id/email_input_layout"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/SmallMarginTextInputLayoutStyle"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/margin_small"
|
|
||||||
android:layout_marginTop="@dimen/margin_small"
|
|
||||||
android:layout_marginEnd="@dimen/margin_small"
|
|
||||||
android:layout_marginBottom="@dimen/margin_small"
|
|
||||||
android:hint="@string/fragment_authentication_input_hint_email"
|
android:hint="@string/fragment_authentication_input_hint_email"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/password_input_layout"
|
app:layout_constraintBottom_toTopOf="@+id/password_input_layout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -32,13 +26,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/password_input_layout"
|
android:id="@+id/password_input_layout"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/SmallMarginTextInputLayoutStyle"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/margin_small"
|
|
||||||
android:layout_marginTop="@dimen/margin_small"
|
|
||||||
android:layout_marginEnd="@dimen/margin_small"
|
|
||||||
android:layout_marginBottom="@dimen/margin_small"
|
|
||||||
android:hint="@string/fragment_authentication_input_hint_password"
|
android:hint="@string/fragment_authentication_input_hint_password"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/url_input_layout"
|
app:layout_constraintBottom_toTopOf="@+id/url_input_layout"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -54,13 +42,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/url_input_layout"
|
android:id="@+id/url_input_layout"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/SmallMarginTextInputLayoutStyle"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/margin_small"
|
|
||||||
android:layout_marginTop="@dimen/margin_small"
|
|
||||||
android:layout_marginEnd="@dimen/margin_small"
|
|
||||||
android:layout_marginBottom="@dimen/margin_small"
|
|
||||||
android:hint="@string/fragment_authnetication_input_hint_url"
|
android:hint="@string/fragment_authnetication_input_hint_url"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/button"
|
app:layout_constraintBottom_toTopOf="@+id/button"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -76,15 +58,10 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/button"
|
android:id="@+id/button"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/margin_small"
|
|
||||||
android:layout_marginTop="@dimen/margin_small"
|
|
||||||
android:layout_marginEnd="@dimen/margin_small"
|
|
||||||
android:layout_marginBottom="@dimen/margin_small"
|
|
||||||
android:text="@string/fragment_authentication_button_login"
|
android:text="@string/fragment_authentication_button_login"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
style="@style/SmallMarginButton"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/url_input_layout" />
|
app:layout_constraintTop_toBottomOf="@+id/url_input_layout" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
21
app/src/main/res/values/styles.xml
Normal file
21
app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="SmallMarginTextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||||
|
<item name="android:layout_width">0dp</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_marginStart">@dimen/margin_small</item>
|
||||||
|
<item name="android:layout_marginTop">@dimen/margin_small</item>
|
||||||
|
<item name="android:layout_marginEnd">@dimen/margin_small</item>
|
||||||
|
<item name="android:layout_marginBottom">@dimen/margin_small</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="SmallMarginButton">
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_marginStart">@dimen/margin_small</item>
|
||||||
|
<item name="android:layout_marginTop">@dimen/margin_small</item>
|
||||||
|
<item name="android:layout_marginEnd">@dimen/margin_small</item>
|
||||||
|
<item name="android:layout_marginBottom">@dimen/margin_small</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
Reference in New Issue
Block a user