add a Facebook image at the About section
This commit is contained in:
parent
fea1eb7e58
commit
67055aabd8
|
@ -2,6 +2,7 @@ package com.simplemobiletools.flashlight.activities;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.Html;
|
||||
|
@ -61,4 +62,15 @@ public class AboutActivity extends AppCompatActivity {
|
|||
final Intent intent = new Intent(getApplicationContext(), LicenseActivity.class);
|
||||
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)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,11 +33,28 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/about_email"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:paddingBottom="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:text="@string/third_party_licences_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_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
|
||||
android:id="@+id/about_version"
|
||||
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.0 KiB |
|
@ -1,3 +1,5 @@
|
|||
<resources>
|
||||
<dimen name="activity_margin">16dp</dimen>
|
||||
<dimen name="social_padding">8dp</dimen>
|
||||
<dimen name="social_logo">40dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
|
||||
<!-- About -->
|
||||
<string name="about">About</string>
|
||||
<string name="website">For more simple apps or source codes please visit:\nhttp://simplemobiletools.com</string>
|
||||
<string name="email_label">You can send your feedback or new app suggestions at:</string>
|
||||
<string name="website">More simple apps and source code at:\nhttp://simplemobiletools.com</string>
|
||||
<string name="email_label">Send your feedback or suggestions at:</string>
|
||||
<string name="email">hello@simplemobiletools.com</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="copyright">Copyright © Simple Mobile Tools %1$d</string>
|
||||
|
||||
|
|
Loading…
Reference in New Issue