mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Added pending uploads screen (#5752)
* Added pending uploads screen * Added failed uploads fragment * Improved progress bars * Implemented pause functionality * Improved pause feature * Fixed issue with sorting when adding more pictures during an upload * Improved Tap to View notification * Fixed issue with on going upload deletion * Improved the deletion feature * Fixed indentations and unit tests * Fixed bugs * Fixed failing test * Added error message in Failed Uploads Fragment * Improved error notification * Moved auto-retry from the Main Activity to UploadProgressActivity * Fixed large uploads issue * Minor fixes * Removed HashSet * Fixed issue with progress bar * Bug fixes * Moved Auto Retry to MainActivity * Fixed conflicts * Fixed issue with upload icon * Fixed null ptr issue on changing modes * Improved recycler view * Fixed irrelevant network call * Fixed irrelevant network call * Fixed constantly failing uploads * Fixed constantly failing uploads * Fixed constantly failing uploads * Added error log * Fixed refresh icon visibility in light mode * Changed progress in progress activity * Fixed progress bar issue * Improved icons * Improved deletion and removed cancelledUploads Hashset * Fixed sorting, list size issue * Improved current implementation * Implemented flag for workers * Implemented flag for workers * Fixed sorting bug * Fixed upload icon * Improved pausing * Made changes to visibility implementation * Added image duplicity check on restart of failed image * minor adjustments * added javadoc/kdoc and fixed minor bug * Fixed unit tests * Added synchronized(lock) * Added check to prevent multiple uploads starting at once * Ignored failing test cases * Temporary commit - Added jcenter * Temporary commit - Removed library/commented * Temporary commit - Removed library/commented * Updated com.jraska.livedata:testing-ktx * Ignored failing test - UploadControllerTest.kt * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadModelUnitTest * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadPresenterTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing tests - UploadRepositoryUnitTest.kt * Ignored failing test - UploadRepositoryUnitTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - DepictedItemTest.kt * Ignored failing test - FilesUtilsTest.kt * Ignored failing test - WikiBaseClientUnitTest.kt * Ignored failing test - WikiBaseClientUnitTest.kt * Ignored failing test - WikiBaseClientUnitTest.kt * Ignored failing test - WikidataClientTest.kt * Ignored failing test - WikidataClientTest.kt * Fixed unit tests * Updated kdoc --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
62d6dea219
commit
93f1e1ec29
69 changed files with 2717 additions and 955 deletions
17
app/src/main/res/drawable/ic_cancel_upload.xml
Normal file
17
app/src/main/res/drawable/ic_cancel_upload.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/mediaDetailsHeadingText"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<group
|
||||
android:scaleX="1.44427"
|
||||
android:scaleY="1.44427"
|
||||
android:translateX="-5.33124"
|
||||
android:translateY="-5.33124">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z" />
|
||||
</group>
|
||||
</vector>
|
||||
14
app/src/main/res/drawable/ic_refresh_24dp.xml
Normal file
14
app/src/main/res/drawable/ic_refresh_24dp.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="@dimen/half_standard_height"
|
||||
android:height="@dimen/half_standard_height"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<group android:scaleX="1.44427"
|
||||
android:scaleY="1.44427"
|
||||
android:translateX="-5.33124"
|
||||
android:translateY="-5.33124">
|
||||
<path
|
||||
android:fillColor="?attr/mediaDetailsHeadingText"
|
||||
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
|
||||
</group>
|
||||
</vector>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
android:viewportWidth="24.0">
|
||||
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:fillColor="@color/white"
|
||||
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
|
||||
|
||||
</vector>
|
||||
|
|
|
|||
11
app/src/main/res/drawable/ic_upload_blue_24dp.xml
Normal file
11
app/src/main/res/drawable/ic_upload_blue_24dp.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="@color/primaryDarkColor"
|
||||
android:pathData="M5,20h14v-2H5V20zM5,8h4v8h6v-8h4l-7,-7L5,8z" />
|
||||
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/ic_upload_white_24dp.xml
Normal file
12
app/src/main/res/drawable/ic_upload_white_24dp.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M5,20h14v-2H5V20zM5,8h4v8h6v-8h4l-7,-7L5,8z" />
|
||||
|
||||
</vector>
|
||||
48
app/src/main/res/layout/activity_upload_progress.xml
Normal file
48
app/src/main/res/layout/activity_upload_progress.xml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".upload.UploadProgressActivity">
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbarBinding"
|
||||
layout="@layout/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/upload_progress_toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/card_light_grey">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/upload_progress_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:background="?attr/tabBackground"
|
||||
app:tabIndicatorColor="?attr/tabIndicatorColor"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
|
||||
app:tabTextColor="?attr/tabTextColor" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<fr.free.nrw.commons.explore.ParentViewPager
|
||||
android:id="@+id/upload_progress_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/upload_progress_toolbar_layout"
|
||||
android:background="?attr/mainBackground" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -18,36 +18,6 @@
|
|||
android:layout_marginTop="@dimen/miniscule_margin"
|
||||
android:layout_margin="@dimen/very_tiny_gap"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/limited_connection_enabled_layout"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/miniscule_margin"
|
||||
android:padding="@dimen/standard_gap"
|
||||
android:orientation="vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@color/wikimedia_green">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="5dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_marginBottom="@dimen/tiny_gap"
|
||||
android:textSize="@dimen/subheading_text_size"
|
||||
android:text="@string/limited_connection_is_on"
|
||||
app:drawableTint="@color/white"
|
||||
app:drawableStartCompat="@drawable/ic_baseline_cloud_off_24"/>
|
||||
<TextView
|
||||
android:id="@+id/limited_connection_description_text_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/description_text_size"
|
||||
android:text="@string/limited_connection_explanation"/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/explore_container"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
33
app/src/main/res/layout/fragment_failed_uploads.xml
Normal file
33
app/src/main/res/layout/fragment_failed_uploads.xml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
tools:context=".upload.FailedUploadsFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nofailedTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="You do not have any failed Uploads!" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/failedUplaodsLl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/failed_uploads_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
67
app/src/main/res/layout/fragment_pending_uploads.xml
Normal file
67
app/src/main/res/layout/fragment_pending_uploads.xml
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
tools:context=".upload.PendingUploadsFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nopendingTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="You do not have any pending Uploads!"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pendingUplaodsLl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp"
|
||||
android:gravity="bottom"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Progress:"
|
||||
android:textSize="22sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progress_text_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:text=""
|
||||
android:textSize="21sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/pending_uploads_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="10dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
61
app/src/main/res/layout/item_failed_upload.xml
Normal file
61
app/src/main/res/layout/item_failed_upload.xml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?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"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fresco="http://schemas.android.com/tools"
|
||||
android:paddingBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/itemImage"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?attr/mainBackground"
|
||||
app:actualImageScaleType="centerCrop"
|
||||
fresco:placeholderImage="@drawable/ic_image_black_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="6dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="24sp"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/itemProgress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Queued"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/retryButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dimen_10"
|
||||
android:src="@drawable/ic_refresh_24dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/deleteButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_cancel_upload" />
|
||||
|
||||
</LinearLayout>
|
||||
64
app/src/main/res/layout/item_pending_upload.xml
Normal file
64
app/src/main/res/layout/item_pending_upload.xml
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:fresco="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/itemImage"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="?attr/mainBackground"
|
||||
app:actualImageScaleType="centerCrop"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
fresco:placeholderImage="@drawable/ic_image_black_24dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="6dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/deleteButton"
|
||||
app:layout_constraintStart_toEndOf="@+id/itemImage">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/titleTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="24sp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/itemProgress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/errorTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Queued"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/deleteButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_cancel_upload"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -104,40 +104,6 @@
|
|||
android:paddingTop="@dimen/standard_gap"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/pauseResumeButton"
|
||||
android:layout_width="@dimen/dimen_40"
|
||||
android:layout_height="@dimen/dimen_40"
|
||||
android:layout_marginEnd="@dimen/tiny_padding"
|
||||
android:layout_toStartOf="@id/cancelButton"
|
||||
android:background="@android:color/transparent"
|
||||
android:tag="@string/pause"
|
||||
app:srcCompat="@drawable/pause_icon" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/cancelButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="@dimen/tiny_padding"
|
||||
android:layout_toStartOf="@id/retryButton"
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:src="@drawable/ic_cancel_white"
|
||||
android:tint="?attr/contributionsListTextSecondary"
|
||||
android:text="@string/menu_cancel_upload" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/retryButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="@dimen/tiny_padding"
|
||||
android:layout_toStartOf="@id/wikipediaButton"
|
||||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:src="@drawable/ic_retry_white"
|
||||
android:tint="?attr/contributionsListTextSecondary"
|
||||
android:text="@string/menu_retry_upload" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/wikipediaButton"
|
||||
android:layout_width="48dp"
|
||||
|
|
|
|||
60
app/src/main/res/layout/pending_uploads_icon.xml
Normal file
60
app/src/main/res/layout/pending_uploads_icon.xml
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
tools:background="@color/black">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pending_uploads_image_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:gravity="center"
|
||||
app:srcCompat="?attr/upload_icon_drawable" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pending_uploads_count_badge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@id/pending_uploads_image_view"
|
||||
android:layout_alignEnd="@id/pending_uploads_image_view"
|
||||
android:layout_alignRight="@id/pending_uploads_image_view"
|
||||
android:background="@drawable/notification_badge"
|
||||
android:backgroundTint="@color/button_blue"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/miniscule_margin"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="7sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:text="9+"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uploads_error_count_badge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/pending_uploads_count_badge"
|
||||
android:layout_alignEnd="@id/pending_uploads_image_view"
|
||||
android:layout_alignRight="@id/pending_uploads_image_view"
|
||||
android:layout_marginTop="1dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:layout_marginRight="0dp"
|
||||
android:background="@drawable/notification_badge"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/miniscule_margin"
|
||||
android:textColor="?attr/notification_icon_text_color"
|
||||
android:textSize="7sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:text="9+"
|
||||
tools:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,16 +1,14 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item android:id="@+id/toggle_limited_connection_mode"
|
||||
android:title="@string/limited_connection_mode"
|
||||
app:showAsAction="always"
|
||||
android:checkable="true"
|
||||
android:icon="@drawable/ic_baseline_cloud_queue_24"
|
||||
/>
|
||||
<item android:id="@+id/notifications"
|
||||
android:title="@string/notifications"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:menuCategory="secondary"
|
||||
app:actionLayout="@layout/notification_icon"
|
||||
/>
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/upload_tab"
|
||||
android:title="Upload"
|
||||
app:actionLayout="@layout/pending_uploads_icon"
|
||||
app:showAsAction="ifRoom|withText" />
|
||||
<item
|
||||
android:id="@+id/notifications"
|
||||
android:menuCategory="secondary"
|
||||
android:title="@string/notifications"
|
||||
app:actionLayout="@layout/notification_icon"
|
||||
app:showAsAction="ifRoom|withText" />
|
||||
</menu>
|
||||
|
|
|
|||
37
app/src/main/res/menu/menu_uploads.xml
Normal file
37
app/src/main/res/menu/menu_uploads.xml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".upload.UploadProgressActivity"
|
||||
>
|
||||
<item
|
||||
android:id="@+id/resume_icon"
|
||||
android:title="Resume"
|
||||
android:icon="@drawable/play_icon"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
<item
|
||||
android:id="@+id/pause_icon"
|
||||
android:title="Pause"
|
||||
android:icon="@drawable/pause_icon"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/retry_icon"
|
||||
android:title="Retry"
|
||||
android:icon="@drawable/ic_refresh_24dp"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/cancel_icon"
|
||||
android:title="Cancel"
|
||||
android:icon="@drawable/ic_remove"
|
||||
android:orderInCategory="1"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
</menu>
|
||||
|
|
@ -42,6 +42,7 @@
|
|||
<attr name="more_bottom_sheet_drawable_color" format="reference"/>
|
||||
<attr name="card_item_color" format="reference"/>
|
||||
<attr name="notification_icon_drawable" format="reference"/>
|
||||
<attr name="upload_icon_drawable" format="reference"/>
|
||||
<attr name="notification_icon_text_color" format="reference"/>
|
||||
<attr name="toggle_theme" format="reference"/>
|
||||
<attr name="contributionsListTextSecondary" format="reference"/>
|
||||
|
|
|
|||
|
|
@ -826,5 +826,10 @@ Upload your first media by tapping on the add button.</string>
|
|||
<string name="is_at_a_different_place_please_specify_the_correct_place_below_if_possible_tell_us_the_correct_latitude_longitude">\'%1$s\' is at a different place. Please specify the correct place below, and if possible, write the correct latitude and longitude.</string>
|
||||
<string name="other_problem_or_information_please_explain_below">Other problem or information (please explain below).</string>
|
||||
<string name="feedback_destination_note">Your feedback gets posted to the following wiki page: <![CDATA[ <a href="https://commons.wikimedia.org/wiki/Commons:Mobile_app/Feedback">Commons:Mobile app/Feedback</a> ]]></string>
|
||||
<string name="are_you_sure_that_you_want_cancel_all_the_uploads">Are you sure that you want cancel all the uploads?</string>
|
||||
<string name="cancelling_all_the_uploads">Cancelling all the uploads...</string>
|
||||
<string name="uploads">Uploads</string>
|
||||
<string name="pending">Pending</string>
|
||||
<string name="failed">Failed</string>
|
||||
<string name="could_not_load_place_data">Could not load place data</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
<item name="more_bottom_sheet_style">@style/DarkMoreBottomSheetStyle</item>
|
||||
<item name="more_bottom_sheet_drawable_color">@color/white</item>
|
||||
<item name="card_item_color">@color/white</item>
|
||||
<item name="upload_icon_drawable">@drawable/ic_upload_white_24dp</item>
|
||||
<item name="notification_icon_drawable">@drawable/ic_notifications_white_24dp</item>
|
||||
<item name="notification_icon_text_color">@color/white</item>
|
||||
<item name="toggle_theme">@style/SwitchThemeDark</item>
|
||||
|
|
@ -108,6 +109,7 @@
|
|||
<item name="more_bottom_sheet_style">@style/LightMoreBottomSheetStyle</item>
|
||||
<item name="more_bottom_sheet_drawable_color">@color/black</item>
|
||||
<item name="card_item_color">@color/primaryDarkColor</item>
|
||||
<item name="upload_icon_drawable">@drawable/ic_upload_blue_24dp</item>
|
||||
<item name="notification_icon_drawable">@drawable/ic_notifications_blue_24dp</item>
|
||||
<item name="notification_icon_text_color">@color/primaryDarkColor</item>
|
||||
<item name="toggle_theme">@style/SwitchThemeLight</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue