add a Facebook follow image at the About section

This commit is contained in:
tibbi 2016-06-19 13:07:18 +02:00
parent 9fdf5bcd44
commit 65abeb5303
9 changed files with 34 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package com.simplemobiletools.gallery.activities;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.text.Html; import android.text.Html;
@ -61,4 +62,15 @@ public class AboutActivity extends AppCompatActivity {
final Intent intent = new Intent(getApplicationContext(), LicenseActivity.class); final Intent intent = new Intent(getApplicationContext(), LicenseActivity.class);
startActivity(intent); startActivity(intent);
} }
@OnClick(R.id.about_facebook)
public void facebookClicked() {
String link = "https://www.facebook.com/simplemobiletools";
try {
getPackageManager().getPackageInfo("com.facebook.katana", 0);
link = "fb://page/150270895341774";
} catch (Exception ignored) {
}
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(link)));
}
} }

View file

@ -33,11 +33,28 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/about_email" android:layout_below="@+id/about_email"
android:layout_marginTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin" android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin" android:paddingTop="@dimen/activity_margin"
android:text="@string/third_party_licences_underlined" android:text="@string/third_party_licences_underlined"
android:textColor="@color/colorPrimary"/> 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_license"
android:paddingBottom="@dimen/social_padding"
android:paddingTop="@dimen/activity_margin"
android:text="@string/follow_us"/>
<ImageView
android:id="@+id/about_facebook"
android:layout_width="@dimen/social_logo"
android:layout_height="@dimen/social_logo"
android:layout_below="@+id/about_follow_us"
android:src="@mipmap/facebook"/>
<TextView <TextView
android:id="@+id/about_version" android:id="@+id/about_version"
android:layout_width="match_parent" android:layout_width="match_parent"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -6,4 +6,6 @@
<dimen name="play_outline_size_big">160dp</dimen> <dimen name="play_outline_size_big">160dp</dimen>
<dimen name="undo_padding">8dp</dimen> <dimen name="undo_padding">8dp</dimen>
<dimen name="timer_padding">24dp</dimen> <dimen name="timer_padding">24dp</dimen>
<dimen name="social_padding">8dp</dimen>
<dimen name="social_logo">40dp</dimen>
</resources> </resources>

View file

@ -32,10 +32,11 @@
<!-- About --> <!-- About -->
<string name="about">About</string> <string name="about">About</string>
<string name="website">For more simple apps or source codes please visit:\nhttp://simplemobiletools.com</string> <string name="website">More simple apps and source code at:\nhttp://simplemobiletools.com</string>
<string name="email_label">You can send your feedback or new app suggestions at:</string> <string name="email_label">Send your feedback or suggestions at:</string>
<string name="email">hello@simplemobiletools.com</string> <string name="email">hello@simplemobiletools.com</string>
<string name="third_party_licences_underlined"><u>Third party licences</u></string> <string name="third_party_licences_underlined"><u>Third party licences</u></string>
<string name="follow_us">Follow us at:</string>
<string name="version">v %1$s</string> <string name="version">v %1$s</string>
<string name="copyright">Copyright © Simple Mobile Tools %1$d</string> <string name="copyright">Copyright © Simple Mobile Tools %1$d</string>