aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt18
-rw-r--r--app/src/main/res/drawable/ic_fdroid_24.xml5
-rw-r--r--app/src/main/res/values/strings_no_translate.xml1
3 files changed, 20 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt
index f4c1244f..56125303 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/AboutActivity.kt
@@ -30,6 +30,7 @@ import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.logging.KL
import ca.allanwang.kau.utils.bindView
import ca.allanwang.kau.utils.dimenPixelSize
+import ca.allanwang.kau.utils.drawable
import ca.allanwang.kau.utils.resolveDrawable
import ca.allanwang.kau.utils.startLink
import ca.allanwang.kau.utils.string
@@ -156,17 +157,26 @@ class AboutActivity : AboutActivityBase(null, {
init {
val c = itemView.context
val size = c.dimenPixelSize(R.dimen.kau_avatar_bounds)
- images = arrayOf<Pair<IIcon, () -> Unit>>(
+
+ val icons: Array<Pair<Int, () -> Unit>> =
+ arrayOf(R.drawable.ic_fdroid_24 to { c.startLink(R.string.fdroid_url) })
+ val iicons: Array<Pair<IIcon, () -> Unit>> = arrayOf(
GoogleMaterial.Icon.gmd_file_download to { c.startLink(R.string.github_downloads_url) },
CommunityMaterial.Icon2.cmd_reddit to { c.startLink(R.string.reddit_url) },
CommunityMaterial.Icon.cmd_github_circle to { c.startLink(R.string.github_url) },
CommunityMaterial.Icon2.cmd_slack to { c.startLink(R.string.slack_url) },
- CommunityMaterial.Icon2.cmd_xda to { c.startLink(R.string.xda_url) }
- ).mapIndexed { i, (icon, onClick) ->
+ CommunityMaterial.Icon2.cmd_xda to { c.startLink(R.string.xda_url) })
+
+ images = (icons.map { (icon, onClick) -> c.drawable(icon) to onClick } + iicons.map { (icon, onClick) ->
+ icon.toDrawable(
+ c,
+ 32
+ ) to onClick
+ }).mapIndexed { i, (icon, onClick) ->
ImageView(c).apply {
layoutParams = ViewGroup.LayoutParams(size, size)
id = 109389 + i
- setImageDrawable(icon.toDrawable(context, 32))
+ setImageDrawable(icon)
scaleType = ImageView.ScaleType.CENTER
background = context.resolveDrawable(android.R.attr.selectableItemBackgroundBorderless)
setOnClickListener { onClick() }
diff --git a/app/src/main/res/drawable/ic_fdroid_24.xml b/app/src/main/res/drawable/ic_fdroid_24.xml
new file mode 100644
index 00000000..2c718fa6
--- /dev/null
+++ b/app/src/main/res/drawable/ic_fdroid_24.xml
@@ -0,0 +1,5 @@
+<!-- Adapted from https://gitlab.com/fdroid/artwork/blob/master/fdroid-logo-2015/default_notification.svg -->
+<vector android:height="24dp" android:viewportHeight="48"
+ android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#fff" android:fillType="evenOdd" android:pathData="M2.82,1.24A1.25,1.25 0,0 0,1.8 3.27l3.6,4.66L5.2,16a3,3 0,0 0,3 3h32a3,3 0,0 0,3 -3c0,-7.38 -0.08,-7.74 -0.2,-8.07l3.6,-4.66a1.25,1.25 0,0 0,-1.06 -2.03,1.25 1.25,0 0,0 -0.93,0.5L41.2,6.18a2.99,2.99 0,0 0,-0.98 -0.18c-32.35,0 -32.68,0.07 -33,0.18L3.79,1.74a1.25,1.25 0,0 0,-0.96 -0.5zM14.58,9.75a3.38,3.38 0,0 1,3.37 3.38,3.38 3.38,0 0,1 -3.37,3.37 3.38,3.38 0,0 1,-3.38 -3.38,3.38 3.38,0 0,1 3.38,-3.37zM34.08,9.75a3.38,3.38 0,0 1,3.37 3.38,3.38 3.38,0 0,1 -3.37,3.37 3.38,3.38 0,0 1,-3.38 -3.38,3.38 3.38,0 0,1 3.38,-3.37zM8.2,20a2.97,2.97 0,0 0,-3 2.97L5.2,43a3,3 0,0 0,3 3h32a3,3 0,0 0,3 -3L43.2,22.97a2.97,2.97 0,0 0,-2.4 -2.91L8.21,20z"/>
+</vector>
diff --git a/app/src/main/res/values/strings_no_translate.xml b/app/src/main/res/values/strings_no_translate.xml
index 9eb85dc2..d9aa6cee 100644
--- a/app/src/main/res/values/strings_no_translate.xml
+++ b/app/src/main/res/values/strings_no_translate.xml
@@ -6,6 +6,7 @@
<string name="translation_url" translatable="false">https://crwd.in/frost-for-facebook</string>
<string name="github_url" translatable="false">https://github.com/AllanWang/Frost-for-Facebook</string>
<string name="github_downloads_url" translatable="false">https://github.com/AllanWang/Frost-for-Facebook/releases</string>
+ <string name="fdroid_url" translatable="false">https://f-droid.org/en/packages/com.pitchedapps.frost</string>
<string name="reddit_url" translatable="false">https://www.reddit.com/r/FrostForFacebook</string>
<string name="slack_url" translatable="false">https://frost-slack.allanwang.ca</string>
<string name="xda_url" translatable="false">https://forum.xda-developers.com/android/apps-games/app-frost-facebook-t3685896</string>