Skip to content

Commit

Permalink
Update the sample app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shintaro Katafuchi committed Jun 28, 2015
1 parent 38da532 commit 9c840d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
7 changes: 3 additions & 4 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
compileSdkVersion 22
buildToolsVersion '21.1.2'

defaultConfig {
minSdkVersion 9
targetSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
Expand All @@ -23,7 +23,6 @@ repositories {
}

dependencies {
compile 'com.android.support:appcompat-v7:21.0.3'
compile fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile project(':library')
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
package hotchemi.android.rate.sample;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

import hotchemi.android.rate.AppRate;
import hotchemi.android.rate.OnClickButtonListener;

public class MainActivity extends ActionBarActivity {
public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

AppRate.with(this)
.setInstallDays(0) // default 10, 0 means install day.
.setLaunchTimes(1) // default 10 times.
.setInstallDays(3) // default 10, 0 means install day.
.setLaunchTimes(10) // default 10 times.
.setRemindInterval(2) // default 1 day.
.setShowNeutralButton(true) // default true.
.setDebug(false) // default false.
.setShowTitle(false) // default true
.setDebug(true) // default false.
.setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
@Override
public void onClickButton(int which) {
Expand All @@ -29,7 +28,6 @@ public void onClickButton(int which) {
})
.monitor();

// Show a dialog if meets conditions.
AppRate.showRateDialogIfMeetsConditions(this);
}

Expand Down

0 comments on commit 9c840d3

Please sign in to comment.