mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
This fixes the layouts to work in both left to right (LTR) and right to left (RTL) languages. Also replace two hard-coded strings in the depicts picker with proper string resources. Fixes #6502.
155 lines
6.4 KiB
XML
155 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:orientation="vertical"
|
|
android:background="?attr/mainBackground">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_above="@+id/button_divider"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="@dimen/half_standard_height"
|
|
android:layout_marginStart="@dimen/standard_gap"
|
|
android:layout_marginLeft="@dimen/standard_gap"
|
|
android:layout_marginTop="@dimen/standard_gap"
|
|
android:layout_marginEnd="@dimen/standard_gap"
|
|
android:layout_marginRight="@dimen/standard_gap"
|
|
android:layout_alignParentStart="true"
|
|
android:layout_alignParentTop="true"
|
|
android:orientation="horizontal">
|
|
<TextView
|
|
android:id="@+id/depicts_title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="@dimen/half_standard_height"
|
|
android:layout_marginEnd="@dimen/standard_gap"
|
|
android:gravity="center_vertical"
|
|
android:textSize="@dimen/normal_text"
|
|
android:textStyle="bold"
|
|
tools:text="Step 1 of 15" />
|
|
|
|
<ImageView
|
|
android:id="@+id/tooltip"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:src="@drawable/maplibre_info_icon_default" />
|
|
</LinearLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/depicts_subtitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="24dp"
|
|
android:layout_marginStart="@dimen/standard_gap"
|
|
android:layout_marginLeft="@dimen/standard_gap"
|
|
android:layout_marginTop="@dimen/tiny_gap"
|
|
android:layout_marginEnd="@dimen/standard_gap"
|
|
android:layout_marginRight="@dimen/standard_gap"
|
|
android:layout_alignParentLeft="true"
|
|
android:gravity="center_vertical"
|
|
android:textSize="@dimen/subtitle_text"
|
|
android:text="@string/upload_flow_all_images_in_set"
|
|
android:layout_below="@+id/depicts_title"
|
|
tools:text="(For all images in set)" />
|
|
|
|
<FrameLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:id="@+id/depicts_search_layout"
|
|
android:layout_marginStart="@dimen/standard_gap"
|
|
android:layout_marginLeft="@dimen/standard_gap"
|
|
android:layout_marginEnd="@dimen/standard_gap"
|
|
android:layout_marginRight="@dimen/standard_gap"
|
|
android:layout_below="@id/depicts_subtitle">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="@dimen/standard_gap"
|
|
android:hint="@string/depicts_search_text_hint"
|
|
/>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/depicts_search_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_marginBottom="@dimen/standard_gap"
|
|
android:layout_marginTop="@dimen/standard_gap"
|
|
android:layout_height="wrap_content">
|
|
|
|
<fr.free.nrw.commons.ui.PasteSensitiveTextInputEditText
|
|
android:id="@+id/depicts_search"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:imeOptions="actionSearch"
|
|
android:inputType="text"
|
|
android:maxLines="1"
|
|
app:allowFormatting="false" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<ProgressBar
|
|
android:id="@+id/depictsSearchInProgress"
|
|
style="?android:progressBarStyleSmall"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/tiny_gap"
|
|
android:layout_gravity="center_vertical|end"
|
|
android:indeterminate="true"
|
|
android:indeterminateOnly="true"
|
|
android:visibility="gone"
|
|
tools:visibility="visible" />
|
|
</FrameLayout>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/depicts_recycler_view"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginStart="@dimen/standard_gap"
|
|
android:layout_marginLeft="@dimen/standard_gap"
|
|
android:layout_marginEnd="@dimen/standard_gap"
|
|
android:layout_marginRight="@dimen/standard_gap"
|
|
android:layout_above="@+id/button_divider"
|
|
android:scrollbars="vertical"
|
|
android:fadeScrollbars="false"
|
|
android:scrollbarThumbVertical="@color/primaryColor"
|
|
android:scrollbarSize="@dimen/dimen_6"
|
|
android:layout_below="@id/depicts_search_layout" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:id="@+id/button_divider"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:layout_above="@+id/navigation_buttons_container"
|
|
android:background="@color/divider_grey" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/navigation_buttons_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="@dimen/medium_padding"
|
|
android:paddingVertical="@dimen/small_padding"
|
|
android:layout_alignParentBottom="true"
|
|
android:gravity="end">
|
|
<Button
|
|
android:id="@+id/depicts_previous"
|
|
style="@style/Widget.AppCompat.Button.Borderless"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/standard_gap"
|
|
android:contentDescription="@string/previous"
|
|
android:text="@string/previous" />
|
|
|
|
<Button
|
|
android:id="@+id/depicts_next"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:contentDescription="@string/next"
|
|
android:text="@string/next"
|
|
android:textColor="@android:color/white" />
|
|
</LinearLayout>
|
|
</RelativeLayout>
|