Fix 4615: Option for editing caption and description (#4672)

* DescriptionEditHelper implemented

* Description extracted

* Description editable

* No description condition handled

* Code cleanup

* Added javadocs

* toolbar added

* API call done

* Caption edit available

* Progress dialog added

* Log

* Problem with ButterKnife

* Caption is editable

* Removed unused import

* Manifest file reverted

* Manifest file reverted

* Manifest file reverted

* View binding added

* Post operation test added

* Java docs added

* Java docs added

* MediaDetailFragment unit tests added

* Test added
This commit is contained in:
Ayan Sarkar 2021-12-07 01:20:54 +05:30 committed by GitHub
parent e910b1d14f
commit 0269894c64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 855 additions and 14 deletions

View file

@ -204,16 +204,44 @@
android:textSize="@dimen/description_text_size"
android:textIsSelectable="true"
tools:text="Description of the media goes here. This can potentially be fairly long, and will need to wrap across multiple lines. We hope it looks nice though." />
</LinearLayout>
<TextView
android:id="@+id/show_caption_description_textview"
style="@style/MediaDetailTextLabelGeneric"
<LinearLayout
android:paddingStart="@dimen/quarter_standard_height"
android:paddingEnd="@dimen/quarter_standard_height"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen_10"
android:text="@string/media_detail_in_all_languages" />
android:orientation="horizontal">
<TextView
android:id="@+id/show_caption_description_textview"
style="@style/MediaDetailTextLabelGeneric"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen_10"
android:text="@string/media_detail_in_all_languages" />
<Button
android:id="@+id/description_edit"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end"
android:background="@drawable/ic_baseline_edit_24" />
<ProgressBar
android:id="@+id/progressBarEdit"
style="?android:progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/tiny_gap"
android:layout_marginRight="@dimen/tiny_gap"
android:layout_gravity="center_vertical|end"
android:indeterminate="true"
android:indeterminateOnly="true"
android:visibility="gone"
tools:visibility="visible"/>
</LinearLayout>
<View
android:background="?attr/mediaDetailSpacerColor"