Skip to content

Commit a742b01

Browse files
committed
Merge pull request #53 from androidsx/docs/simplify-readme
Docs/simplify readme
2 parents 6708043 + 7ba711a commit a742b01

File tree

3 files changed

+44
-49
lines changed

3 files changed

+44
-49
lines changed

README.md

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Rate-Me
1+
Rate-Me [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Rate--Me-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1032)
22
=======
33

44
Rate Me is an Android 2.3+ library that shows dialog to suggest the user to rate the application in the Google Play Store.
@@ -13,7 +13,7 @@ How to integrate
1313
## Eclipse
1414

1515
1. Download and extract the ZIP file
16-
2. Import the sources: File > Import > Existing projects into workspace > Select directory > add LibraryRateMe
16+
2. Import the sources: File > Import > Existing projects into workspace > Select directory > add `LibraryRateMe`
1717
3. Add it as a library: Right click on your project > Android > Library: Add > LibraryRateMe
1818

1919
## Gradle
@@ -31,67 +31,62 @@ You can see the last version in [Maven Central](http://search.maven.org/#search%
3131
How to use
3232
==========
3333

34-
The integration is very simple: mimic [this example](https://github.com/androidsx/rate-me/blob/master/SampleProject/src/com/androidsx/rateme/demo1/SampleProject.java) to link the dialog from your own button.
35-
36-
When you want to use this library you need choose the icon for your dialg.
34+
Have a look at [the sample code](https://github.com/androidsx/rate-me/blob/master/SampleProject/src/com/androidsx/rateme/demo1/SampleProject.java) or check out a simple integration:
3735

3836
```java
39-
40-
.setLogoResourceId(R.drawable.icon)
37+
new DialogRateMe.Builder(context)
38+
.setLogoResourceId(R.drawable.ic_launcher)
39+
.setGoToMail(true)
40+
.setEmail(getString(R.string.support_email))
41+
.setShowShareButton(false)
42+
.build()
43+
.show(getFragmentManager(), "dialog");
4144
```
4245

43-
If you don´t pass the icon, the library will default the icon that has the name `ic_launcher`.
44-
45-
If you use the goToMail Dialog in `true`, you need to configure the company email in `setEmail`
46-
47-
You have different options to configure the library and this is a example :
46+
The full list of options is:
4847

4948
```java
50-
new DialogRateMe.Builder(this)
51-
.setDialogColor(Color.White)
52-
.setIconCloseColorFilter(Color.DKGRAY)
53-
.setLineDividerColor(Color.BLUE)
54-
.setLogoResourceId(R.drawable.ic_launcher)
55-
.setRateButtonBackgroundColor(Color.BLUE)
56-
.setRateButtonPressedBackgroundColor(Color.RED)
57-
.setRateButtonTextColor(Color.White)
58-
.setGoToMail(true)
59-
.setLogoResourceId(R.drawable.icon)
60-
.setShowOKButtonByDefault(false)
61-
.setEmail(getString(R.string.support_email))
62-
.setShowShareButton(false)
63-
.setTextColor(Color.BLUE)
64-
.setTitleBackgroundColor(Color.White)
65-
.setTitleTextColor(Color.BLUE)
66-
.build()
67-
.show(getFragmentManager(), "dialog");
49+
new DialogRateMe.Builder(this)
50+
.setDialogColor(Color.White)
51+
.setIconCloseColorFilter(Color.DKGRAY)
52+
.setLineDividerColor(Color.BLUE)
53+
.setLogoResourceId(R.drawable.ic_launcher)
54+
.setRateButtonBackgroundColor(Color.BLUE)
55+
.setRateButtonPressedBackgroundColor(Color.RED)
56+
.setRateButtonTextColor(Color.White)
57+
.setGoToMail(true)
58+
.setShowOKButtonByDefault(false)
59+
.setEmail(getString(R.string.support_email))
60+
.setShowShareButton(false)
61+
.setTextColor(Color.BLUE)
62+
.setTitleBackgroundColor(Color.White)
63+
.setTitleTextColor(Color.BLUE)
64+
.build()
65+
.show(getFragmentManager(), "dialog");
6866
```
6967

70-
This Library can be opened automatically by calling the method onStart in our project.
68+
Dynamic opening of the dialog
69+
-----
70+
71+
In case you want the dialog to appear based on the number of times the app has been opened or the install date, have a look at this example:
7172

7273
```java
73-
@Override
74-
protected void onStart() {
75-
super.onStart();
76-
final int launchTimes = 5;
77-
final int installDate = 20;
78-
new RateMeDialogTimer(installDate, launchTimes);
79-
RateMeDialogTimer.onStart(this);
80-
if (RateMeDialogTimer.shouldShowRateDialog(this)) {
81-
AlertMenu();
82-
}
83-
84-
}
85-
```
74+
@Override
75+
protected void onStart() {
76+
super.onStart();
8677

87-
##CustomCriteria
78+
final int launchTimes = 3;
79+
final int installDate = 7;
8880

89-
The default criteria to show the dialog is as below:
81+
new RateMeDialogTimer(installDate, launchTimes);
9082

91-
* App is launched more than 20 days later than installation.
92-
* App is launched more than 5 times
83+
RateMeDialogTimer.onStart(this);
84+
if (RateMeDialogTimer.shouldShowRateDialog(this)) {
85+
// show the dialog with the code above
86+
}
9387

94-
you can change this settings [here](https://github.com/androidsx/rate-me/blob/master/SampleProject/src/com/androidsx/rateme/demo1/SampleProject.java)
88+
}
89+
```
9590

9691
License
9792
=======

images-readme/image.png

-283 KB
Loading

images-readme/placeit.png

-218 KB
Binary file not shown.

0 commit comments

Comments
 (0)