Feature/localised image descriptions (#1634)

* wip

* Changes for adding descriptions in multipe languages[issue #1501]

* Added callback for the adapter

* Codacy suggested changes

* Sort the languages in the spinner in alphabetical order

* scroll view nested scrolling enabled false

* Nested scrolling enabled false [Allow rv to expand]

* rebased to master, resolved conflicts

* replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]

*     replaced setCompoundDrawables with setCompoundDrawablesWithIntrinsicBounds [the former dint used to work on all devices]
This commit is contained in:
Ashish Kumar 2018-08-03 18:09:37 +05:30 committed by Vivek Maskara
parent e4c518ccce
commit 12a83da3a2
12 changed files with 622 additions and 122 deletions

View file

@ -12,6 +12,7 @@
android:paddingRight="@dimen/standard_gap"
android:paddingStart="@dimen/standard_gap"
android:paddingTop="@dimen/small_gap"
android:nestedScrollingEnabled="false"
android:theme="@style/DarkAppTheme">
<LinearLayout
@ -38,40 +39,36 @@
android:scrollHorizontally="false" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/descEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableEnd="@drawable/mapbox_info_icon_default"
android:drawableRight="@drawable/mapbox_info_icon_default"
android:hint="@string/share_description_hint"
android:imeOptions="flagNoExtractUi"
android:inputType="textMultiLine" />
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<Spinner
android:id="@+id/licenseSpinner"
android:layout_width="0dp"
android:layout_weight="15"
android:layout_height="wrap_content"
android:theme="?attr/spinnerTheme" />
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_descriptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_marginTop="4dp"
android:orientation="horizontal"
android:id="@+id/ll_add_description"
android:layout_width="wrap_content"
android:layout_gravity="right"
android:gravity="right"
android:padding="10dp"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:id="@+id/licenseInfo"
android:layout_height="wrap_content"
android:text="(?)"
android:textColor="@color/primaryTextColor"/>
style="@style/TextAppearance.AppCompat.Body1"
android:text="@string/add_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
<Spinner
android:id="@+id/licenseSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="?attr/spinnerTheme" />
<Button
android:id="@+id/titleDescButton"