mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
添加退出按钮
This commit is contained in:
parent
58bd1f50eb
commit
e391372698
@ -155,6 +155,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) {
|
|||||||
"readRecord" -> startActivity<ReadRecordActivity>()
|
"readRecord" -> startActivity<ReadRecordActivity>()
|
||||||
"donate" -> startActivity<DonateActivity>()
|
"donate" -> startActivity<DonateActivity>()
|
||||||
"about" -> startActivity<AboutActivity>()
|
"about" -> startActivity<AboutActivity>()
|
||||||
|
"exit" -> activity?.finish()
|
||||||
}
|
}
|
||||||
return super.onPreferenceTreeClick(preference)
|
return super.onPreferenceTreeClick(preference)
|
||||||
}
|
}
|
||||||
|
11
app/src/main/res/drawable/ic_exit.xml
Normal file
11
app/src/main/res/drawable/ic_exit.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<vector android:autoMirrored="true"
|
||||||
|
android:height="24dp"
|
||||||
|
android:tint="#000000"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:width="24dp"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M17,7l-1.41,1.41L18.17,11H8v2h10.17l-2.58,2.58L17,17l5,-5zM4,5h8V3H4c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h8v-2H4V5z" />
|
||||||
|
</vector>
|
@ -1116,4 +1116,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1119,4 +1119,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1119,4 +1119,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1116,4 +1116,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1118,4 +1118,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1118,4 +1118,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1119,4 +1119,5 @@
|
|||||||
<string name="sort_desc">反序</string>
|
<string name="sort_desc">反序</string>
|
||||||
<string name="test">测试</string>
|
<string name="test">测试</string>
|
||||||
<string name="show_wait_up_count">显示等待更新数量</string>
|
<string name="show_wait_up_count">显示等待更新数量</string>
|
||||||
|
<string name="exit_app">退出软件</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -125,6 +125,13 @@
|
|||||||
android:icon="@drawable/ic_cfg_about"
|
android:icon="@drawable/ic_cfg_about"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
|
<io.legado.app.lib.prefs.Preference
|
||||||
|
android:key="exit"
|
||||||
|
android:summary="@string/exit_app"
|
||||||
|
android:title="@string/exit"
|
||||||
|
android:icon="@drawable/ic_exit"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
|
|
||||||
</io.legado.app.lib.prefs.PreferenceCategory>
|
</io.legado.app.lib.prefs.PreferenceCategory>
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user