From 1c9292c81643edeb19633cf0729bd10da56aaf76 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <61369261+fengyuecanzhu@users.noreply.github.com> Date: Thu, 24 Jun 2021 11:07:05 -0500 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=89=B9=E5=AE=9A?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E7=AB=A0=E8=8A=82=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java b/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java index e214b44..c78a20d 100644 --- a/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java +++ b/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java @@ -1517,8 +1517,8 @@ public abstract class PageLoader { private void chapterChangeCallback() { if (mPageChangeListener != null) { readAloudParagraph = -1; - mPageChangeListener.onPageChange(0, resetReadAloud); mPageChangeListener.onChapterChange(mCurChapterPos); + mPageChangeListener.onPageChange(0, resetReadAloud); resetReadAloud = true; mPageChangeListener.onPageCountChange(mCurChapter != null ? mCurChapter.getPageSize() : 0); } From 60d5bb768ca9cb50561d6f85b549342fd9eb1f65 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Sun, 27 Jun 2021 20:54:55 +0800 Subject: [PATCH 2/4] fix bug --- .idea/caches/build_file_checksums.ser | Bin 0 -> 585 bytes .../kongzue/dialogx/style/MaterialStyle.java | 2 +- .../BottomDialogTouchEventInterceptor.java | 5 +- .../myreader/ui/activity/ReadActivity.java | 5 +- .../myreader/ui/dialog/CopyContentDialog.java | 60 ------------------ .../myreader/ui/dialog/MyAlertDialog.java | 11 ++++ .../fycz/myreader/widget/page/PageLoader.java | 2 +- .../main/res/layout/dialog_copy_content.xml | 16 ----- 8 files changed, 20 insertions(+), 81 deletions(-) create mode 100644 .idea/caches/build_file_checksums.ser delete mode 100644 app/src/main/java/xyz/fycz/myreader/ui/dialog/CopyContentDialog.java delete mode 100644 app/src/main/res/layout/dialog_copy_content.xml diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000000000000000000000000000000000000..f91cdfc49b06ac1995bfa56ac62b82223d703ca3 GIT binary patch literal 585 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}nf0c10SK=O;~lkaUMu4O+hGCKX^#l;c^ z5tq!woc#0%{UngTVY&+$>KNES8aB*-xA1<6`uC#;mDa8BU|mtdz=K_(=@gr9bGJqH zyb3sXMB&ZvIVB7NIr+(nIiTPzNG&SKOf4>jn_4b$sW)AT>-pC3aOtKb*M%hv>iQY^ zxvBbTsd?#@rK$Q*cjzOc2*ZpkvOPEZ88)%JY~Y;n=7&>V34 - * 自由复制dialog - */ - -public class CopyContentDialog extends Dialog { - - private static final String TAG = "CopyContentDialog"; - - private DialogCopyContentBinding binding; - - private String content; - - /***************************************************************************/ - - public CopyContentDialog(@NonNull Context context, String content) { - super(context); - this.content = content; - } - - /*****************************Initialization********************************/ - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - binding = DialogCopyContentBinding.inflate(getLayoutInflater()); - setContentView(binding.getRoot()); - - setUpWindow(); - - binding.dialogTvContent.setText(content); - } - - /** - * 设置Dialog显示的位置 - */ - private void setUpWindow() { - Window window = getWindow(); - WindowManager.LayoutParams lp = window.getAttributes(); - lp.width = WindowManager.LayoutParams.MATCH_PARENT; - lp.height = WindowManager.LayoutParams.WRAP_CONTENT; - lp.gravity = Gravity.CENTER; - window.setAttributes(lp); - } - -} diff --git a/app/src/main/java/xyz/fycz/myreader/ui/dialog/MyAlertDialog.java b/app/src/main/java/xyz/fycz/myreader/ui/dialog/MyAlertDialog.java index 258b6bc..2bcd798 100644 --- a/app/src/main/java/xyz/fycz/myreader/ui/dialog/MyAlertDialog.java +++ b/app/src/main/java/xyz/fycz/myreader/ui/dialog/MyAlertDialog.java @@ -325,6 +325,17 @@ public class MyAlertDialog { }).setCancelButton("知道了"); } + public static void showTipDialogWithLink(Context context, String title, String msg){ + BottomDialog.show(title, new OnBindView(R.layout.dialog_textview) { + @Override + public void onBind(BottomDialog dialog, View v) { + TextView view = (TextView) v; + view.setText(msg); + view.setMovementMethod(LinkMovementMethod.getInstance()); + } + }).setCancelButton("取消"); + } + public static void showPrivacyDialog(Context context, DialogInterface.OnClickListener pos, DialogInterface.OnClickListener neg) { TextView view = (TextView) LayoutInflater.from(context).inflate(R.layout.dialog_textview, null); String msg = context.getString(R.string.privacy_tip); diff --git a/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java b/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java index c78a20d..fd2f0e9 100644 --- a/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java +++ b/app/src/main/java/xyz/fycz/myreader/widget/page/PageLoader.java @@ -2017,7 +2017,7 @@ public abstract class PageLoader { * @param page 开始页数 * @return 从page页开始的的当前章节所有内容 */ - private String getContentStartPage(int page) { + public String getContentStartPage(int page) { if (mCurChapter == null) return null; if (mCurChapter.getTxtPageList().isEmpty()) return null; StringBuilder s = new StringBuilder(); diff --git a/app/src/main/res/layout/dialog_copy_content.xml b/app/src/main/res/layout/dialog_copy_content.xml deleted file mode 100644 index 07ce353..0000000 --- a/app/src/main/res/layout/dialog_copy_content.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - From 2d2ac81e3562d10d957a304558ff98f7c6363480 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Sun, 27 Jun 2021 21:28:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/caches/build_file_checksums.ser | Bin 585 -> 585 bytes ...rect_dialogx_material_bottom_bkg_light.xml | 4 ++-- ...rect_dialogx_material_bottom_bkg_night.xml | 4 ++-- app/build.gradle | 1 + app/src/main/AndroidManifest.xml | 22 +----------------- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index f91cdfc49b06ac1995bfa56ac62b82223d703ca3..8a6d57603eef0ffa9bb8bf078cc23649cc55b305 100644 GIT binary patch delta 32 qcmV+*0N?+~1jz)DnFFQ#rLmlx0TBjahq1>}Q7Lsc$yb=5zJPf1iw^Su delta 32 qcmV+*0N?+~1jz)DnFEP7)v=tM0THXRmDE`KD!oK6hNT>1UL1JzdJbg( diff --git a/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_light.xml b/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_light.xml index e500950..20c28c3 100644 --- a/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_light.xml +++ b/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_light.xml @@ -6,6 +6,6 @@ android:color="@color/white"/> + android:topRightRadius="15dp" + android:topLeftRadius="15dp"/> diff --git a/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_night.xml b/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_night.xml index edc0eaf..b14a6a7 100644 --- a/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_night.xml +++ b/DialogX/src/main/res/drawable/rect_dialogx_material_bottom_bkg_night.xml @@ -6,6 +6,6 @@ android:color="@color/dialogxMaterialDarkDialogBkgColor"/> + android:topRightRadius="15dp" + android:topLeftRadius="15dp"/> diff --git a/app/build.gradle b/app/build.gradle index 5cc5421..2ef7967 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -104,6 +104,7 @@ android { if (keyPropsFile.exists()) { signingConfig signingConfigs.myConifg } + versionNameSuffix "-debug" } android.applicationVariants.all { variant -> variant.outputs.all { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ad3c638..64f9cdd 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,26 +3,6 @@ xmlns:tools="http://schemas.android.com/tools" package="xyz.fycz.myreader"> - - - - - - - - @@ -84,7 +64,7 @@ Date: Sun, 27 Jun 2021 21:28:38 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/caches/build_file_checksums.ser | Bin 585 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .idea/caches/build_file_checksums.ser diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser deleted file mode 100644 index 8a6d57603eef0ffa9bb8bf078cc23649cc55b305..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}l-a(W(##Th_( zR`y#54~r#SWM*J;W8likPfT%3OfJbU@?_vF$tX%K&dAS6sVJ~_U;qK0atfetZR9d&fgLOp-0}pnErc-Rb&D|E& z^D5xn5rsFu=aeuA