Better ui experience for user and more string resources

This commit is contained in:
Pau 2025-05-13 21:09:29 +02:00
parent 6012256a17
commit 01a15466c0
5 changed files with 597 additions and 284 deletions

View File

@ -14,175 +14,308 @@
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@id/btnSubmit" android:layout_above="@id/btnSubmitContainer"
android:layout_below="@id/toolbar" android:layout_below="@id/toolbar"
android:fillViewport="true" android:fillViewport="true"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:padding="@dimen/layout_padding"> android:clipToPadding="false"
android:padding="16dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<ImageView <!-- Report Form Card -->
android:id="@+id/ivReportPhoto" <com.google.android.material.card.MaterialCardView
android:layout_width="@dimen/image_view_width"
android:layout_height="@dimen/image_view_height"
android:layout_gravity="center"
android:layout_margin="@dimen/layout_padding"
android:background="@drawable/rectangle"
android:importantForAccessibility="no"
android:importantForAutofill="no"
android:padding="@dimen/content_padding"
android:src="@drawable/logo_add_location" />
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:layout_marginBottom="16dp"
app:startIconDrawable="@drawable/ic_location"> app:cardCornerRadius="12dp"
app:cardElevation="4dp">
<com.google.android.material.textfield.TextInputEditText <LinearLayout
android:id="@+id/etPlaceName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clickable="false" android:orientation="vertical"
android:focusable="false" android:padding="16dp">
android:hint="@string/Enter_Place_Name"
android:importantForAutofill="no"
android:inputType="text"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <!-- Header -->
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/add_report"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="?attr/colorPrimary"
android:layout_marginBottom="16dp"/>
<!-- Image Container -->
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardCornerRadius="8dp"
app:strokeWidth="1dp"
app:strokeColor="?attr/colorPrimary"
app:cardElevation="0dp">
<ImageView
android:id="@+id/ivReportPhoto"
android:layout_width="@dimen/image_view_width"
android:layout_height="@dimen/image_view_height"
android:padding="@dimen/content_padding"
android:background="@drawable/rectangle"
android:importantForAccessibility="no"
android:importantForAutofill="no"
android:src="@drawable/logo_add_location" />
</com.google.android.material.card.MaterialCardView>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tap_to_add_photo"
android:textSize="12sp"
android:gravity="center"
android:layout_marginTop="4dp"
android:layout_marginBottom="16dp"/>
<!-- Place Name Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:startIconDrawable="@drawable/ic_location"
app:startIconTint="?attr/colorPrimary"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPlaceName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:hint="@string/Enter_Place_Name"
android:importantForAutofill="no"
android:inputType="text"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<!-- Description Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:startIconDrawable="@drawable/ic_location"
app:startIconTint="?attr/colorPrimary"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary"
app:counterEnabled="true"
app:counterMaxLength="200">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/Enter_Description"
android:importantForAutofill="no"
android:inputType="textImeMultiLine"
android:minLines="3"
android:maxLines="5"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Rating Card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" app:cardCornerRadius="12dp"
app:startIconDrawable="@drawable/ic_location"> app:cardElevation="4dp">
<com.google.android.material.textfield.TextInputEditText <LinearLayout
android:id="@+id/etDescription"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Description" android:orientation="vertical"
android:importantForAutofill="no" android:padding="16dp">
android:inputType="textImeMultiLine"
android:maxLines="5"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout <!-- Rating Header -->
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_marginTop="@dimen/layout_padding"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/ivThumbsUp"
android:layout_width="@dimen/image_icon_width"
android:layout_height="@dimen/image_icon_height"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="Thumbs Up"
android:focusable="true"
android:padding="8dp"
app:tint="?attr/colorOnBackground"
android:src="@drawable/ic_thumb_up_border" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:text="@string/how_would_you_rate_this_place"
android:text="@string/GOOD" android:textSize="16sp"
android:textStyle="bold"
android:textColor="?attr/colorPrimary" android:textColor="?attr/colorPrimary"
android:textSize="@dimen/textSizeInEditText" android:textAlignment="center"
android:textStyle="bold" /> android:layout_marginBottom="16dp"/>
</LinearLayout>
<Space <!-- Rating Options -->
android:layout_width="@dimen/edit_text_padding" <LinearLayout
android:layout_height="wrap_content" /> android:layout_width="match_parent"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/ivThumbsAverage"
android:layout_width="@dimen/image_icon_width"
android:layout_height="@dimen/image_icon_height"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="Thumbs Average"
android:focusable="true"
android:padding="8dp"
app:tint="?attr/colorOnBackground"
android:src="@drawable/ic_thumb_up_border" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:baselineAligned="false"
android:text="@string/AVERAGE" android:gravity="center"
android:textColor="?attr/colorPrimary" android:orientation="horizontal">
android:textSize="@dimen/textSizeInEditText"
android:textStyle="bold" /> <!-- Good Rating -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="8dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="24dp"
app:cardElevation="2dp"
app:cardBackgroundColor="@android:color/transparent">
<ImageView
android:id="@+id/ivThumbsUp"
android:layout_width="@dimen/image_icon_width"
android:layout_height="@dimen/image_icon_height"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="Thumbs Up"
android:focusable="true"
android:padding="12dp"
app:tint="@color/green"
android:src="@drawable/ic_thumb_up_border" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:text="@string/GOOD"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/textSizeInEditText"
android:textStyle="bold" />
</LinearLayout>
<!-- Average Rating -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="8dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="24dp"
app:cardElevation="2dp"
app:cardBackgroundColor="@android:color/transparent">
<ImageView
android:id="@+id/ivThumbsAverage"
android:layout_width="@dimen/image_icon_width"
android:layout_height="@dimen/image_icon_height"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="Thumbs Average"
android:focusable="true"
android:rotation="260"
android:padding="12dp"
app:tint="@color/yellow"
android:src="@drawable/ic_thumb_up_border" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:text="@string/AVERAGE"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/textSizeInEditText"
android:textStyle="bold" />
</LinearLayout>
<!-- Bad Rating -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="8dp">
<com.google.android.material.card.MaterialCardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cardCornerRadius="24dp"
app:cardElevation="2dp"
app:cardBackgroundColor="@android:color/transparent">
<ImageView
android:id="@+id/ivThumbsDown"
android:layout_width="@dimen/image_icon_width"
android:layout_height="@dimen/image_icon_height"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="Thumbs Down"
android:focusable="true"
android:padding="12dp"
app:tint="@color/red"
android:src="@drawable/ic_thumb_down_border" />
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:text="@string/BAD"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/textSizeInEditText"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<Space
android:layout_width="@dimen/edit_text_padding"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/ivThumbsDown"
android:layout_width="@dimen/image_icon_width"
android:layout_height="@dimen/image_icon_height"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:contentDescription="Thumbs Down"
android:focusable="true"
android:padding="8dp"
app:tint="?attr/colorOnBackground"
android:src="@drawable/ic_thumb_down_border" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/BAD"
android:textColor="?attr/colorPrimary"
android:textSize="@dimen/textSizeInEditText"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<androidx.appcompat.widget.AppCompatButton <!-- Submit Button Container -->
android:id="@+id/btnSubmit" <FrameLayout
android:id="@+id/btnSubmitContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:background="?attr/colorPrimary" android:background="@android:color/white"
android:backgroundTintMode="src_atop" android:elevation="8dp"
android:text="@string/SUBMIT" android:padding="16dp">
android:textColor="?attr/colorOnPrimary"
tools:ignore="HardcodedText" <com.google.android.material.button.MaterialButton
/> android:id="@+id/btnSubmit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:text="@string/SUBMIT"
android:textStyle="bold"
app:cornerRadius="8dp"
tools:ignore="HardcodedText" />
</FrameLayout>
</RelativeLayout> </RelativeLayout>

View File

@ -15,86 +15,162 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/toolbar" android:layout_below="@id/toolbar"
android:layout_centerInParent="true"
android:fillViewport="true" android:fillViewport="true"
android:padding="@dimen/layout_padding"> android:clipToPadding="false"
android:padding="24dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.material.textfield.TextInputLayout <!-- Logo and Welcome Section -->
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" <ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginBottom="24dp"
android:src="@drawable/logo_add_location"
android:contentDescription="App Logo" />
<TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:text="@string/welcome_back"
app:startIconDrawable="@drawable/ic_email"> android:textAlignment="center"
android:textSize="28sp"
android:textStyle="bold"
android:textColor="?attr/colorPrimary"
android:layout_marginBottom="8dp" />
<com.google.android.material.textfield.TextInputEditText <TextView
android:id="@+id/etUsername" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sign_in_to_continue"
android:textAlignment="center"
android:textSize="16sp"
android:textColor="?attr/colorOnSurface"
android:alpha="0.7"
android:layout_marginBottom="32dp" />
<!-- Login Form Card -->
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="16dp"
app:cardElevation="4dp"
android:layout_marginBottom="24dp">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Username" android:orientation="vertical"
android:importantForAutofill="no" android:padding="24dp">
android:inputType="textPersonName" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <!-- Username Field -->
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:layout_marginTop="@dimen/layout_padding" android:layout_height="wrap_content"
app:passwordToggleEnabled="true" android:layout_marginBottom="16dp"
app:startIconDrawable="@drawable/ic_lock"> app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary"
app:startIconDrawable="@drawable/ic_email"
app:startIconTint="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPassword" android:id="@+id/etUsername"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Password" android:hint="@string/Enter_Username"
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="textPassword" /> android:inputType="textPersonName"
android:paddingTop="16dp"
android:paddingBottom="16dp" />
</com.google.android.material.textfield.TextInputLayout>
</com.google.android.material.textfield.TextInputLayout> <!-- Password Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary"
app:passwordToggleEnabled="true"
app:passwordToggleTint="?attr/colorPrimary"
app:startIconDrawable="@drawable/ic_lock"
app:startIconTint="?attr/colorPrimary">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.textfield.TextInputEditText
android:id="@+id/btnLogin" android:id="@+id/etPassword"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:hint="@string/Enter_Password"
android:background="?attr/colorPrimary" android:importantForAutofill="no"
android:backgroundTintMode="src_atop" android:inputType="textPassword"
android:text="@string/LOGIN" android:paddingTop="16dp"
android:textColor="?attr/colorOnPrimary" android:paddingBottom="16dp" />
android:textSize="@dimen/textSizeInEditText" /> </com.google.android.material.textfield.TextInputLayout>
<!-- Forgot Password Link -->
<TextView
android:id="@+id/tvForgotPassword"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="Forgot Password?"
android:textColor="?attr/colorPrimary"
android:textSize="14sp"
android:layout_marginBottom="24dp"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="4dp" />
<!-- Login Button -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="14dp"
android:paddingBottom="14dp"
android:text="@string/LOGIN"
android:textSize="16sp"
android:textStyle="bold"
app:cornerRadius="12dp"
app:elevation="2dp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<!-- Registration Link -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal"> android:orientation="horizontal"
android:gravity="center"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="8dp">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:text="@string/Dont_have_an_Account"
android:text="@string/Dont_have_an_Account" /> android:textSize="14sp" />
<TextView <TextView
android:id="@+id/tvRegisterRedirect" android:id="@+id/tvRegisterRedirect"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="@dimen/small_content_padding"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:layout_marginStart="4dp"
android:text="@string/Please_register" android:text="@string/Please_register"
android:textColor="?attr/colorPrimary" android:textColor="?attr/colorPrimary"
android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</RelativeLayout> </RelativeLayout>

View File

@ -1,128 +1,219 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <com.google.android.material.card.MaterialCardView
android:id="@+id/llInput"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/layout_padding" android:layout_margin="16dp"
android:orientation="vertical"> app:cardCornerRadius="12dp"
app:cardElevation="4dp">
<ImageView <LinearLayout
android:id="@+id/ivPlacePhoto" android:id="@+id/llInput"
android:layout_width="@dimen/image_view_width"
android:layout_height="@dimen/image_view_height"
android:layout_gravity="center"
android:layout_margin="@dimen/layout_padding"
android:background="@drawable/rectangle"
android:importantForAccessibility="no"
android:importantForAutofill="no"
android:padding="@dimen/content_padding"
android:src="@drawable/logo_add_location" />
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:orientation="vertical"
app:startIconDrawable="@drawable/ic_location"> android:padding="16dp">
<com.google.android.material.textfield.TextInputEditText <!-- Header -->
android:id="@+id/etPlaceName" <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Place_Name" android:text="@string/add_new_location"
android:importantForAutofill="no" android:textSize="24sp"
android:inputType="text" android:textStyle="bold"
tools:ignore="HardcodedText" /> android:textColor="?attr/colorPrimary"
</com.google.android.material.textfield.TextInputLayout> android:gravity="center"
android:layout_marginBottom="16dp"/>
<com.google.android.material.textfield.TextInputLayout <!-- Location Image with improved container -->
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" <com.google.android.material.card.MaterialCardView
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding" android:layout_gravity="center"
app:startIconDrawable="@drawable/ic_location"> app:cardCornerRadius="8dp"
app:strokeWidth="1dp"
app:strokeColor="?attr/colorPrimary"
app:cardElevation="0dp">
<com.google.android.material.textfield.TextInputEditText <ImageView
android:id="@+id/etLatitude" android:id="@+id/ivPlacePhoto"
android:layout_width="@dimen/image_view_width"
android:layout_height="@dimen/image_view_height"
android:padding="@dimen/content_padding"
android:src="@drawable/logo_add_location"
android:background="@drawable/rectangle"
android:importantForAccessibility="no"
android:importantForAutofill="no" />
</com.google.android.material.card.MaterialCardView>
<TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Latitude" android:text="@string/tap_to_add_photo"
android:importantForAutofill="no" android:textSize="12sp"
android:inputType="text" android:gravity="center"
android:focusable="false" android:layout_marginTop="4dp"
tools:ignore="HardcodedText" /> android:layout_marginBottom="16dp"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <!-- Place Name Field with improved styling -->
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding"
app:startIconDrawable="@drawable/ic_location">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etLongitude"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Longitude" android:layout_marginTop="8dp"
android:importantForAutofill="no" android:layout_marginBottom="8dp"
android:inputType="text" app:startIconDrawable="@drawable/ic_location"
android:focusable="false" app:startIconTint="?attr/colorPrimary"
tools:ignore="HardcodedText" /> app:boxStrokeColor="?attr/colorPrimary"
</com.google.android.material.textfield.TextInputLayout> app:hintTextColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputEditText
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" android:id="@+id/etPlaceName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="39dp"
android:layout_marginTop="@dimen/layout_padding" android:hint="@string/Enter_Place_Name"
app:startIconDrawable="@drawable/ic_location"> android:importantForAutofill="no"
android:inputType="text"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputEditText <!-- Location Section Header -->
android:id="@+id/etAddress" <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Address" android:text="@string/location_details"
android:importantForAutofill="no" android:textSize="16sp"
android:inputType="textImeMultiLine" android:textStyle="bold"
android:maxLines="4" android:layout_marginTop="16dp"
tools:ignore="HardcodedText" /> android:layout_marginBottom="8dp"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout <!-- Coordinates Container -->
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_padding"
app:startIconDrawable="@drawable/ic_location">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPlaceDescription"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/Enter_Place_Description" android:baselineAligned="false"
android:importantForAutofill="no" android:orientation="horizontal">
android:inputType="textImeMultiLine"
android:maxLines="5" <!-- Latitude Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="4dp"
app:startIconDrawable="@drawable/ic_location"
app:startIconTint="?attr/colorPrimary"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etLatitude"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/Enter_Latitude"
android:inputType="text"
android:focusable="false"
android:importantForAutofill="no"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<!-- Longitude Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="4dp"
app:startIconDrawable="@drawable/ic_location"
app:startIconTint="?attr/colorPrimary"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etLongitude"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/Enter_Longitude"
android:inputType="text"
android:focusable="false"
android:importantForAutofill="no"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<!-- Address Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:startIconDrawable="@drawable/ic_location"
app:startIconTint="?attr/colorPrimary"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etAddress"
android:layout_width="match_parent"
android:layout_height="38dp"
android:hint="@string/Enter_Address"
android:importantForAutofill="no"
android:inputType="textImeMultiLine"
android:maxLines="4"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<!-- Description Section Header -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/additional_information"
android:textSize="16sp"
android:textStyle="bold"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"/>
<!-- Description Field -->
<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:startIconDrawable="@drawable/ic_location"
app:startIconTint="?attr/colorPrimary"
app:boxStrokeColor="?attr/colorPrimary"
app:hintTextColor="?attr/colorPrimary">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/etPlaceDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/Enter_Place_Description"
android:inputType="textImeMultiLine"
android:minLines="3"
android:maxLines="5"
android:importantForAutofill="no"
tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout>
<!-- Submit Button with improved styling -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnSubmit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:text="@string/SUBMIT"
android:textStyle="bold"
app:cornerRadius="8dp"
app:elevation="2dp"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
</com.google.android.material.textfield.TextInputLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btnSubmit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:backgroundTintMode="src_atop"
android:layout_marginTop="@dimen/layout_padding"
android:text="@string/SUBMIT"
android:textColor="?attr/colorOnPrimary"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout> </RelativeLayout>

View File

@ -150,6 +150,11 @@
<!-- <string name="Logout">Logout</string>--> <!-- <string name="Logout">Logout</string>-->
<string name="google_maps_api_key">AIzaSyCzcuZhHd-GqadewAiCbh4NuaBhO2AcPOY</string> <string name="google_maps_api_key">AIzaSyCzcuZhHd-GqadewAiCbh4NuaBhO2AcPOY</string>
<string name="add_new_location">Add New Location</string>
<string name="add_report">Rate this place!</string>
<string name="how_would_you_rate_this_place">How would you rate the accessibility of this place?</string>
<string name="welcome_back">Welcome Back</string>
<string name="sign_in_to_continue">Sign in to continue</string>
</resources> </resources>

View File

@ -153,6 +153,14 @@
<string name="google_maps_api_key">AIzaSyCzcuZhHd-GqadewAiCbh4NuaBhO2AcPOY</string> <string name="google_maps_api_key">AIzaSyCzcuZhHd-GqadewAiCbh4NuaBhO2AcPOY</string>
<string name="add_new_location">Add New Location</string>
<string name="tap_to_add_photo">Tap to add photo</string>
<string name="location_details">Location Details</string>
<string name="additional_information">Additional Information</string>
<string name="add_report">Rate this place!</string>
<string name="how_would_you_rate_this_place">How would you rate the accessibility of this place?</string>
<string name="welcome_back">Welcome Back</string>
<string name="sign_in_to_continue">Sign in to continue</string>
</resources> </resources>