mirror of
https://github.com/ethauvin/android-about-box.git
synced 2025-04-25 18:47:12 -07:00
Added AboutBox library source code. Implemented IAnalytic and IDialog interfaces for custom usage.
This commit is contained in:
parent
8a88eb2217
commit
8b28ebfb79
56 changed files with 1296 additions and 0 deletions
11
library/src/main/AndroidManifest.xml
Normal file
11
library/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.eggheadgames.aboutbox">
|
||||
|
||||
<application android:label="@string/app_name">
|
||||
<activity
|
||||
android:name="com.eggheadgames.aboutbox.activity.AboutActivity"
|
||||
android:theme="@style/AppTheme.MaterialAboutActivity" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -0,0 +1,49 @@
|
|||
package com.eggheadgames.aboutbox;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class AboutConfig {
|
||||
|
||||
public enum BuildType {AMAZON, GOOGLE}
|
||||
|
||||
private static AboutConfig aboutConfig;
|
||||
|
||||
public static AboutConfig getInstance() {
|
||||
if (aboutConfig == null) {
|
||||
aboutConfig = new AboutConfig();
|
||||
}
|
||||
return aboutConfig;
|
||||
}
|
||||
|
||||
// general info
|
||||
public String appName;
|
||||
public int appIcon;
|
||||
public String version;
|
||||
public String aboutLabelTitle;
|
||||
public String logUiEventName;
|
||||
public String facebookUserName;
|
||||
public String twitterUserName;
|
||||
public String webHomePage;
|
||||
public String appPublisher;
|
||||
public String companyHtmlPath;
|
||||
public String privacyHtmlPath;
|
||||
public String acknowledgmentHtmlPath;
|
||||
public BuildType buildType;
|
||||
|
||||
public Context context;
|
||||
|
||||
// custom analytics and dialog
|
||||
public IAnalytic analytics;
|
||||
public IDialog dialog;
|
||||
|
||||
// email
|
||||
public String emailAddress;
|
||||
public String emailSubject;
|
||||
public String emailBody;
|
||||
|
||||
// share
|
||||
public String shareMessageTitle;
|
||||
public String shareMessage;
|
||||
public String sharingTitle;
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.eggheadgames.aboutbox;
|
||||
|
||||
public interface IAnalytic {
|
||||
void logUiEvent(String action, String label);
|
||||
|
||||
void logException(Exception e, boolean fatal);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.eggheadgames.aboutbox;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
public interface IDialog {
|
||||
void open(AppCompatActivity activity, String url, String tag);
|
||||
}
|
|
@ -0,0 +1,270 @@
|
|||
package com.eggheadgames.aboutbox.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.danielstone.materialaboutlibrary.MaterialAboutActivity;
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutActionItem;
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutCard;
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutList;
|
||||
import com.danielstone.materialaboutlibrary.model.MaterialAboutTitleItem;
|
||||
import com.eggheadgames.aboutbox.AboutConfig;
|
||||
import com.eggheadgames.aboutbox.R;
|
||||
import com.eggheadgames.aboutbox.share.EmailUtil;
|
||||
import com.eggheadgames.aboutbox.share.ShareUtil;
|
||||
|
||||
public class AboutActivity extends MaterialAboutActivity {
|
||||
|
||||
public static void launch(Activity activity) {
|
||||
Intent intent = new Intent(activity, AboutActivity.class);
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MaterialAboutList getMaterialAboutList(Context context) {
|
||||
|
||||
final AboutConfig config = AboutConfig.getInstance();
|
||||
|
||||
MaterialAboutCard.Builder generalInfoCardBuilder = new MaterialAboutCard.Builder();
|
||||
|
||||
generalInfoCardBuilder.addItem(new MaterialAboutTitleItem.Builder()
|
||||
.text(config.appName)
|
||||
.icon(config.appIcon)
|
||||
.build());
|
||||
|
||||
generalInfoCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.version)
|
||||
.subText(config.version)
|
||||
.build());
|
||||
|
||||
|
||||
MaterialAboutCard.Builder supportCardBuilder = new MaterialAboutCard.Builder();
|
||||
supportCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.contact_support)
|
||||
.icon(R.drawable.ic_email_black)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
EmailUtil.contactUs(AboutActivity.this);
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Contact");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
|
||||
|
||||
MaterialAboutCard.Builder shareCardBuilder = new MaterialAboutCard.Builder();
|
||||
shareCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.leave_review)
|
||||
.icon(R.drawable.ic_review)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
openApp(config.context.getPackageName(), config.buildType == AboutConfig.BuildType.GOOGLE);
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Review");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
shareCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.share)
|
||||
.icon(R.drawable.ic_share_black)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
ShareUtil.share(AboutActivity.this);
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Share");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
|
||||
|
||||
MaterialAboutCard.Builder aboutCardBuilder = new MaterialAboutCard.Builder();
|
||||
aboutCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.try_other_apps)
|
||||
.icon(R.drawable.ic_try_other_apps)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
openPublisher(config.buildType == AboutConfig.BuildType.GOOGLE, config.appPublisher);
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Try Other Apps");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
aboutCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(config.aboutLabelTitle)
|
||||
.icon(R.drawable.ic_about_black)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
if (config.dialog == null) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(config.companyHtmlPath)));
|
||||
} else {
|
||||
config.dialog.open(AboutActivity.this, config.companyHtmlPath, config.aboutLabelTitle);
|
||||
}
|
||||
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, config.aboutLabelTitle);
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
|
||||
|
||||
MaterialAboutCard.Builder socialNetworksCardBuilder = new MaterialAboutCard.Builder();
|
||||
socialNetworksCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.facebook_label)
|
||||
.subText(config.facebookUserName)
|
||||
.icon(R.drawable.ic_facebook_24)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
getOpenFacebookIntent(AboutActivity.this, config.facebookUserName);
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Facebook");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
socialNetworksCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.twitter_label)
|
||||
.subText(config.twitterUserName)
|
||||
.icon(R.drawable.ic_twitter_24dp)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
startTwitter(AboutActivity.this, config.twitterUserName);
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Twitter");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
|
||||
socialNetworksCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.web_label)
|
||||
.subText(config.webHomePage.replace("https://", "").replace("http://", "").replace("/", ""))
|
||||
.icon(R.drawable.ic_web_black_24dp)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(config.webHomePage)));
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Website");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
|
||||
MaterialAboutCard.Builder privacyCardBuilder = new MaterialAboutCard.Builder();
|
||||
privacyCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.privacy_policy)
|
||||
.icon(R.drawable.ic_privacy)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
if (config.dialog == null) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(config.privacyHtmlPath)));
|
||||
} else {
|
||||
config.dialog.open(AboutActivity.this, config.privacyHtmlPath, getString(R.string.privacy_policy));
|
||||
}
|
||||
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Privacy");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
privacyCardBuilder.addItem(new MaterialAboutActionItem.Builder()
|
||||
.text(R.string.acknowledgment)
|
||||
.icon(R.drawable.ic_acknowledgment)
|
||||
.setOnClickListener(new MaterialAboutActionItem.OnClickListener() {
|
||||
@Override
|
||||
public void onClick() {
|
||||
if (config.dialog == null) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(config.acknowledgmentHtmlPath)));
|
||||
} else {
|
||||
config.dialog.open(AboutActivity.this, config.acknowledgmentHtmlPath, getString(R.string.acknowledgment));
|
||||
}
|
||||
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent(config.logUiEventName, "Acknowlegement");
|
||||
}
|
||||
}
|
||||
})
|
||||
.build());
|
||||
|
||||
|
||||
return new MaterialAboutList.Builder()
|
||||
.addCard(generalInfoCardBuilder.build())
|
||||
.addCard(supportCardBuilder.build())
|
||||
.addCard(shareCardBuilder.build())
|
||||
.addCard(aboutCardBuilder.build())
|
||||
.addCard(socialNetworksCardBuilder.build())
|
||||
.addCard(privacyCardBuilder.build())
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CharSequence getActivityTitle() {
|
||||
return getString(R.string.about_screen_title);
|
||||
}
|
||||
|
||||
public static void getOpenFacebookIntent(Activity context, String name) {
|
||||
Intent intent;
|
||||
try {
|
||||
context.getPackageManager().getPackageInfo("com.facebook.katana", 0);
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://profile/" + name));
|
||||
} catch (Exception e) {
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/" + name));
|
||||
}
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
public static void startTwitter(Activity context, String name) {
|
||||
Intent intent;
|
||||
try {
|
||||
context.getPackageManager().getPackageInfo("com.twitter.android", 0);
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=" + name));
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
} catch (Exception e) {
|
||||
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/" + name));
|
||||
}
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public void openApp(String packageName, boolean googlePlay) {//true if Google Play, false if Amazon Store
|
||||
try {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse((googlePlay ? "market://details?id=" : "amzn://apps/android?p=") + packageName)));
|
||||
} catch (ActivityNotFoundException e1) {
|
||||
try {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse((googlePlay ? "http://play.google.com/store/apps/details?id=" : "http://www.amazon.com/gp/mas/dl/android?p=") + packageName)));
|
||||
} catch (ActivityNotFoundException e2) {
|
||||
Toast.makeText(this, "You don't have any app that can open this link", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void openPublisher(boolean googlePlay, String publisher) {//true if Google Play, false if Amazon Store
|
||||
try {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse((googlePlay ? "market://search?q=pub:" : "amzn://apps/android?showAll=1&p=") + publisher)));
|
||||
} catch (ActivityNotFoundException e1) {
|
||||
try {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse((googlePlay ? "http://play.google.com/store/search?q=pub:" : "http://www.amazon.com/gp/mas/dl/android?showAll=1&p=") + publisher)));
|
||||
} catch (ActivityNotFoundException e2) {
|
||||
Toast.makeText(this, "You don't have any app that can open this link", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.eggheadgames.aboutbox.share;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
||||
import com.eggheadgames.aboutbox.AboutConfig;
|
||||
import com.eggheadgames.aboutbox.BuildConfig;
|
||||
|
||||
public final class EmailUtil {
|
||||
|
||||
private EmailUtil() {
|
||||
// Utility class
|
||||
}
|
||||
|
||||
public static void contactUs(Activity activity) {
|
||||
AboutConfig config = AboutConfig.getInstance();
|
||||
|
||||
final Uri mailto = Uri.fromParts("mailto", config.emailAddress, null);
|
||||
|
||||
final String emailSubject;
|
||||
|
||||
if ("google".equals(BuildConfig.FLAVOR)) {
|
||||
emailSubject = config.emailSubject + "G";
|
||||
} else if ("amazon".equals(BuildConfig.FLAVOR)) {
|
||||
emailSubject = config.emailSubject + "K";
|
||||
} else {
|
||||
emailSubject = config.emailSubject;
|
||||
}
|
||||
|
||||
try {
|
||||
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, mailto);
|
||||
emailIntent.putExtra(Intent.EXTRA_SUBJECT, emailSubject);
|
||||
emailIntent.putExtra(Intent.EXTRA_TEXT, config.emailBody);
|
||||
activity.startActivity(Intent.createChooser(emailIntent, "Send email..."));
|
||||
} catch (Exception e) {
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logException(e, false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
package com.eggheadgames.aboutbox.share;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.eggheadgames.aboutbox.AboutConfig;
|
||||
|
||||
import io.branch.indexing.BranchUniversalObject;
|
||||
import io.branch.referral.Branch;
|
||||
import io.branch.referral.BranchError;
|
||||
import io.branch.referral.SharingHelper;
|
||||
import io.branch.referral.util.LinkProperties;
|
||||
import io.branch.referral.util.ShareSheetStyle;
|
||||
|
||||
public final class ShareUtil {
|
||||
|
||||
private ShareUtil() {
|
||||
// Utility class
|
||||
}
|
||||
|
||||
public static void share(Activity activity) {
|
||||
BranchUniversalObject branchUniversalObject = new BranchUniversalObject();
|
||||
final AboutConfig config = AboutConfig.getInstance();
|
||||
|
||||
ShareSheetStyle shareSheetStyle = new ShareSheetStyle(activity, config.shareMessageTitle,
|
||||
config.shareMessage)
|
||||
.setCopyUrlStyle(activity.getResources().getDrawable(android.R.drawable.ic_menu_send),
|
||||
"Copy", "Added to clipboard")
|
||||
.setMoreOptionStyle(activity.getResources().getDrawable(android.R.drawable.ic_menu_search), "Show more")
|
||||
.addPreferredSharingOption(SharingHelper.SHARE_WITH.FACEBOOK)
|
||||
.addPreferredSharingOption(SharingHelper.SHARE_WITH.EMAIL)
|
||||
.setSharingTitle(config.sharingTitle);
|
||||
|
||||
branchUniversalObject.showShareSheet(activity,
|
||||
new LinkProperties(), shareSheetStyle, new Branch.BranchLinkShareListener() {
|
||||
@Override
|
||||
public void onShareLinkDialogLaunched() {
|
||||
//nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShareLinkDialogDismissed() {
|
||||
if (config.analytics != null) {
|
||||
config.analytics.logUiEvent("Share", "Dismissed");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLinkShareResponse(String sharedLink, String sharedChannel, BranchError error) {
|
||||
if (config.analytics != null) {
|
||||
if (error == null || TextUtils.isEmpty(error.getMessage())) {
|
||||
config.analytics.logUiEvent("Share", sharedChannel);
|
||||
} else {
|
||||
config.analytics.logUiEvent("Share Failure", error.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChannelSelected(String channelName) {
|
||||
//nothing
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
9
library/src/main/res/drawable/ic_about_black.xml
Normal file
9
library/src/main/res/drawable/ic_about_black.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#7B7B7B"
|
||||
android:pathData="M19,2L5,2c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h4l3,3 3,-3h4c1.1,0 2,-0.9 2,-2L21,4c0,-1.1 -0.9,-2 -2,-2zM13,18h-2v-2h2v2zM15.07,10.25l-0.9,0.92C13.45,11.9 13,12.5 13,14h-2v-0.5c0,-1.1 0.45,-2.1 1.17,-2.83l1.24,-1.26c0.37,-0.36 0.59,-0.86 0.59,-1.41 0,-1.1 -0.9,-2 -2,-2s-2,0.9 -2,2L8,8c0,-2.21 1.79,-4 4,-4s4,1.79 4,4c0,0.88 -0.36,1.68 -0.93,2.25z"/>
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_acknowledgment.xml
Normal file
9
library/src/main/res/drawable/ic_acknowledgment.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF004DB4"
|
||||
android:pathData="M12,1L3,5v6c0,5.55 3.84,10.74 9,12 5.16,-1.26 9,-6.45 9,-12L21,5l-9,-4zM10,17l-4,-4 1.41,-1.41L10,14.17l6.59,-6.59L18,9l-8,8z"/>
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_email_black.xml
Normal file
9
library/src/main/res/drawable/ic_email_black.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#3B3B3B"
|
||||
android:pathData="M20,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2zm0,4l-8,5 -8,-5V6l8,5 8,-5v2z"/>
|
||||
</vector>
|
12
library/src/main/res/drawable/ic_facebook_24.xml
Normal file
12
library/src/main/res/drawable/ic_facebook_24.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="216"
|
||||
android:viewportHeight="216">
|
||||
|
||||
<path
|
||||
android:fillColor="#3C5A99"
|
||||
android:pathData="M204.1,0H11.9C5.3,0,0,5.3,0,11.9v192.2c0,6.6,5.3,11.9,11.9,11.9h103.5v-83.6H87.2V99.8h28.1
|
||||
v-24c0-27.9,17-43.1,41.9-43.1c11.9,0,22.2,0.9,25.2,1.3v29.2l-17.3,0c-13.5,0-16.2,6.4-16.2,15.9v20.8h32.3l-4.2,32.6H149V216h55
|
||||
c6.6,0,11.9-5.3,11.9-11.9V11.9C216,5.3,210.7,0,204.1,0z" />
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_privacy.xml
Normal file
9
library/src/main/res/drawable/ic_privacy.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1s3.1,1.39 3.1,3.1v2L8.9,8L8.9,6zM18,20L6,20L6,10h12v10z"/>
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_review.xml
Normal file
9
library/src/main/res/drawable/ic_review.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFBD00"
|
||||
android:pathData="M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"/>
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_share_black.xml
Normal file
9
library/src/main/res/drawable/ic_share_black.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#979797"
|
||||
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_try_other_apps.xml
Normal file
9
library/src/main/res/drawable/ic_try_other_apps.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF0079FD"
|
||||
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM15.5,11c0.83,0 1.5,-0.67 1.5,-1.5S16.33,8 15.5,8 14,8.67 14,9.5s0.67,1.5 1.5,1.5zM8.5,11c0.83,0 1.5,-0.67 1.5,-1.5S9.33,8 8.5,8 7,8.67 7,9.5 7.67,11 8.5,11zM12,17.5c2.33,0 4.31,-1.46 5.11,-3.5L6.89,14c0.8,2.04 2.78,3.5 5.11,3.5z"/>
|
||||
</vector>
|
16
library/src/main/res/drawable/ic_twitter_24dp.xml
Normal file
16
library/src/main/res/drawable/ic_twitter_24dp.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#1DA1F2"
|
||||
android:pathData="M12,0C5.4,0,0,5.4,0,12s5.4,12,12,12s12-5.4,12-12S18.6,0,12,0z
|
||||
M12,23C5.9,23,1,18.1,1,12S5.9,1,12,1 s11,4.9,11,11S18.1,23,12,23z
|
||||
M18.5,10c0,0.1,0,0.3,0,0.4c0,4.1-3.1,8.8-8.8,8.8c-1.7,0-3.4-0.5-4.7-1.4c0.2,0,0.5,0,0.7,0
|
||||
c1.4,0,2.8-0.5,3.8-1.3c-1.3,0-2.5-0.9-2.9-2.1c0.2,0,0.4,0.1,0.6,0.1c0.3,0,0.6,0,0.8-0.1c-1.4-0.3-2.5-1.5-2.5-3l0,0
|
||||
c0.5,0.1,1,0.3,1.5,0.3c-0.8-0.6-1.4-1.5-1.4-2.6C5.6,8.5,5.8,8,6,7.6c1.5,1.9,3.8,3.1,6.3,3.2c-0.1-0.2-0.1-0.5-0.1-0.7
|
||||
c0-1.7,1.4-3.1,3.1-3.1c0.9,0,1.7,0.4,2.2,1c0.7-0.1,1.4-0.4,2-0.7C19.3,8,18.8,8.6,18.1,9c0.6-0.1,1.2-0.2,1.8-0.5
|
||||
C19.6,9.1,19.1,9.6,18.5,10z" />
|
||||
</vector>
|
9
library/src/main/res/drawable/ic_web_black_24dp.xml
Normal file
9
library/src/main/res/drawable/ic_web_black_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF308BEA"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM11,19.93c-3.95,-0.49 -7,-3.85 -7,-7.93 0,-0.62 0.08,-1.21 0.21,-1.79L9,15v1c0,1.1 0.9,2 2,2v1.93zM17.9,17.39c-0.26,-0.81 -1,-1.39 -1.9,-1.39h-1v-3c0,-0.55 -0.45,-1 -1,-1L8,12v-2h2c0.55,0 1,-0.45 1,-1L11,7h2c1.1,0 2,-0.9 2,-2v-0.41c2.93,1.19 5,4.06 5,7.41 0,2.08 -0.8,3.97 -2.1,5.39z"/>
|
||||
</vector>
|
6
library/src/main/res/values/colors.xml
Normal file
6
library/src/main/res/values/colors.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
</resources>
|
15
library/src/main/res/values/strings.xml
Normal file
15
library/src/main/res/values/strings.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<resources>
|
||||
<string name="app_name">AboutBox</string>
|
||||
<string name="leave_review">Leave Review</string>
|
||||
<string name="contact_support">Contact Support</string>
|
||||
<string name="try_other_apps">Try Other Apps</string>
|
||||
<string name="version">Version</string>
|
||||
<string name="facebook_label">Facebook</string>
|
||||
<string name="twitter_label">Twitter</string>
|
||||
<string name="web_label">Web</string>
|
||||
<string name="acknowledgment">Acknowledgment</string>
|
||||
<string name="privacy_policy">Privacy Policy</string>
|
||||
<string name="about_screen_title">About</string>
|
||||
<string name="share">Share</string>
|
||||
|
||||
</resources>
|
9
library/src/main/res/values/styles.xml
Normal file
9
library/src/main/res/values/styles.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AppTheme.MaterialAboutActivity" parent="Theme.Mal" >
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
</style>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue