Add OSM copyright to about section.
This commit is contained in:
parent
6a780d3e46
commit
5928643325
2 changed files with 27 additions and 0 deletions
|
@ -242,6 +242,19 @@ class SettingsFragment : PreferenceFragmentCompat(), YesNoDialog.YesNoDialogList
|
|||
preferenceCategoryAbout.contains(fork_notice)
|
||||
screen.addPreference(fork_notice)
|
||||
|
||||
val copyright_notice = Preference(context)
|
||||
copyright_notice.title = "Map data"
|
||||
copyright_notice.summary = "© OpenStreetMap contributors."
|
||||
copyright_notice.setIcon(R.drawable.ic_map_24dp)
|
||||
copyright_notice.setOnPreferenceClickListener {
|
||||
val intent = Intent(Intent.ACTION_VIEW)
|
||||
intent.setData(Uri.parse("https://www.openstreetmap.org"))
|
||||
startActivity(intent)
|
||||
return@setOnPreferenceClickListener true
|
||||
}
|
||||
preferenceCategoryAbout.contains(copyright_notice)
|
||||
screen.addPreference(copyright_notice)
|
||||
|
||||
val preferenceAppVersion = Preference(context)
|
||||
preferenceAppVersion.title = getString(R.string.pref_app_version_title)
|
||||
preferenceAppVersion.setIcon(R.drawable.ic_info_24dp)
|
||||
|
|
14
app/src/main/res/drawable/ic_map_24dp.xml
Normal file
14
app/src/main/res/drawable/ic_map_24dp.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!--
|
||||
Thank you
|
||||
https://pictogrammers.com/library/mdi/icon/map-outline/
|
||||
-->
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/icon_default"
|
||||
android:pathData="M20.5,3L20.34,3.03L15,5.1L9,3L3.36,4.9C3.15,4.97 3,5.15 3,5.38V20.5A0.5,0.5 0 0,0 3.5,21L3.66,20.97L9,18.9L15,21L20.64,19.1C20.85,19.03 21,18.85 21,18.62V3.5A0.5,0.5 0 0,0 20.5,3M10,5.47L14,6.87V18.53L10,17.13V5.47M5,6.46L8,5.45V17.15L5,18.31V6.46M19,17.54L16,18.55V6.86L19,5.7V17.54Z" />
|
||||
</vector>
|
Loading…
Reference in a new issue