[GSoC 2022] Improve custom picker (all features) (#5035)

* Project Initiated by creating helper classes for database operations

* Database created

* Rest of the work and documentation

* Requested changes done

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* [GSoC] Insert and Remove Images from not for upload (#4999)

* Inserted and marked images as not for upload

* Documentation added

* Test delete

* Implemented remove from not for upload

* Test fixed

* Requested changes done

* Added tests for new lines in existing classes

* [GSoC] Added Bubble Scroll (#5023)

* Library added

* Bubble scroll implemented

* Left and right swipe

* Requested changes

* [GSoC] Hide/Unhide actioned pictures and change numbering (#5012)

* Changed numbering of marked images

* Hide Unhide implemented

* Test fixed

* Improved speed for database operation

* Improved speed for database operation

* Changed progress dialog

* Improved hiding speed

* Test fixed

* Fixed bug

* Fixed bug and improved performance

* Fixed bug and improved performance

* Test fixed

* Bug fixed

* Bug fixed

* Bug fixed

* Bug fixed

* Bug fixed

* Code clean up

* Test hiding images

* Test hiding images

* Test hiding images

* Code clean up and test fixed

* Fixed layout

* Fixed bug

* Bug fixed

* Renamed method

* Documentation added explaining logic

* Documentation added explaining logic

* [GSoC] Full Screen Mode (#5032)

* Gesture detection implemented

* Left and right swipe

* Selection implemented

* onDown implemented

* onDown implemented

* FS mode implemented

* OnSwipe doc

* Scope cancel

* Added label in Manifest

* Merged two features

* Requested changes

* Image uploaded bug fixed

* Increased DB version

* Made requested changes

* Made requested changes

* Made requested changes

* Made requested changes

* Solved image flashing bug

* Solved image flashing bug

* Requested changes

* Requested changes

* Changed name of a function

* Fixed transaction failure on large number of images

* Tested with isIdentity

* Tested with isIdentity

* Increased the threshold

* Added info dialog

* Minor changes

* ImageAdapter Test

* CustomSelectorActivity Test

* Requested changes

* Test for ZoomableActivity

* Test for ZoomableActivity

* Test for ImageLoader

* Test for OnSwipeTouchListener

* Test for rest

* Reverted some test changes

* Added more tests for ImageAdapter

* Added more tests for ImageAdapter and swipe gesture

Co-authored-by: translatewiki.net <l10n-bot@translatewiki.net>
This commit is contained in:
Ayan Sarkar 2022-09-16 14:44:16 +05:30 committed by GitHub
parent b5ffe7120c
commit 33679eb6b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 2560 additions and 284 deletions

View file

@ -13,7 +13,12 @@
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_layout"
app:layout_constraintTop_toBottomOf="@+id/toolbar_layout"/>
<include
layout="@layout/custom_selector_bottom_layout"
android:id="@+id/bottom_sheet"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -23,4 +23,21 @@
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:id="@+id/selection_count"
android:layout_width="@dimen/dimen_20"
android:layout_height="@dimen/dimen_20"
app:layout_constraintDimensionRatio="H,1:1"
android:textSize="@dimen/subtitle_text"
android:textStyle="bold"
android:textColor="@color/black"
android:layout_margin="@dimen/dimen_6"
android:gravity="center|center_vertical"
style="@style/TextAppearance.AppCompat.Small"
android:text="12"
android:visibility="gone"
android:background="@drawable/circle_shape"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottom_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/not_for_upload"
android:layout_width="@dimen/dimen_0"
android:layout_height="wrap_content"
android:text="@string/mark_as_not_for_upload"
android:textColor="@color/white"
android:visibility="visible"
android:layout_margin="@dimen/dimen_5"
app:layout_constraintBottom_toBottomOf="@id/bottom_layout"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@id/bottom_layout"
app:layout_constraintTop_toTopOf="@id/bottom_layout" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<Button
android:id="@+id/upload"
android:layout_width="@dimen/dimen_0"
android:layout_height="@dimen/dimen_0"
android:text="@string/upload"
android:textColor="@color/white"
android:visibility="visible"
android:layout_margin="@dimen/dimen_5"
app:layout_constraintBottom_toBottomOf="@id/bottom_layout"
app:layout_constraintEnd_toEndOf="@id/bottom_layout"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toTopOf="@id/bottom_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>
</merge>

View file

@ -28,8 +28,9 @@
android:textAlignment="center"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dimen_20"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintEnd_toStartOf="@id/done"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:singleLine="true"
@ -37,20 +38,5 @@
android:text="@string/custom_selector_title"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title" />
<ImageButton
android:id="@+id/done"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:clickable="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:focusable="true"
android:padding="@dimen/standard_gap"
app:srcCompat="?attr/custom_selector_done"
android:visibility="invisible"
android:contentDescription="@string/done" />
</androidx.constraintlayout.widget.ConstraintLayout>
</merge>

View file

@ -3,13 +3,37 @@
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">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/mainBackground">
<androidx.recyclerview.widget.RecyclerView
<Switch
android:id="@+id/switchWidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="@string/show_already_actioned_pictures"
android:padding="@dimen/dimen_10"
android:checked="true" />
<com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
android:id="@+id/selector_rv"
android:background="?attr/mainBackground"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/mainBackground"
android:layout_height="@dimen/dimen_0"
app:fastScrollPopupBgColor="@color/primaryColor"
app:fastScrollPopupTextColor="@android:color/primary_text_dark"
app:fastScrollPopupTextSize="@dimen/subheading_text_size"
app:fastScrollPopupBackgroundSize="@dimen/bubble_size"
app:fastScrollThumbColor="@color/primaryColor"
app:fastScrollTrackColor="@color/upload_overlay_background_light"
app:fastScrollPopupPosition="adjacent"
app:layout_constraintBottom_toTopOf="@id/progressLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/switchWidget"
/>
<TextView
@ -38,4 +62,41 @@
app:layout_constraintStart_toStartOf="parent"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/progressLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/dimen_5"
android:background="@color/drawerHeader_background_light"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/selector_rv">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hiding_already_actioned_pictures"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:gravity="center"
android:padding="@dimen/dimen_5"/>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="visible"
app:layout_constraintTop_toBottomOf="@id/text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="@dimen/dimen_10">
<ScrollView
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/welcome_to_full_screen_mode_text"
android:textSize="@dimen/normal_text"
android:textStyle="bold"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/dimen_10"
android:text="@string/full_screen_mode_zoom_info"
android:textSize="@dimen/description_text_size"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dimen_10"
android:layout_marginEnd="@dimen/dimen_10"
android:layout_marginStart="@dimen/dimen_10"
android:text="@string/full_screen_mode_features_info"
android:textSize="@dimen/description_text_size"
android:textStyle="bold"/>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn_ok"
android:layout_marginHorizontal="@dimen/dimen_40"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:text="@string/welcome_custom_selector_ok"
/>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -82,6 +82,23 @@
android:visibility="gone"
app:constraint_referenced_ids="uploaded_overlay,uploaded_overlay_icon"/>
<ImageView
android:id="@+id/not_for_upload_overlay_icon"
android:layout_width="@dimen/dimen_50"
android:layout_height="@dimen/dimen_50"
android:paddingBottom="@dimen/dimen_20"
android:paddingEnd="@dimen/dimen_20"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:srcCompat="@drawable/not_for_upload"
/>
<androidx.constraintlayout.widget.Group
android:id="@+id/not_for_upload_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="selected_overlay,not_for_upload_overlay_icon"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>