Skip to content

Commit dbacf85

Browse files
committed
add a Facebook image at the About section
1 parent f6ae35d commit dbacf85

File tree

9 files changed

+34
-2
lines changed

9 files changed

+34
-2
lines changed

app/src/main/java/com/simplemobiletools/notes/activities/AboutActivity.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.content.Intent;
44
import android.content.res.Resources;
5+
import android.net.Uri;
56
import android.os.Bundle;
67
import android.support.v7.app.AppCompatActivity;
78
import android.text.Html;
@@ -61,4 +62,15 @@ public void licenseClicked() {
6162
final Intent intent = new Intent(getApplicationContext(), LicenseActivity.class);
6263
startActivity(intent);
6364
}
65+
66+
@OnClick(R.id.about_facebook)
67+
public void facebookClicked() {
68+
String link = "https://www.facebook.com/simplemobiletools";
69+
try {
70+
getPackageManager().getPackageInfo("com.facebook.katana", 0);
71+
link = "fb://page/150270895341774";
72+
} catch (Exception ignored) {
73+
}
74+
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(link)));
75+
}
6476
}

app/src/main/res/layout/activity_about.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,28 @@
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"
3535
android:layout_below="@+id/about_email"
36+
android:layout_marginTop="@dimen/activity_margin"
3637
android:paddingBottom="@dimen/activity_margin"
3738
android:paddingTop="@dimen/activity_margin"
3839
android:text="@string/third_party_licences_underlined"
3940
android:textColor="@color/colorPrimary"/>
4041

42+
<TextView
43+
android:id="@+id/about_follow_us"
44+
android:layout_width="match_parent"
45+
android:layout_height="wrap_content"
46+
android:layout_below="@+id/about_license"
47+
android:paddingBottom="@dimen/social_padding"
48+
android:paddingTop="@dimen/activity_margin"
49+
android:text="@string/follow_us"/>
50+
51+
<ImageView
52+
android:id="@+id/about_facebook"
53+
android:layout_width="@dimen/social_logo"
54+
android:layout_height="@dimen/social_logo"
55+
android:layout_below="@+id/about_follow_us"
56+
android:src="@mipmap/facebook"/>
57+
4158
<TextView
4259
android:id="@+id/about_version"
4360
android:layout_width="match_parent"
1.09 KB
Loading
734 Bytes
Loading
1.38 KB
Loading
2.25 KB
Loading
2.97 KB
Loading

app/src/main/res/values/dimens.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
<resources>
22
<dimen name="activity_margin">16dp</dimen>
3+
<dimen name="social_padding">8dp</dimen>
4+
<dimen name="social_logo">40dp</dimen>
35
</resources>

app/src/main/res/values/strings.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66

77
<!-- About -->
88
<string name="about">About</string>
9-
<string name="website">For more simple apps or source codes please visit:\nhttp://simplemobiletools.com</string>
10-
<string name="email_label">You can send your feedback or new app suggestions at:</string>
9+
<string name="website">More simple apps and source code at:\nhttp://simplemobiletools.com</string>
10+
<string name="email_label">Send your feedback or suggestions at:</string>
1111
<string name="email">[email protected]</string>
1212
<string name="third_party_licences_underlined"><u>Third party licences</u></string>
13+
<string name="follow_us">Follow us at:</string>
1314
<string name="version">v %1$s</string>
1415
<string name="copyright">Copyright © Simple Mobile Tools %1$d</string>
1516

0 commit comments

Comments
 (0)