adding FAQ

This commit is contained in:
tibbi 2018-02-27 20:35:21 +01:00
parent 7bfc7fd534
commit 389aaac3ee
2 changed files with 13 additions and 1 deletions

View File

@ -60,6 +60,11 @@
android:label="@string/customize_colors" android:label="@string/customize_colors"
android:parentActivityName=".activities.SettingsActivity"/> android:parentActivityName=".activities.SettingsActivity"/>
<activity
android:name="com.simplemobiletools.commons.activities.FAQActivity"
android:label="@string/frequently_asked_questions"
android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity"/>
<receiver <receiver
android:name=".helpers.MyWidgetProvider" android:name=".helpers.MyWidgetProvider"
android:icon="@drawable/img_widget_preview"> android:icon="@drawable/img_widget_preview">

View File

@ -16,6 +16,7 @@ import com.simplemobiletools.commons.helpers.LICENSE_AUTOFITTEXTVIEW
import com.simplemobiletools.commons.helpers.LICENSE_ESPRESSO import com.simplemobiletools.commons.helpers.LICENSE_ESPRESSO
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
import com.simplemobiletools.commons.helpers.LICENSE_ROBOLECTRIC import com.simplemobiletools.commons.helpers.LICENSE_ROBOLECTRIC
import com.simplemobiletools.commons.models.FAQItem
import kotlinx.android.synthetic.main.activity_main.* import kotlinx.android.synthetic.main.activity_main.*
import me.grantland.widget.AutofitHelper import me.grantland.widget.AutofitHelper
@ -108,7 +109,13 @@ class MainActivity : SimpleActivity(), Calculator {
} }
private fun launchAbout() { private fun launchAbout() {
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_AUTOFITTEXTVIEW or LICENSE_ROBOLECTRIC or LICENSE_ESPRESSO, BuildConfig.VERSION_NAME) val faqItems = arrayListOf(
FAQItem(R.string.faq_1_title_commons, R.string.faq_1_text_commons),
FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons),
FAQItem(R.string.faq_4_title_commons, R.string.faq_4_text_commons)
)
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_AUTOFITTEXTVIEW or LICENSE_ROBOLECTRIC or LICENSE_ESPRESSO, BuildConfig.VERSION_NAME, faqItems)
} }
private fun getButtonIds() = arrayOf(btn_decimal, btn_0, btn_1, btn_2, btn_3, btn_4, btn_5, btn_6, btn_7, btn_8, btn_9) private fun getButtonIds() = arrayOf(btn_decimal, btn_0, btn_1, btn_2, btn_3, btn_4, btn_5, btn_6, btn_7, btn_8, btn_9)