Added an option to Remove a new language description while uploading (#4406)

* implementation done modification required in card & more

* Remove button reversed

* Code beautification done

* Code beautification done

* minor issues fixed

* java docs added
This commit is contained in:
Ayan Sarkar 2021-05-15 05:44:29 +05:30 committed by GitHub
parent 4b7e75c42c
commit a78fea09d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 120 additions and 85 deletions

View file

@ -1,53 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="8">
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="8dp"
android:layout_marginVertical="8dp"
app:elevation="6dp">
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/spinner_description_languages"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:minWidth="@dimen/tiny_height"
android:padding="@dimen/dimen_0"
android:spinnerMode="dialog" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="8">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/caption_item_edit_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="20dp"
android:layout_marginVertical="20dp">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/caption_item_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/share_caption_hint"
android:imeOptions="actionNext|flagNoExtractUi"
android:inputType="textMultiLine"
android:maxLength="255" />
</com.google.android.material.textfield.TextInputLayout>
<ImageView
android:id="@+id/btn_remove"
android:layout_width="24dp"
android:layout_height="wrap_content"
android:contentDescription="@string/remove"
android:visibility="visible"
app:layout_constraintBottom_toTopOf="@+id/caption_item_edit_text_input_layout"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_remove" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/description_item_edit_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<Spinner
android:id="@+id/spinner_description_languages"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnerMode="dialog"
app:layout_constraintBottom_toTopOf="@+id/caption_item_edit_text_input_layout"
app:layout_constraintStart_toStartOf="parent" />
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/description_item_edit_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/share_description_hint"
android:imeOptions="actionNext|flagNoExtractUi"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/caption_item_edit_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/description_item_edit_text_input_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
</LinearLayout>
</LinearLayout>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/caption_item_edit_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/share_caption_hint"
android:imeOptions="actionNext|flagNoExtractUi"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/description_item_edit_text_input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/description_item_edit_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:hint="@string/share_description_hint"
android:imeOptions="actionNext|flagNoExtractUi"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>