diff options
author | Iván Ávalos <avalos@disroot.org> | 2021-12-06 16:12:08 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2021-12-06 16:12:08 -0600 |
commit | c80ece3087b862e1849ad5c2972b9b13fec2eb3f (patch) | |
tree | ce126b42562f4a8be085b3cb10387807d6bd1158 /androidApp/src/main/res | |
parent | 4972774bb3d2b96a47b17c89d4bc6f9aeac27e25 (diff) | |
download | etbsa-trackermap-mobile-c80ece3087b862e1849ad5c2972b9b13fec2eb3f.tar.gz etbsa-trackermap-mobile-c80ece3087b862e1849ad5c2972b9b13fec2eb3f.tar.bz2 etbsa-trackermap-mobile-c80ece3087b862e1849ad5c2972b9b13fec2eb3f.zip |
Strings to strings.xml (i18n) and dimens to dimen.xml
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r-- | androidApp/src/main/res/layout/login.xml | 14 | ||||
-rw-r--r-- | androidApp/src/main/res/layout/login_activity.xml | 7 | ||||
-rw-r--r-- | androidApp/src/main/res/values/dimen.xml | 9 | ||||
-rw-r--r-- | androidApp/src/main/res/values/strings.xml | 9 |
4 files changed, 28 insertions, 11 deletions
diff --git a/androidApp/src/main/res/layout/login.xml b/androidApp/src/main/res/layout/login.xml index 0a5f07a..21c63b0 100644 --- a/androidApp/src/main/res/layout/login.xml +++ b/androidApp/src/main/res/layout/login.xml @@ -5,22 +5,22 @@ android:name="mx.trackermap.TrackerMap.android.session.LoginFragment" android:layout_width="match_parent" android:layout_height="wrap_content" - app:cardCornerRadius="20dp" - app:cardElevation="5dp" + app:cardCornerRadius="@dimen/cardview_border_radius" + app:cardElevation="@dimen/cardview_elevation" app:cardUseCompatPadding="true"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingVertical="32dp" - android:paddingHorizontal="16dp"> + android:paddingVertical="@dimen/cardview_padding_vertical" + android:paddingHorizontal="@dimen/cardview_padding_horizontal"> <com.google.android.material.textfield.TextInputLayout android:id="@+id/usernameInputLayout" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="Username" + android:hint="@string/login_username" app:layout_constraintBottom_toTopOf="@+id/passwordInputLayout" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" @@ -40,7 +40,7 @@ style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:layout_width="match_parent" android:layout_height="wrap_content" - android:hint="Password" + android:hint="@string/login_password" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" @@ -67,7 +67,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="0.5" android:layout_marginTop="40dp" - android:text="Log in"/> + android:text="@string/login_login"/> </androidx.constraintlayout.widget.ConstraintLayout> diff --git a/androidApp/src/main/res/layout/login_activity.xml b/androidApp/src/main/res/layout/login_activity.xml index f1df817..8021963 100644 --- a/androidApp/src/main/res/layout/login_activity.xml +++ b/androidApp/src/main/res/layout/login_activity.xml @@ -9,14 +9,14 @@ android:id="@+id/bannerImage" android:layout_width="0dp" android:layout_height="0dp" - app:layout_constraintWidth_percent="0.7" + app:layout_constraintWidth_percent="0.5" app:layout_constraintDimensionRatio="1" app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" app:srcCompat="@drawable/ic_launcher_foreground" /> - <fragment + <androidx.fragment.app.FragmentContainerView android:id="@+id/loginFragment" android:layout_width="0dp" android:layout_height="wrap_content" @@ -24,8 +24,7 @@ app:layout_constraintTop_toBottomOf="@id/bannerImage" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - android:layout_marginStart="16dp" - android:layout_marginEnd="16dp" + android:layout_marginHorizontal="@dimen/cardview_margin_horizontal" android:layout_marginBottom="16dp"/> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml new file mode 100644 index 0000000..6b5e340 --- /dev/null +++ b/androidApp/src/main/res/values/dimen.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <!-- CardView --> + <dimen name="cardview_border_radius">20dp</dimen> + <dimen name="cardview_elevation">5dp</dimen> + <dimen name="cardview_padding_vertical">32dp</dimen> + <dimen name="cardview_padding_horizontal">16dp</dimen> + <dimen name="cardview_margin_horizontal">7dp</dimen> +</resources>
\ No newline at end of file diff --git a/androidApp/src/main/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml new file mode 100644 index 0000000..db272e5 --- /dev/null +++ b/androidApp/src/main/res/values/strings.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <string name="app_name">TrackerMap</string> + + <!-- LoginActivity --> + <string name="login_username">Username</string> + <string name="login_password">Password</string> + <string name="login_login">Login</string> +</resources>
\ No newline at end of file |