From 139cd117413f3bcdcab0c0518eb6fb13fa90fb8a Mon Sep 17 00:00:00 2001 From: Alex Dibrivnyi Date: Tue, 16 May 2017 22:13:11 +0300 Subject: [PATCH 1/2] Updated Readme file. Incremented version number --- README.md | 28 ++++++++++++++++++++-------- library/build.gradle | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4dc387a..15dafe8 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,7 @@ dependencies { } ``` -## Example -### Setup Branch.io - -Branch.io integration can be found [here](https://github.com/BranchMetrics/android-branch-deep-linking) - -### Setup AboutBox +## Setup AboutBox Add AboutBox configuration to your Application class @@ -90,12 +85,29 @@ Add AboutBox configuration to your Application class aboutConfig.emailSubject = EMAIL_SUBJECT; aboutConfig.emailBody = EMAIL_BODY; - // Branch.io labels. - aboutConfig.shareMessageTitle = getString(R.string.share_message_title); + +``` + +You need to provide only one sharing solution. + +Android Native share. +Android share intent will be called when you specify only `shareMessage` and `sharingTitle`. +``` aboutConfig.shareMessage = getString(R.string.share_message); aboutConfig.sharingTitle = getString(R.string.sharing_title); ``` +Custom share. +Override this callback if you want to call your own share implementation. In this case no need to specify `shareMessage` and `sharingTitle`. + ``` + aboutConfig.share = new IShare() { + @Override + public void share(Activity activity) { + // do custom sharing + } + }; +``` + Open AboutBox screen ```java diff --git a/library/build.gradle b/library/build.gradle index a80bf55..33530f1 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -12,7 +12,7 @@ android { minSdkVersion 15 targetSdkVersion 24 versionCode 4 - versionName "1.1.0" + versionName "1.2.0" } buildTypes { release { From 1a79efd84a783d7aafd0c2c7a8c258dbc4a39651 Mon Sep 17 00:00:00 2001 From: mikemee Date: Tue, 16 May 2017 12:25:38 -0700 Subject: [PATCH 2/2] Edit sharing information, adjust styling --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 15dafe8..72a96a6 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Android About Box is configured with a set of (mostly) strings for the company n When triggered from a menu item, it will display the app name, icon and version, provide links to contact support, leave a review, share the app, go to other apps by the same company in the app store -- as well as links to Facebook etc. -As of version 1.1.0, you can also optionally provide a help file with the `aboutConfig.guideHtmlPath` setting. Leave it unset (null or empty string) and the behaviour is compatible with version 1.0.x. +As of version 1.2.0, you can omit many features that don't apply (e.g. like website), by not setting the values. ## Installation Instructions @@ -88,18 +88,24 @@ Add AboutBox configuration to your Application class ``` -You need to provide only one sharing solution. +## Open the About Box from your app -Android Native share. -Android share intent will be called when you specify only `shareMessage` and `sharingTitle`. +```java + AboutActivity.launch(activity); ``` + + + +## Sharing + +By default, the default Android share intent will be called with the values specified in `shareMessage` and `sharingTitle`. For example: +```java aboutConfig.shareMessage = getString(R.string.share_message); aboutConfig.sharingTitle = getString(R.string.sharing_title); ``` -Custom share. -Override this callback if you want to call your own share implementation. In this case no need to specify `shareMessage` and `sharingTitle`. - ``` +Alternatively, you can provide a custom sharing function (and omit `shareMessage` and `sharingTitle`): + ```java aboutConfig.share = new IShare() { @Override public void share(Activity activity) { @@ -108,17 +114,11 @@ Override this callback if you want to call your own share implementation. In thi }; ``` -Open AboutBox screen - -```java - AboutActivity.launch(activity); -``` - ## Theme -Add to your AndroidManifest.xml file +If you add the following to your AndroidManifest.xml file, the About Box will use these colours. This allows you to match your app colours: -``` +```xml @@ -132,7 +132,7 @@ Theme.Mal.Dark.LightActionBar Theme.Mal.Dark.DarkActionBar ``` -``` +```xml