From a860e28a5d7681d72847c56bd0119f0b575b55f4 Mon Sep 17 00:00:00 2001 From: konstzv Date: Thu, 4 Oct 2018 12:33:00 +0300 Subject: [PATCH] #452 - Few issues in Bottom sheet (#455) --- .../createpdf/util/BottomSheetUtils.java | 7 ++++++- app/src/main/res/layout/bottom_sheet.xml | 21 ++++++++++++++++--- app/src/main/res/layout/item_merge_files.xml | 5 +++-- app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-ja/strings.xml | 1 + app/src/main/res/values/attrs.xml | 1 + app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/styles.xml | 3 +++ 9 files changed, 35 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/swati4star/createpdf/util/BottomSheetUtils.java b/app/src/main/java/swati4star/createpdf/util/BottomSheetUtils.java index 3ec0db8dd..376350d20 100644 --- a/app/src/main/java/swati4star/createpdf/util/BottomSheetUtils.java +++ b/app/src/main/java/swati4star/createpdf/util/BottomSheetUtils.java @@ -9,6 +9,7 @@ import java.util.ArrayList; +import swati4star.createpdf.R; import swati4star.createpdf.adapter.MergeFilesAdapter; import swati4star.createpdf.interfaces.BottomSheetPopulate; @@ -16,6 +17,7 @@ public class BottomSheetUtils implements BottomSheetPopulate { private Activity mContext; + public BottomSheetUtils(Activity context) { this.mContext = context; } @@ -28,6 +30,7 @@ public void showHideSheet(BottomSheetBehavior sheetBehavior) { } } + private View mFetchingFilesLabel; RelativeLayout bottomSheetLayout; RecyclerView recyclerView; MergeFilesAdapter.OnClickListener listener; @@ -38,6 +41,8 @@ public void populateBottomSheetWithPDFs(RelativeLayout bottomSheetLayout, this.bottomSheetLayout = bottomSheetLayout; this.recyclerView = recyclerView; this.listener = listener; + mFetchingFilesLabel = bottomSheetLayout.getRootView().findViewById(R.id.fetching); + new PopulateBottomSheetList(this, new DirectoryUtils(mContext)).execute(); } @@ -56,6 +61,6 @@ public void onPopulate(ArrayList paths) { recyclerView.setAdapter(mergeFilesAdapter); recyclerView.addItemDecoration(new ViewFilesDividerItemDecoration(mContext)); } - + mFetchingFilesLabel.setVisibility(View.GONE); } } diff --git a/app/src/main/res/layout/bottom_sheet.xml b/app/src/main/res/layout/bottom_sheet.xml index 56cffae9f..4b2ecd1a5 100644 --- a/app/src/main/res/layout/bottom_sheet.xml +++ b/app/src/main/res/layout/bottom_sheet.xml @@ -48,9 +48,24 @@ app:srcCompat="@drawable/ic_arrow_up_black_24dp" /> - + android:layout_height="wrap_content"> + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_merge_files.xml b/app/src/main/res/layout/item_merge_files.xml index adc33fdf9..8558364fe 100644 --- a/app/src/main/res/layout/item_merge_files.xml +++ b/app/src/main/res/layout/item_merge_files.xml @@ -26,7 +26,8 @@ android:layout_centerVertical="true" android:layout_marginEnd="20dp" android:contentDescription="@string/encrypted_file_text" - app:srcCompat="@drawable/ic_lock_black_24dp" - android:visibility="gone" /> + android:tint="?attr/lockIconTintColor" + android:visibility="gone" + app:srcCompat="@drawable/ic_lock_black_24dp" /> diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index bd3a9452e..5f70d4863 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -309,5 +309,6 @@ Black Are you sure you want to remove this page? We were unable to access PDF. Files may be encrypted or in the external storage. + fetching files… \ No newline at end of file diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index bcd13227f..bb561e116 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -310,5 +310,6 @@ Black Are you sure you want to remove this page? We were unable to access PDF. Files may be encrypted or in the external storage. + fetching files… \ No newline at end of file diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 1daf5df80..f5843de76 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -309,5 +309,6 @@ Black Are you sure you want to remove this page? We were unable to access PDF. Files may be encrypted or in the external storage. + fetching files… diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 9b27aaabc..68b0dbf19 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -16,5 +16,6 @@ + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cf04afdfc..b36be9024 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -390,5 +390,6 @@ 1. Select the PDF you wish to add password to. \n2. Select Add Password. \n3. Type new password. Select OK. \n4. New PDF with password be created. 1. Select the PDF you wish to remove password from. \n2. Select Remove Password. \n3. Type pdf password. Select OK. \n4. New PDF without PDF will be created. Create grayscale PDF + fetching files… diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 8c5f43463..6450270ce 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -19,6 +19,7 @@ @color/colorAccent @color/mb_white @color/windowBackground_light + @color/black