pull/32/head
parent
69947c426d
commit
54e14fba60
@ -0,0 +1,15 @@ |
|||||||
|
package io.legado.app.ui.about |
||||||
|
|
||||||
|
import android.os.Bundle |
||||||
|
import androidx.preference.Preference |
||||||
|
import androidx.preference.PreferenceFragmentCompat |
||||||
|
import io.legado.app.App |
||||||
|
import io.legado.app.R |
||||||
|
|
||||||
|
class AboutFragment : PreferenceFragmentCompat() { |
||||||
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { |
||||||
|
addPreferencesFromResource(R.xml.about) |
||||||
|
findPreference<Preference>("version")?.summary = App.INSTANCE.versionName |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -1,15 +1,49 @@ |
|||||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||||
xmlns:tools="http://schemas.android.com/tools" |
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||||
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" |
android:layout_width="match_parent" |
||||||
tools:context="io.legado.app.ui.about.AboutActivity"> |
android:layout_height="match_parent" |
||||||
|
android:orientation="vertical" |
||||||
|
tools:context="io.legado.app.ui.about.AboutActivity"> |
||||||
|
|
||||||
<io.legado.app.ui.widget.TitleBar |
<io.legado.app.ui.widget.TitleBar |
||||||
android:id="@+id/title_bar" |
android:id="@+id/title_bar" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
app:title="@string/about" /> |
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_margin="6dp" |
||||||
|
app:cardBackgroundColor="@color/background_card"> |
||||||
|
|
||||||
|
<LinearLayout |
||||||
android:layout_width="match_parent" |
android:layout_width="match_parent" |
||||||
android:layout_height="wrap_content" |
android:layout_height="wrap_content" |
||||||
app:title="@string/about"/> |
android:orientation="vertical" |
||||||
|
android:padding="10dp"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_gravity="center" |
||||||
|
android:text="@string/app_name" |
||||||
|
android:textSize="20sp" |
||||||
|
android:textStyle="bold" /> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tv_app_summary" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:text="@string/about_description" /> |
||||||
|
</LinearLayout> |
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView> |
||||||
|
|
||||||
|
<FrameLayout |
||||||
|
android:id="@+id/fl_fragment" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="match_parent" /> |
||||||
</LinearLayout> |
</LinearLayout> |
||||||
|
@ -0,0 +1,9 @@ |
|||||||
|
<?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> |
@ -0,0 +1,36 @@ |
|||||||
|
<?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="isNightTheme" |
||||||
|
android:title="开发人员" |
||||||
|
android:summary="gedoor, Invinciblelee, atbest, Antecer, mabDc" |
||||||
|
app:iconSpaceReserved="false" /> |
||||||
|
|
||||||
|
<androidx.preference.Preference |
||||||
|
android:key="version" |
||||||
|
android:title="@string/version" |
||||||
|
app:iconSpaceReserved="false" /> |
||||||
|
|
||||||
|
<androidx.preference.Preference |
||||||
|
android:key="update_log" |
||||||
|
android:title="@string/update_log" |
||||||
|
app:iconSpaceReserved="false" /> |
||||||
|
|
||||||
|
<androidx.preference.Preference |
||||||
|
android:key="check_update" |
||||||
|
android:title="@string/check_update" |
||||||
|
app:iconSpaceReserved="false" /> |
||||||
|
|
||||||
|
<androidx.preference.Preference |
||||||
|
android:key="qq" |
||||||
|
android:title="@string/join_qq_group" |
||||||
|
app:iconSpaceReserved="false" /> |
||||||
|
|
||||||
|
<androidx.preference.Preference |
||||||
|
android:key="disclaimer" |
||||||
|
android:title="@string/disclaimer" |
||||||
|
app:iconSpaceReserved="false" /> |
||||||
|
|
||||||
|
</androidx.preference.PreferenceScreen> |
Loading…
Reference in new issue