Better ui experience for user and more string resources
This commit is contained in:
parent
6012256a17
commit
01a15466c0
|
|
@ -14,175 +14,308 @@
|
|||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@id/btnSubmit"
|
||||
android:layout_above="@id/btnSubmitContainer"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:fillViewport="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:padding="@dimen/layout_padding">
|
||||
android:clipToPadding="false"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivReportPhoto"
|
||||
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"
|
||||
<!-- Report Form Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etPlaceName"
|
||||
<LinearLayout
|
||||
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>
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
<!-- Header -->
|
||||
<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_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etDescription"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Description"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textImeMultiLine"
|
||||
android:maxLines="5"
|
||||
tools:ignore="HardcodedText" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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"
|
||||
<!-- Rating Header -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/GOOD"
|
||||
android:text="@string/how_would_you_rate_this_place"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="@dimen/textSizeInEditText"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
android:textAlignment="center"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<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/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"
|
||||
<!-- Rating Options -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/AVERAGE"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="@dimen/textSizeInEditText"
|
||||
android:textStyle="bold" />
|
||||
android:baselineAligned="false"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<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>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnSubmit"
|
||||
<!-- Submit Button Container -->
|
||||
<FrameLayout
|
||||
android:id="@+id/btnSubmitContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:backgroundTintMode="src_atop"
|
||||
android:text="@string/SUBMIT"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
tools:ignore="HardcodedText"
|
||||
/>
|
||||
android:background="@android:color/white"
|
||||
android:elevation="8dp"
|
||||
android:padding="16dp">
|
||||
|
||||
<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>
|
||||
|
|
@ -15,86 +15,162 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_centerInParent="true"
|
||||
android:fillViewport="true"
|
||||
android:padding="@dimen/layout_padding">
|
||||
android:clipToPadding="false"
|
||||
android:padding="24dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
<!-- Logo and Welcome Section -->
|
||||
<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_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_email">
|
||||
android:text="@string/welcome_back"
|
||||
android:textAlignment="center"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:layout_marginBottom="8dp" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etUsername"
|
||||
<TextView
|
||||
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_height="wrap_content"
|
||||
android:hint="@string/Enter_Username"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textPersonName" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<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="@dimen/layout_padding"
|
||||
app:passwordToggleEnabled="true"
|
||||
app:startIconDrawable="@drawable/ic_lock">
|
||||
<!-- Username 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="16dp"
|
||||
app:boxStrokeColor="?attr/colorPrimary"
|
||||
app:hintTextColor="?attr/colorPrimary"
|
||||
app:startIconDrawable="@drawable/ic_email"
|
||||
app:startIconTint="?attr/colorPrimary">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Password"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textPassword" />
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etUsername"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Username"
|
||||
android:importantForAutofill="no"
|
||||
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
|
||||
android:id="@+id/btnLogin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_padding"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:backgroundTintMode="src_atop"
|
||||
android:text="@string/LOGIN"
|
||||
android:textColor="?attr/colorOnPrimary"
|
||||
android:textSize="@dimen/textSizeInEditText" />
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etPassword"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Password"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textPassword"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp" />
|
||||
</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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="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
|
||||
android:layout_width="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
|
||||
android:id="@+id/tvRegisterRedirect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginStart="@dimen/small_content_padding"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_padding"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="@string/Please_register"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,128 +1,219 @@
|
|||
<?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:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llInput"
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/layout_padding"
|
||||
android:orientation="vertical">
|
||||
android:layout_margin="16dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPlacePhoto"
|
||||
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"
|
||||
<LinearLayout
|
||||
android:id="@+id/llInput"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etPlaceName"
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Place_Name"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
tools:ignore="HardcodedText" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:text="@string/add_new_location"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:gravity="center"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<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="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
<!-- Location Image with improved 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">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etLatitude"
|
||||
<ImageView
|
||||
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_height="wrap_content"
|
||||
android:hint="@string/Enter_Latitude"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
android:focusable="false"
|
||||
tools:ignore="HardcodedText" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:text="@string/tap_to_add_photo"
|
||||
android:textSize="12sp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="16dp"/>
|
||||
|
||||
<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="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etLongitude"
|
||||
<!-- Place Name Field with improved styling -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Longitude"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="text"
|
||||
android:focusable="false"
|
||||
tools:ignore="HardcodedText" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:startIconDrawable="@drawable/ic_location"
|
||||
app:startIconTint="?attr/colorPrimary"
|
||||
app:boxStrokeColor="?attr/colorPrimary"
|
||||
app:hintTextColor="?attr/colorPrimary">
|
||||
|
||||
<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="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etPlaceName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="39dp"
|
||||
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.TextInputEditText
|
||||
android:id="@+id/etAddress"
|
||||
<!-- Location Section Header -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Address"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textImeMultiLine"
|
||||
android:maxLines="4"
|
||||
tools:ignore="HardcodedText" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:text="@string/location_details"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<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="@dimen/layout_padding"
|
||||
app:startIconDrawable="@drawable/ic_location">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etPlaceDescription"
|
||||
<!-- Coordinates Container -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/Enter_Place_Description"
|
||||
android:importantForAutofill="no"
|
||||
android:inputType="textImeMultiLine"
|
||||
android:maxLines="5"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 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" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<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>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</RelativeLayout>
|
||||
|
|
@ -150,6 +150,11 @@
|
|||
<!-- <string name="Logout">Logout</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>
|
||||
|
|
@ -153,6 +153,14 @@
|
|||
|
||||
|
||||
<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>
|
||||
Loading…
Reference in New Issue