aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-29 17:10:56 -0700
committerAllan Wang <me@allanwang.ca>2017-06-29 17:10:56 -0700
commit601b0492110f17e5f9a1a446897e0b42d4a8cffe (patch)
tree6a0ffff352a14449aaf36dcecab7171860a73ce9 /app
parent7b6371ada06ca337c0a5e97382be8eca9f2c9650 (diff)
downloadfrost-601b0492110f17e5f9a1a446897e0b42d4a8cffe.tar.gz
frost-601b0492110f17e5f9a1a446897e0b42d4a8cffe.tar.bz2
frost-601b0492110f17e5f9a1a446897e0b42d4a8cffe.zip
Adding about app
Diffstat (limited to 'app')
-rw-r--r--app/src/main/AndroidManifest.xml3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt44
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt4
-rw-r--r--app/src/main/res/drawable/frost_f_256.xml14
-rw-r--r--app/src/main/res/values/strings.xml1
6 files changed, 48 insertions, 24 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c93a39ad..b33da59a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -115,6 +115,9 @@
<activity
android:name=".SettingsActivity"
android:theme="@style/FrostTheme.Settings" />
+ <activity
+ android:name=".AboutActivity"
+ android:theme="@style/Kau.Translucent.About" />
<service
android:name=".services.NotificationService"
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt
index fe753872..b5485e38 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/AboutActivity.kt
@@ -1,17 +1,27 @@
-//package com.pitchedapps.frost
-//
-//import android.os.Bundle
-//import android.support.v7.app.AppCompatActivity
-//import com.mikepenz.aboutlibraries.Libs
-//
-//
-//
-///**
-// * Created by Allan Wang on 2017-06-26.
-// */
-//class AboutActivity : AppCompatActivity() {
-// override fun onCreate(savedInstanceState: Bundle?) {
-// super.onCreate(savedInstanceState)
-// val libs = Libs.getInstance(this, R.string::class.java.fields)
-// }
-//} \ No newline at end of file
+package com.pitchedapps.frost
+
+import ca.allanwang.kau.about.AboutActivityBase
+import ca.allanwang.kau.adapters.FastItemThemedAdapter
+import ca.allanwang.kau.iitems.CardIItem
+import ca.allanwang.kau.utils.isColorVisibleOn
+import ca.allanwang.kau.utils.withMinAlpha
+import com.mikepenz.fastadapter.IItem
+import com.pitchedapps.frost.utils.Prefs
+
+
+/**
+ * Created by Allan Wang on 2017-06-26.
+ */
+class AboutActivity : AboutActivityBase(R.string::class.java, configBuilder = {
+ textColor = Prefs.textColor
+ accentColor = Prefs.accentColor
+ backgroundColor = Prefs.bgColor.withMinAlpha(200)
+ cutoutForeground = if (0xff3b5998.toInt().isColorVisibleOn(Prefs.bgColor)) 0xff3b5998.toInt() else Prefs.accentColor
+ cutoutDrawableRes = R.drawable.frost_f_256
+}) {
+ override fun postInflateMainPage(adapter: FastItemThemedAdapter<IItem<*, *>>) {
+ adapter.add(CardIItem {
+ descRes = R.string.frost_description
+ })
+ }
+} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt
index 3900849b..1d3ce5be 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/SettingsActivity.kt
@@ -53,11 +53,7 @@ class SettingsActivity : KPrefActivity() {
plainText(R.string.about_frost) {
onClick = {
_, _, _ ->
- LibsBuilder()
- //provide a style (optional) (LIGHT, DARK, LIGHT_DARK_TOOLBAR)
- .withActivityStyle(Libs.ActivityStyle.LIGHT_DARK_TOOLBAR)
- //start the activity
- .start(this@SettingsActivity)
+ startActivity(AboutActivity::class.java, transition = true)
true
}
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
index 3fe33475..986f9565 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -32,7 +32,7 @@ internal const val EXTRA_COOKIES = "extra_cookies"
internal const val ARG_URL = "arg_url"
fun Context.launchNewTask(clazz: Class<out Activity>, cookieList: ArrayList<CookieModel> = arrayListOf(), clearStack: Boolean = false) {
- startActivity(clazz, clearStack, {
+ startActivity(clazz, clearStack, intentBuilder = {
putParcelableArrayListExtra(EXTRA_COOKIES, cookieList)
})
}
@@ -60,7 +60,7 @@ val String.formattedFbUrl: String
fun Context.launchWebOverlay(url: String) {
val argUrl = url.formattedFbUrl
L.i("Launch web overlay: $argUrl")
- startActivity(WebOverlayActivity::class.java, false, {
+ startActivity(WebOverlayActivity::class.java, false, intentBuilder = {
putExtra(ARG_URL, argUrl)
})
}
diff --git a/app/src/main/res/drawable/frost_f_256.xml b/app/src/main/res/drawable/frost_f_256.xml
new file mode 100644
index 00000000..fce1b5ca
--- /dev/null
+++ b/app/src/main/res/drawable/frost_f_256.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="256dp"
+ android:height="256dp"
+ android:viewportHeight="177.16534"
+ android:viewportWidth="177.16534">
+
+ <path
+ android:pathData="M88.9405 31.61857l41.06143 23.88663M88.3467 31.59584l-31.358 18.2953M56.87005
+51.09542v94.26222M57.20726 87.2077l40.97656 23.86424"
+ android:strokeColor="#000"
+ android:strokeLineCap="round"
+ android:strokeWidth="10" />
+</vector> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 6fcb2c54..24d3d93c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -2,6 +2,7 @@
<string name="dev_email" translatable="false">pitchedapps@gmail.com</string>
<string name="play_store_package_id" translatable="false">com.pitchedapps.frost</string>
<string name="about_frost">About Frost for Facebook</string>
+ <string name="frost_description">Frost is a fully themable, fully functional alternative to the official Facebook app, made from scratch and proudly open sourced.</string>
<string name="section_format">Hello World from section: %1$d</string>
<string name="feed">Feed</string>