1
0
Fork 0
mirror of https://github.com/ethauvin/android-about-box.git synced 2025-04-25 02:37:11 -07:00

Edit sharing information, adjust styling

This commit is contained in:
mikemee 2017-05-16 12:25:38 -07:00 committed by GitHub
parent 139cd11741
commit 1a79efd84a

View file

@ -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. 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 ## 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. ```java
Android share intent will be called when you specify only `shareMessage` and `sharingTitle`. 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.shareMessage = getString(R.string.share_message);
aboutConfig.sharingTitle = getString(R.string.sharing_title); aboutConfig.sharingTitle = getString(R.string.sharing_title);
``` ```
Custom share. Alternatively, you can provide a custom sharing function (and omit `shareMessage` and `sharingTitle`):
Override this callback if you want to call your own share implementation. In this case no need to specify `shareMessage` and `sharingTitle`. ```java
```
aboutConfig.share = new IShare() { aboutConfig.share = new IShare() {
@Override @Override
public void share(Activity activity) { 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 ## 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
<activity <activity
android:name="com.eggheadgames.aboutbox.activity.AboutActivity" android:name="com.eggheadgames.aboutbox.activity.AboutActivity"
android:theme="@style/AppTheme.MaterialAboutActivity"/> android:theme="@style/AppTheme.MaterialAboutActivity"/>
@ -132,7 +132,7 @@ Theme.Mal.Dark.LightActionBar
Theme.Mal.Dark.DarkActionBar Theme.Mal.Dark.DarkActionBar
``` ```
``` ```xml
<style name="AppTheme.MaterialAboutActivity" parent="Theme.Mal.Light.DarkActionBar" > <style name="AppTheme.MaterialAboutActivity" parent="Theme.Mal.Light.DarkActionBar" >
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>