updated the About activity

This commit is contained in:
tibbi 2016-12-10 11:20:47 +01:00
parent a97ed6cb03
commit 960267c543
2 changed files with 37 additions and 3 deletions

View File

@ -18,12 +18,14 @@ class AboutActivity : SimpleActivity() {
setContentView(R.layout.activity_about)
setupEmail()
setupCopyright()
setupMoreApps()
setupRateUs()
setupInvite()
setupLicense()
setupDonate()
setupFacebook()
setupGPlus()
setupCopyright()
}
private fun setupEmail() {
@ -34,6 +36,12 @@ class AboutActivity : SimpleActivity() {
about_email.movementMethod = LinkMovementMethod.getInstance()
}
private fun setupMoreApps() {
about_more_apps.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/dev?id=9070296388022589266")))
}
}
private fun setupCopyright() {
val versionName = BuildConfig.VERSION_NAME
val year = Calendar.getInstance().get(Calendar.YEAR)
@ -76,6 +84,12 @@ class AboutActivity : SimpleActivity() {
}
}
fun setupDonate() {
about_donate.setOnClickListener {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("http://simplemobiletools.github.io/donate")))
}
}
fun setupFacebook() {
about_facebook.setOnClickListener {
var link = "https://www.facebook.com/simplemobiletools"

View File

@ -36,12 +36,22 @@
android:text="@string/email"/>
<TextView
android:id="@+id/about_invite"
android:id="@+id/about_more_apps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_email"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/more_apps_underlined"
android:textColor="@color/colorPrimary"/>
<TextView
android:id="@+id/about_invite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_more_apps"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/invite_friends_underlined"
android:textColor="@color/colorPrimary"/>
@ -66,10 +76,20 @@
android:textColor="@color/colorPrimary"/>
<TextView
android:id="@+id/about_follow_us"
android:id="@+id/about_donate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_license"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/donate_underlined"
android:textColor="@color/colorPrimary"/>
<TextView
android:id="@+id/about_follow_us"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_donate"
android:paddingBottom="@dimen/social_padding"
android:paddingTop="@dimen/activity_margin"
android:text="@string/follow_us"/>