pull/48/head
kunfei 5 years ago
parent f6172576d2
commit 65b2abe60d
  1. 1
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  2. 8
      app/src/main/java/io/legado/app/ui/book/read/config/MoreConfigDialog.kt
  3. 2
      app/src/main/res/layout/dialog_page_key.xml
  4. 4
      app/src/main/res/menu/read_book.xml
  5. 3
      app/src/main/res/values/strings.xml
  6. 5
      app/src/main/res/xml/pref_config_read.xml

@ -152,7 +152,6 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo
viewModel.refreshContent(it)
}
}
R.id.menu_page_key -> PageKeyDialog(this).show()
}
return super.onCompatOptionsItemSelected(item)
}

@ -9,6 +9,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.fragment.app.DialogFragment
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.R
import io.legado.app.constant.Bus
@ -97,5 +98,12 @@ class MoreConfigDialog : DialogFragment() {
}
}
override fun onPreferenceTreeClick(preference: Preference?): Boolean {
when (preference?.key) {
"customPageKey" -> PageKeyDialog(requireContext()).show()
}
return super.onPreferenceTreeClick(preference)
}
}
}

@ -12,7 +12,7 @@
android:layout_margin="5dp"
android:textSize="18sp"
android:textStyle="bold"
android:text="@string/custom_page_key_t" />
android:text="@string/custom_page_key" />
<io.legado.app.lib.theme.view.ATETextInputLayout
android:layout_width="match_parent"

@ -91,10 +91,6 @@
android:title="@string/book_info"
app:showAsAction="never" />
<item
android:id="@+id/menu_page_key"
android:title="@string/custom_page_key"
app:showAsAction="never" />
</group>
</menu>

@ -556,8 +556,7 @@
<string name="book_type_audio">音频</string>
<string name="to_backstage">转到后台</string>
<string name="importing">正在导入</string>
<string name="custom_page_key">定义翻页按键</string>
<string name="custom_page_key_t">自定义翻页按键</string>
<string name="custom_page_key">自定义翻页按键</string>
<string name="prev_page_key">上一页按键</string>
<string name="next_page_key">下一页按键</string>

@ -26,4 +26,9 @@
android:key="volumeKeyPageOnPlay"
app:iconSpaceReserved="false" />
<Preference
android:key="customPageKey"
android:title="@string/custom_page_key"
app:iconSpaceReserved="false" />
</androidx.preference.PreferenceScreen>
Loading…
Cancel
Save