From f707df1f6175858365de40bee3aaa8c9038b4f0f Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 10 Sep 2020 15:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E7=89=88=E5=AF=BC=E5=85=A5=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E6=94=B9=E6=88=90=E5=9B=BE=E6=A0=87,=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=AD=97=E4=BD=93=E5=A4=AA=E5=A4=A7=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E4=BA=86=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/book/read/config/BgTextConfigDialog.kt | 13 +++-- app/src/main/res/drawable/ic_export.xml | 14 +++++ app/src/main/res/drawable/ic_import.xml | 41 +++++---------- app/src/main/res/drawable/ic_share.xml | 8 +-- .../main/res/layout/dialog_read_bg_text.xml | 51 ++++++++----------- 5 files changed, 62 insertions(+), 65 deletions(-) create mode 100644 app/src/main/res/drawable/ic_export.xml diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt index 12ead916b..7eb4ffcef 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt @@ -102,6 +102,8 @@ class BgTextConfigDialog : BaseDialogFragment(), FileChooserDialog.CallBack { secondaryTextColor = requireContext().getSecondaryTextColor(isLight) root_view.setBackgroundColor(bg) sw_dark_status_icon.setTextColor(primaryTextColor) + iv_import.setColorFilter(primaryTextColor) + iv_export.setColorFilter(primaryTextColor) tv_bg_image.setTextColor(primaryTextColor) } @@ -155,12 +157,13 @@ class BgTextConfigDialog : BaseDialogFragment(), FileChooserDialog.CallBack { ReadBookConfig.resetDur() postEvent(EventBus.UP_CONFIG, false) } - tv_import.onClick { + iv_import.onClick { val importFormNet = "网络导入" val otherActions = arrayListOf(importFormNet) FilePicker.selectFile( this@BgTextConfigDialog, requestCodeImport, + title = getString(R.string.import_str), allowExtensions = arrayOf("zip"), otherActions = otherActions ) { action -> @@ -169,8 +172,12 @@ class BgTextConfigDialog : BaseDialogFragment(), FileChooserDialog.CallBack { } } } - tv_export.onClick { - FilePicker.selectFolder(this@BgTextConfigDialog, requestCodeExport) + iv_export.onClick { + FilePicker.selectFolder( + this@BgTextConfigDialog, + requestCodeExport, + title = getString(R.string.export_str) + ) } } diff --git a/app/src/main/res/drawable/ic_export.xml b/app/src/main/res/drawable/ic_export.xml new file mode 100644 index 000000000..78d6a76dd --- /dev/null +++ b/app/src/main/res/drawable/ic_export.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_import.xml b/app/src/main/res/drawable/ic_import.xml index b9929a808..dc493329e 100644 --- a/app/src/main/res/drawable/ic_import.xml +++ b/app/src/main/res/drawable/ic_import.xml @@ -1,32 +1,15 @@ - + + android:viewportWidth="1280" + android:viewportHeight="1024"> + + android:fillColor="#000000" + android:pathData="M394 376V230.8c0-19.2 15.6-34.8 34.8-34.8h477.4c19.2 0 34.8 15.6 34.8 34.8v477.4c0 19.2-15.6 34.8-34.8 34.8H761c-18.8 0-34 15.2-34 34s15.2 34 34 34h178.9c38.2 0 69.1-31 69.1-69.1V197.1c0-38.2-31-69.1-69.1-69.1H395.1c-38.2 0-69.1 31-69.1 69.1V376c0 18.8 15.2 34 34 34s34-15.2 34-34z" /> - - - - + android:fillColor="#000000" + android:pathData="M678.9 618.8l-0.1-0.1L545.1 485c-13.3-13.3-34.8-13.3-48.1 0-13.3 13.3-13.3 34.8 0 48.1l75.9 75.9H360c-18.8 0-34 15.2-34 34s15.2 34 34 34h212.7L497 752.7c-13.3 13.3-13.3 34.8 0 48.1 13.3 13.3 34.8 13.3 48.1 0l131.6-131.6c7.5-6.2 12.3-15.6 12.3-26.1 0-9.6-3.9-18.1-10.1-24.3z" /> + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_share.xml b/app/src/main/res/drawable/ic_share.xml index 7b4b0103b..df884e817 100644 --- a/app/src/main/res/drawable/ic_share.xml +++ b/app/src/main/res/drawable/ic_share.xml @@ -1,9 +1,11 @@ + + android:fillColor="#000000" /> + diff --git a/app/src/main/res/layout/dialog_read_bg_text.xml b/app/src/main/res/layout/dialog_read_bg_text.xml index e4b51710e..cc47ac88d 100644 --- a/app/src/main/res/layout/dialog_read_bg_text.xml +++ b/app/src/main/res/layout/dialog_read_bg_text.xml @@ -19,18 +19,18 @@ - + android:contentDescription="@string/import_str" + android:src="@drawable/ic_import" + android:tooltipText="@string/import_str" + tools:ignore="UnusedAttribute" /> - + android:contentDescription="@string/import_str" + android:src="@drawable/ic_export" + android:tooltipText="@string/export_str" + tools:ignore="UnusedAttribute" /> +