diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 5e445dcb1..c27a942b7 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -8,7 +8,7 @@ * 正文出现缺字漏字、内容缺失、排版错乱等情况,有可能是净化规则出现问题。先关闭替换净化并刷新,再观察是否正常。如果正常说明净化规则存在误杀,如果关闭后仍然出现相关问题,请点击源链接查看原文与正文是否相同,如果不同,再进行反馈。 * 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源! -**2021/07/5** +**2021/07/05** 1. 默认规则新增类似`jsonPath`的索引写法 by bushixuanqi * 格式形如 `[index,index, ...]` 或 `[!index,index, ...]` 其中`[!`开头表示筛选方式为排除,`index`可以是单个索引,也可以是区间。 * 区间格式为 `start:end` 或 `start:end:step`,其中`start`为`0`可省略,`end`为`-1`可省略。 @@ -17,6 +17,9 @@ * 特殊用法 `tag.div[-1:0]` 可在任意地方让列表反向 2. 允许索引作为@分段后每个部分的首规则,此时相当于前面是`children` * `head@.1@text` 与 `head@[1]@text` 与 `head@children[1]@text` 等价 +3. 添加Umd格式支持 by ag2s20150909 +4. 修复web页面按键重复监听的bug +5. 亮度条往中间移了一点,防止误触 **2021/06/29** * 修复html格式化bug diff --git a/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt b/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt new file mode 100644 index 000000000..d4f9fefab --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/dict/DictDialog.kt @@ -0,0 +1,32 @@ +package io.legado.app.ui.dict + +import android.os.Bundle +import android.view.View +import androidx.fragment.app.FragmentManager +import androidx.fragment.app.viewModels +import io.legado.app.base.BaseDialogFragment + +class DictDialog : BaseDialogFragment() { + + companion object { + + fun dict(manager: FragmentManager, word: String) { + DictDialog().apply { + val bundle = Bundle() + bundle.putString("word", word) + arguments = bundle + }.show(manager, word) + } + + } + + private val viewModel by viewModels() + + override fun onFragmentCreated(view: View, savedInstanceState: Bundle?) { + viewModel.word = arguments?.getString("word") ?: "" + + + } + + +} \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/dict/DictViewModel.kt b/app/src/main/java/io/legado/app/ui/dict/DictViewModel.kt new file mode 100644 index 000000000..8b694776f --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/dict/DictViewModel.kt @@ -0,0 +1,11 @@ +package io.legado.app.ui.dict + +import android.app.Application +import androidx.lifecycle.AndroidViewModel + +class DictViewModel(application: Application) : AndroidViewModel(application) { + + var word: String? = null + + +} \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_read_padding.xml b/app/src/main/res/layout/dialog_read_padding.xml index 37153a1f1..a517996d0 100644 --- a/app/src/main/res/layout/dialog_read_padding.xml +++ b/app/src/main/res/layout/dialog_read_padding.xml @@ -1,31 +1,130 @@ - + android:padding="10dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:text="@string/footer" /> @@ -41,28 +140,28 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + diff --git a/app/src/main/res/layout/view_read_menu.xml b/app/src/main/res/layout/view_read_menu.xml index 2dd08be5b..29421a357 100644 --- a/app/src/main/res/layout/view_read_menu.xml +++ b/app/src/main/res/layout/view_read_menu.xml @@ -71,13 +71,14 @@ android:id="@+id/ll_brightness" android:layout_width="wrap_content" android:layout_height="0dp" - android:layout_margin="16dp" + android:layout_marginLeft="16dp" + android:layout_marginTop="16dp" android:gravity="center_horizontal" android:orientation="vertical" - android:padding="6dp" app:layout_constraintBottom_toTopOf="@+id/bottom_menu" app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintTop_toBottomOf="@+id/title_bar"> + app:layout_constraintTop_toBottomOf="@+id/title_bar" + tools:ignore="RtlHardcoded">