feat(about-page): refactor the style of about page

pull/98/head
Mupceet 6 years ago
parent 2589cb2e30
commit f1c23387c0
  1. 4
      app/build.gradle
  2. 264
      app/src/main/java/io/legado/app/ui/about/AboutActivity.kt
  3. 51
      app/src/main/java/io/legado/app/ui/about/AboutFragment.kt
  4. 134
      app/src/main/java/io/legado/app/ui/about/ActionItem.kt
  5. 111
      app/src/main/java/io/legado/app/ui/about/ActionItemViewBinder.kt
  6. 5
      app/src/main/java/io/legado/app/ui/about/ActionListener.kt
  7. 5
      app/src/main/java/io/legado/app/ui/about/Category.kt
  8. 41
      app/src/main/java/io/legado/app/ui/about/CategoryViewBinder.kt
  9. 49
      app/src/main/res/layout/about_page_action_item.xml
  10. 10
      app/src/main/res/layout/about_page_item_category.xml
  11. 68
      app/src/main/res/layout/activity_about_page.xml
  12. 9
      app/src/main/res/menu/about.xml
  13. 7
      app/src/main/res/values/dimens.xml
  14. 12
      app/src/main/res/values/strings.xml
  15. 72
      app/src/main/res/values/styles.xml
  16. 51
      app/src/main/res/xml/about.xml

@ -178,6 +178,10 @@ dependencies {
//
implementation 'com.github.houbb:opencc4j:1.4.0'
//About
implementation 'com.drakeet.multitype:multitype:4.0.0'
implementation "com.mikepenz:iconics-core:4.0.2"
implementation 'com.mikepenz:community-material-typeface:3.7.95.4-kotlin@aar'
}
apply plugin: 'com.google.gms.google-services'

@ -3,38 +3,266 @@ package io.legado.app.ui.about
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import com.drakeet.multitype.MultiTypeAdapter
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
import com.mikepenz.iconics.utils.colorInt
import com.mikepenz.iconics.utils.sizeDp
import io.legado.app.App
import io.legado.app.R
import io.legado.app.base.BaseActivity
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.ThemeStore
import io.legado.app.lib.theme.primaryColor
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.utils.shareText
import kotlinx.android.synthetic.main.activity_about_page.*
import org.jetbrains.anko.backgroundColor
import org.jetbrains.anko.textColor
import org.jetbrains.anko.toast
import java.util.*
class AboutActivity : BaseActivity(R.layout.activity_about) {
class AboutActivity : BaseActivity(R.layout.activity_about_page, fullScreen = false) {
private val items: MutableList<Any> = ArrayList()
override fun onActivityCreated(savedInstanceState: Bundle?) {
val fTag = "aboutFragment"
var aboutFragment = supportFragmentManager.findFragmentByTag(fTag)
if (aboutFragment == null) aboutFragment = AboutFragment()
supportFragmentManager.beginTransaction()
.replace(R.id.fl_fragment, aboutFragment, fTag)
.commit()
icon.setImageResource(R.drawable.ic_launcher_foreground)
slogan.setText(R.string.slogan)
val versionString = getString(R.string.version) + " " + App.INSTANCE.versionName
version.text = versionString
setSupportActionBar(toolbar)
val actionBar = supportActionBar
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true)
actionBar.setDisplayShowHomeEnabled(true)
}
collapsingToolbar.setContentScrimColor(primaryColor)
headerContentLayout.backgroundColor = primaryColor
collapsingToolbar.setCollapsedTitleTextColor(primaryTextColor)
slogan.textColor = primaryTextColor
version.textColor = primaryTextColor
version.setOnClickListener {
openIntent(
Intent.ACTION_VIEW,
getString(R.string.latest_release_url)
)
}
}
override fun onPostCreate(savedInstanceState: Bundle?) {
super.onPostCreate(savedInstanceState)
val adapter = MultiTypeAdapter()
adapter.register(ActionItem::class, ActionItemViewBinder(this))
adapter.register(Category::class, CategoryViewBinder())
onItemsCreated(items)
adapter.items = items
adapter.setHasStableIds(true)
recyclerView.adapter = adapter
ATH.applyEdgeEffectColor(recyclerView)
}
override fun onCompatCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.about, menu)
return super.onCompatCreateOptionsMenu(menu)
private fun onItemsCreated(items: MutableList<Any>) {
buildAboutCategory(items)
buildContactUsCategory(items)
buildDeveloperCategory(items)
buildOthersCategory(items)
}
override fun onCompatOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.menu_scoring -> openIntent("market://details?id=$packageName")
private fun buildAboutCategory(items: MutableList<Any>) {
val iconColor = ThemeStore.textColorPrimary(this)
items.add(Category(getString(R.string.about)))
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_post)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.update_log)
.setOnClickAction(object : ActionListener {
override fun action() {
UpdateLog().show(supportFragmentManager, "update_log")
}
})
.build()
)
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_thumb_up)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.scoring)
.setOnClickAction(object : ActionListener {
override fun action() {
openIntent(Intent.ACTION_VIEW, "market://details?id=$packageName")
}
})
.build()
)
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon.cmd_bug)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.send_mail)
.subText(R.string.send_feedback_hint)
.setOnClickAction(object : ActionListener {
override fun action() {
openIntent(Intent.ACTION_SENDTO, "mailto:kunfei.ge@gmail.com")
}
})
.build()
)
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_share_variant)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.share_app)
.setOnClickAction(object : ActionListener {
override fun action() {
shareText(
"App Share",
getString(R.string.app_share_description)
)
}
})
.build()
)
}
private fun buildContactUsCategory(items: MutableList<Any>) {
val iconColor = ThemeStore.textColorPrimary(this)
items.add(Category(getString(R.string.contact_us)))
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_wechat)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.wechat_public_account)
.subText(R.string.wechat_public_account_name)
.setOnClickAction(object : ActionListener {
override fun action() {
// TODO 提供关注微信公众号的方法
}
})
.build()
)
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_qqchat)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.join_qq_group)
.setOnClickAction(object : ActionListener {
override fun action() {
// TODO 提供QQ加群方式
}
})
.build()
)
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon.cmd_github_circle)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.git_hub)
.subText(R.string.this_github_url)
.setOnClickAction(object : ActionListener {
override fun action() {
openIntent(Intent.ACTION_VIEW, getString(R.string.this_github_url))
}
})
.build()
)
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_web_box)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.home_page)
.subText(R.string.home_page_url)
.setOnClickAction(object : ActionListener {
override fun action() {
openIntent(Intent.ACTION_VIEW, getString(R.string.home_page_url))
}
})
.build()
)
}
private fun buildDeveloperCategory(items: MutableList<Any>) {
val iconColor = ThemeStore.textColorPrimary(this)
items.add(Category(getString(R.string.developers)))
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon.cmd_developer_board)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text(R.string.developer_description)
.subText(R.string.developer_detail)
.setOnClickAction(object : ActionListener {
override fun action() {
openIntent(Intent.ACTION_VIEW, getString(R.string.contributors_url))
}
})
.build()
)
}
private fun buildOthersCategory(items: MutableList<Any>) {
val iconColor = ThemeStore.textColorPrimary(this)
items.add(Category("其他"))
items.add(
ActionItem.Builder()
.icon(IconicsDrawable(this, CommunityMaterial.Icon2.cmd_license)
.apply {
colorInt(iconColor)
sizeDp(18)
})
.text("开源许可")
.setOnClickAction(object : ActionListener {
override fun action() {
// TODO 打开开源许可页面
}
})
.build()
)
items.add(
ActionItem.Builder()
.showIcon(true)
.text(R.string.disclaimer)
.setOnClickAction(object : ActionListener {
override fun action() {
// TODO 打开免责声明页面
}
return super.onCompatOptionsItemSelected(item)
})
.build()
)
}
private fun openIntent(address: String) {
private fun openIntent(intentName: String, address: String) {
try {
val intent = Intent(Intent.ACTION_VIEW)
val intent = Intent(intentName)
intent.data = Uri.parse(address)
startActivity(intent)
} catch (e: Exception) {

@ -1,51 +0,0 @@
package io.legado.app.ui.about
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.View
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import io.legado.app.App
import io.legado.app.R
import io.legado.app.utils.shareText
import io.legado.app.utils.toast
class AboutFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
addPreferencesFromResource(R.xml.about)
findPreference<Preference>("check_update")?.summary = getString(R.string.version) + " " + App.INSTANCE.versionName
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
listView.overScrollMode = View.OVER_SCROLL_NEVER
}
override fun onPreferenceTreeClick(preference: Preference?): Boolean {
when (preference?.key) {
"contributors" -> openIntent(Intent.ACTION_VIEW, getString(R.string.contributors_url))
"update_log" -> UpdateLog().show(childFragmentManager, "update_log")
"check_update" -> openIntent(Intent.ACTION_VIEW, getString(R.string.latest_release_url))
"mail" -> openIntent(Intent.ACTION_SENDTO, "mailto:kunfei.ge@gmail.com")
"git" -> openIntent(Intent.ACTION_VIEW, getString(R.string.this_github_url))
"home_page" -> openIntent(Intent.ACTION_VIEW, getString(R.string.home_page_url))
"share_app" -> activity?.shareText(
"App Share",
getString(R.string.app_share_description)
)
}
return super.onPreferenceTreeClick(preference)
}
private fun openIntent(intentName: String, address: String) {
try {
val intent = Intent(intentName)
intent.data = Uri.parse(address)
startActivity(intent)
} catch (e: Exception) {
toast(R.string.can_not_open)
}
}
}

@ -0,0 +1,134 @@
package io.legado.app.ui.about
import android.graphics.drawable.Drawable
import android.os.Build
import android.text.Html
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
class ActionItem(builder: Builder) {
var onClickAction: ActionListener? = null
internal set
var onLongClickAction: ActionListener? = null
internal set
var text: CharSequence? = null
@StringRes
var textRes = 0
var subText: CharSequence? = null
@StringRes
var subTextRes = 0
var icon: Drawable? = null
@DrawableRes
var iconRes = 0
private var showIcon = true
init {
this.text = builder.text
this.textRes = builder.textRes
this.subText = builder.subText
this.subTextRes = builder.subTextRes
this.icon = builder.icon
this.iconRes = builder.iconRes
this.showIcon = builder.showIcon
this.onClickAction = builder.onClickAction
this.onLongClickAction = builder.onLongClickAction
}
fun shouldShowIcon(): Boolean {
return showIcon
}
class Builder {
internal var onClickAction: ActionListener? = null
internal var onLongClickAction: ActionListener? = null
internal var text: CharSequence? = null
@StringRes
internal var textRes = 0
internal var subText: CharSequence? = null
@StringRes
internal var subTextRes = 0
internal var icon: Drawable? = null
@DrawableRes
internal var iconRes = 0
internal var showIcon = true
fun text(text: CharSequence): Builder {
this.text = text
this.textRes = 0
return this
}
fun text(@StringRes text: Int): Builder {
this.textRes = text
this.text = null
return this
}
fun text(textHtml: String): Builder {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
this.text = Html.fromHtml(textHtml, Html.FROM_HTML_MODE_LEGACY)
} else {
this.text = Html.fromHtml(textHtml)
}
this.textRes = 0
return this
}
fun subText(subText: CharSequence): Builder {
this.subText = subText
this.subTextRes = 0
return this
}
fun subText(@StringRes subTextRes: Int): Builder {
this.subText = null
this.subTextRes = subTextRes
return this
}
fun subTextHtml(subTextHtml: String): Builder {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
this.subText = Html.fromHtml(subTextHtml, Html.FROM_HTML_MODE_LEGACY)
} else {
this.subText = Html.fromHtml(subTextHtml)
}
this.subTextRes = 0
return this
}
fun icon(icon: Drawable): Builder {
this.icon = icon
this.iconRes = 0
return this
}
fun icon(@DrawableRes iconRes: Int): Builder {
this.icon = null
this.iconRes = iconRes
return this
}
fun showIcon(showIcon: Boolean): Builder {
this.showIcon = showIcon
return this
}
fun setOnClickAction(onClickAction: ActionListener): Builder {
this.onClickAction = onClickAction
return this
}
fun setOnLongClickAction(onLongClickAction: ActionListener): Builder {
this.onLongClickAction = onLongClickAction
return this
}
fun build(): ActionItem {
return ActionItem(this)
}
}
}

@ -0,0 +1,111 @@
package io.legado.app.ui.about
import android.content.Context
import android.util.TypedValue
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.drakeet.multitype.ItemViewBinder
import io.legado.app.R
class ActionItemViewBinder(private val context: Context) :
ItemViewBinder<ActionItem, ActionItemViewBinder.ViewHolder>() {
override fun onBindViewHolder(holder: ViewHolder, item: ActionItem) {
val text = item.text
val textRes = item.textRes
holder.text.visibility = View.VISIBLE
when {
text != null -> {
holder.text.text = text
holder.text.setLineSpacing(0f, holder.text.lineSpacingMultiplier)
}
textRes != 0 -> {
holder.text.setText(textRes)
holder.text.setLineSpacing(0f, holder.text.lineSpacingMultiplier)
}
else -> holder.text.visibility = GONE
}
val subText = item.subText
val subTextRes = item.subTextRes
holder.subText.visibility = View.VISIBLE
when {
subText != null -> holder.subText.text = subText
subTextRes != 0 -> holder.subText.setText(subTextRes)
else -> holder.subText.visibility = GONE
}
if (item.shouldShowIcon()) {
holder.icon.visibility = View.VISIBLE
val drawable = item.icon
val drawableRes = item.iconRes
if (drawable != null) {
holder.icon.setImageDrawable(drawable)
} else if (drawableRes != 0) {
holder.icon.setImageResource(drawableRes)
}
} else {
holder.icon.visibility = GONE
}
if (item.onClickAction != null || item.onLongClickAction != null) {
val outValue = TypedValue()
context.theme.resolveAttribute(
R.attr.selectableItemBackground,
outValue,
true
)
holder.view.setBackgroundResource(outValue.resourceId)
} else {
holder.view.setBackgroundResource(0)
}
holder.setOnClickAction(item.onClickAction)
holder.setOnLongClickAction(item.onLongClickAction)
}
override fun onCreateViewHolder(inflater: LayoutInflater, parent: ViewGroup): ViewHolder {
return ViewHolder(
inflater.inflate(R.layout.about_page_action_item, parent, false)
)
}
class ViewHolder(val view: View) : RecyclerView.ViewHolder(view), View.OnClickListener,
View.OnLongClickListener {
val icon: ImageView = view.findViewById(R.id.mal_item_image)
val text: TextView = view.findViewById(R.id.mal_item_text)
val subText: TextView = view.findViewById(R.id.mal_action_item_subtext)
private var onClickAction: ActionListener? = null
private var onLongClickAction: ActionListener? = null
fun setOnClickAction(onClickAction: ActionListener?) {
this.onClickAction = onClickAction
view.setOnClickListener(if (onClickAction != null) this else null)
}
fun setOnLongClickAction(onLongClickAction: ActionListener?) {
this.onLongClickAction = onLongClickAction
view.setOnLongClickListener(if (onLongClickAction != null) this else null)
}
override fun onClick(v: View) {
if (onClickAction != null) {
onClickAction!!.action()
}
}
override fun onLongClick(v: View): Boolean {
if (onLongClickAction != null) {
onLongClickAction!!.action()
return true
}
return false
}
}
}

@ -0,0 +1,5 @@
package io.legado.app.ui.about
interface ActionListener {
fun action()
}

@ -0,0 +1,5 @@
package io.legado.app.ui.about
import androidx.annotation.StringRes
class Category(val title: String? = null, @StringRes val titleRes: Int = 0)

@ -0,0 +1,41 @@
package io.legado.app.ui.about
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.drakeet.multitype.ItemViewBinder
import io.legado.app.R
import io.legado.app.lib.theme.ColorUtils
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.backgroundColor
import org.jetbrains.anko.backgroundColor
import org.jetbrains.anko.textColor
class CategoryViewBinder : ItemViewBinder<Category, CategoryViewBinder.ViewHolder>() {
override fun onCreateViewHolder(inflater: LayoutInflater, parent: ViewGroup): ViewHolder {
return ViewHolder(inflater.inflate(R.layout.about_page_item_category, parent, false))
}
override fun onBindViewHolder(holder: ViewHolder, item: Category) {
val title = item.title
val titleRes = item.titleRes
when {
title != null -> holder.category.text = title
titleRes != 0 -> holder.category.setText(titleRes)
}
holder.category.text = item.title
}
class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
var category: TextView = itemView.findViewById(R.id.category)
init {
category.textColor = itemView.context.accentColor
itemView.backgroundColor = ColorUtils.darkenColor(itemView.context.backgroundColor)
}
}
}

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/about_page_baseline_half"
android:paddingBottom="@dimen/about_page_baseline_half"
android:paddingEnd="@dimen/about_page_baseline"
android:paddingStart="@dimen/about_page_baseline"
android:paddingRight="@dimen/about_page_baseline"
android:orientation="horizontal"
android:paddingLeft="@dimen/about_page_baseline">
<ImageView
android:id="@+id/mal_item_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="@dimen/about_page_action_item_image_width"
android:minHeight="@dimen/about_page_action_item_image_height"
android:layout_gravity="center"
android:layout_marginEnd="@dimen/about_page_baseline"
android:adjustViewBounds="false"
android:contentDescription="@null"
android:cropToPadding="false"
android:scaleType="centerInside" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:minHeight="@dimen/about_page_action_item_image_height"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical">
<TextView
style="@style/AboutPage.Item.MainContent"
android:id="@+id/mal_item_text"
tools:text="Version" />
<TextView
style="@style/AboutPage.Item.SubContent"
android:id="@+id/mal_action_item_subtext"
android:visibility="gone"
tools:visibility="visible"
tools:text="Current Version Of App" />
</LinearLayout>
</LinearLayout>

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/category"
style="@style/AboutPage.Item.Category"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="value">
</TextView>

@ -0,0 +1,68 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/headerLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/about_page_header_height" >
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentScrim="?attr/colorPrimary"
app:scrimAnimationDuration="500"
app:expandedTitleTextAppearance="@style/AboutPage.Header.ToolbarTitleExpanded"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<LinearLayout
android:id="@+id/headerContentLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
app:layout_collapseMode="parallax">
<ImageView
style="@style/AboutPage.Header.Icon"
android:id="@+id/icon"
tools:ignore="ContentDescription"
tools:src="#000000"/>
<TextView
style="@style/AboutPage.Header.Slogan"
android:id="@+id/slogan"/>
<TextView
style="@style/AboutPage.Header.Version"
android:id="@+id/version"
tools:text="Version 1.2.3"/>
</LinearLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="?attr/actionBarStyle"
app:layout_collapseMode="pin"/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/about_page_baseline"
android:clipToPadding="false"
android:descendantFocusability="beforeDescendants"
app:layoutManager="LinearLayoutManager"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/menu_scoring"
android:title="@string/scoring"
app:showAsAction="always" />
</menu>

@ -35,4 +35,11 @@
<dimen name="fastscroll_scrollbar_margin_bottom">8dp</dimen>
<dimen name="fastscroll_scrollbar_padding_start">8dp</dimen>
<dimen name="fastscroll_scrollbar_padding_end">8dp</dimen>
<dimen name="about_page_header_height">212dp</dimen>
<dimen name="about_page_baseline">16dp</dimen>
<dimen name="about_page_baseline_half">8dp</dimen>
<dimen name="about_page_baseline_quarter">4dp</dimen>
<dimen name="about_page_action_item_image_width">24dp</dimen>
<dimen name="about_page_action_item_image_height">32dp</dimen>
</resources>

@ -86,10 +86,10 @@
<string name="download_offline_s">下载选择的章节到本地</string>
<string name="change_origin">换源</string>
<string name="about_description">
\u3000\u3000这是一款开源的阅读软件,你可以fork我们的代码自己编译APK。欢迎提交代码帮助改善应用。\n\u3000\u3000公众号[开源阅读软件]
这是一款开源的阅读软件,你可以 fork 我们的代码自己编译 APK。欢迎提交代码帮助改善应用。\n\n\公众号「开源阅读软件」
</string>
<string name="app_share_description">
阅读3.0下载地址:\nhttps://play.google.com/store/apps/details?id=io.legado.app
阅读 3.0 下载地址:\nhttps://play.google.com/store/apps/details?id=io.legado.app
</string>
<string name="version_name">Version %s</string>
<string name="pt_auto_refresh">自动刷新</string>
@ -606,4 +606,12 @@
<string name="add_to_text_context_menu_t">文字操作显示搜索</string>
<string name="record_log">记录日志</string>
<string name="chinese_converter">中文简繁体转换</string>
<string name="slogan">享受美好时光</string>
<string name="send_feedback_hint">遇到问题?在此反馈</string>
<string name="contact_us">联系我们</string>
<string name="wechat_public_account">公众号</string>
<string name="wechat_public_account_name">[ 开源阅读软件 ]</string>
<string name="developers">开发者</string>
<string name="developer_description">开发人员主要为 gedoor,Invinciblelee 等</string>
<string name="developer_detail">详情请在 GitHub 中查看</string>
</resources>

@ -73,6 +73,78 @@
<item name="android:popupBackground">@drawable/bg_popup_menu</item>
</style>
<style name="AboutPage">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item>
</style>
<style name="AboutPage.Header"/>
<style name="AboutPage.Header.ToolbarTitleExpanded" parent="@android:style/TextAppearance">
<item name="android:textColor">@android:color/transparent</item>
</style>
<style name="AboutPage.Header.Icon">
<item name="android:layout_width">92dp</item>
<item name="android:layout_height">92dp</item>
<item name="android:padding">@dimen/about_page_baseline_half</item>
</style>
<style name="AboutPage.Header.Slogan">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:paddingLeft">@dimen/about_page_baseline</item>
<item name="android:paddingRight">@dimen/about_page_baseline</item>
</style>
<style name="AboutPage.Header.Version">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">@dimen/about_page_baseline_half</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
</style>
<style name="AboutPage.Item">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="AboutPage.Item.Category">
<item name="android:layout_marginLeft">1dp</item>
<item name="android:layout_marginRight">1dp</item>
<item name="android:paddingTop">@dimen/about_page_baseline_half</item>
<item name="android:paddingBottom">@dimen/about_page_baseline_half</item>
<item name="android:paddingLeft">@dimen/about_page_baseline</item>
<item name="android:paddingRight">@dimen/about_page_baseline</item>
<item name="android:paddingStart">@dimen/about_page_baseline</item>
<item name="android:paddingEnd">@dimen/about_page_baseline</item>
<item name="android:textSize">14sp</item>
</style>
<style name="AboutPage.Item.MainContent">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:autoLink">web</item>
<item name="android:textColorLink">?colorPrimary</item>
<item name="android:textSize">16sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:textIsSelectable">false</item>
</style>
<style name="AboutPage.Item.SubContent">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:autoLink">web</item>
<item name="android:textColorLink">?colorPrimary</item>
<item name="android:layout_marginTop">@dimen/about_page_baseline_quarter</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:textColorSecondary</item>
<item name="android:textIsSelectable">true</item>
</style>
<style name="Activity.Permission" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.preference.Preference
android:key="contributors"
android:title="开发人员"
android:summary="gedoor,Invinciblelee等, 详情请在github中查看"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="check_update"
android:title="@string/check_update"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="update_log"
android:title="@string/update_log"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="qq"
android:title="@string/join_qq_group"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="mail"
android:title="@string/send_mail"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="git"
android:title="@string/git_hub"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="home_page"
android:title="@string/home_page"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="share_app"
android:title="@string/share_app"
app:iconSpaceReserved="false" />
<androidx.preference.Preference
android:key="disclaimer"
android:title="@string/disclaimer"
app:iconSpaceReserved="false" />
</androidx.preference.PreferenceScreen>
Loading…
Cancel
Save