├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── nav_cover.png │ │ │ │ ├── ic_android_selected_36dp.png │ │ │ │ └── ic_android_unselected_36dp.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── nav_cover.png │ │ │ │ ├── ic_android_selected_36dp.png │ │ │ │ └── ic_android_unselected_36dp.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── nav_cover.png │ │ │ │ ├── ic_android_selected_36dp.png │ │ │ │ └── ic_android_unselected_36dp.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── nav_cover.png │ │ │ │ ├── ic_android_selected_36dp.png │ │ │ │ └── ic_android_unselected_36dp.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── menu │ │ │ │ ├── main.xml │ │ │ │ └── activity_main_drawer.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ └── layout │ │ │ │ ├── content_main.xml │ │ │ │ ├── nav_header_main.xml │ │ │ │ ├── app_bar_main.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── fragment_default.xml │ │ │ │ ├── fragment_custombehaviour.xml │ │ │ │ └── fragment_customappearance.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── uk │ │ │ └── co │ │ │ └── brightec │ │ │ └── ratetheapp_android │ │ │ ├── fragments │ │ │ ├── DefaultFragment.java │ │ │ ├── CustomAppearanceFragment.java │ │ │ └── CustomBehaviourFragment.java │ │ │ └── MainActivity.java │ ├── test │ │ └── java │ │ │ └── uk │ │ │ └── co │ │ │ └── brightec │ │ │ └── ratetheapp_android │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── uk │ │ └── co │ │ └── brightec │ │ └── ratetheapp_android │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── ratetheapp ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_star_active_orange_50dp.xml │ │ │ │ ├── ic_star_inactive_grey_50dp.xml │ │ │ │ └── ratetheapp_stars.xml │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── attrs.xml │ │ │ │ └── strings.xml │ │ │ └── layout │ │ │ │ └── ratetheapp_layout.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── uk │ │ │ └── co │ │ │ └── brightec │ │ │ └── ratetheapp │ │ │ ├── InstanceSettings.java │ │ │ ├── Utils.java │ │ │ └── RatingBar.java │ ├── androidTest │ │ └── java │ │ │ └── uk │ │ │ └── co │ │ │ └── brightec │ │ │ └── ratetheapp │ │ │ └── ApplicationTest.java │ └── test │ │ └── java │ │ └── uk │ │ └── co │ │ └── brightec │ │ └── ratetheapp │ │ └── UtilsUnitTest.java ├── proguard-rules.pro └── build.gradle ├── javadoc ├── package-list ├── script.js ├── allclasses-noframe.html ├── allclasses-frame.html ├── uk │ └── co │ │ └── brightec │ │ └── ratetheapp │ │ ├── package-frame.html │ │ ├── package-tree.html │ │ ├── package-summary.html │ │ ├── RateTheApp.OnUserSelectedRatingListener.html │ │ └── RatingBar.OnRatingBarChangeListener.html ├── index.html ├── deprecated-list.html ├── constant-values.html ├── overview-tree.html └── help-doc.html ├── settings.gradle ├── images ├── demoapp-logo.png ├── customised-stars.png ├── customised-title.png ├── customised-drawable.png ├── customised-notitle.png ├── default-ratetheapp.png ├── default-dialog-sorry.png ├── default-dialog-thankyou.png ├── customised-dialog-thankyou.png ├── customised-dialog-badrating.png └── customised-dialog-goodrating.png ├── .idea ├── copyright │ ├── profiles_settings.xml │ └── Open_Source.xml ├── encodings.xml ├── vcs.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── ReleaseNotes.md ├── gradle.properties ├── RateTheApp-Android.iml ├── gradlew.bat ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /ratetheapp/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /javadoc/package-list: -------------------------------------------------------------------------------- 1 | uk.co.brightec.ratetheapp 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':ratetheapp' 2 | -------------------------------------------------------------------------------- /images/demoapp-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/demoapp-logo.png -------------------------------------------------------------------------------- /images/customised-stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-stars.png -------------------------------------------------------------------------------- /images/customised-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-title.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /images/customised-drawable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-drawable.png -------------------------------------------------------------------------------- /images/customised-notitle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-notitle.png -------------------------------------------------------------------------------- /images/default-ratetheapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/default-ratetheapp.png -------------------------------------------------------------------------------- /images/default-dialog-sorry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/default-dialog-sorry.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /images/default-dialog-thankyou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/default-dialog-thankyou.png -------------------------------------------------------------------------------- /images/customised-dialog-thankyou.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-dialog-thankyou.png -------------------------------------------------------------------------------- /images/customised-dialog-badrating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-dialog-badrating.png -------------------------------------------------------------------------------- /images/customised-dialog-goodrating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/images/customised-dialog-goodrating.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/nav_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-hdpi/nav_cover.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/nav_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-mdpi/nav_cover.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/nav_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-xhdpi/nav_cover.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/nav_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-xxhdpi/nav_cover.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_android_selected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_android_selected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_android_selected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_android_selected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_android_selected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_android_selected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_android_unselected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-hdpi/ic_android_unselected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_android_unselected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-mdpi/ic_android_unselected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_android_unselected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-xhdpi/ic_android_unselected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_android_selected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_android_selected_36dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_android_unselected_36dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brightec/RateTheApp-Android/HEAD/app/src/main/res/drawable-xxhdpi/ic_android_unselected_36dp.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Sep 14 10:04:01 BST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/test/java/uk/co/brightec/ratetheapp_android/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package uk.co.brightec.ratetheapp_android; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.assertEquals; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/drawable/ic_star_active_orange_50dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/drawable/ic_star_inactive_grey_50dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Generated by GitHub 2 | # Built application files 3 | *.apk 4 | *.ap_ 5 | 6 | # Files for the Dalvik VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # Generated files 13 | bin/ 14 | gen/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | /*/build/ 20 | 21 | # Local configuration file (sdk path, etc) 22 | local.properties 23 | 24 | # Proguard folder generated by Eclipse 25 | proguard/ 26 | 27 | # Log Files 28 | *.log 29 | 30 | ## Generated by Android Studio 31 | .gradle 32 | /local.properties 33 | /.idea/workspace.xml 34 | /.idea/libraries 35 | .DS_Store 36 | /build 37 | /captures 38 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/nickholcombe/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /ratetheapp/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/nickholcombe/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/copyright/Open_Source.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.1" 6 | 7 | defaultConfig { 8 | applicationId "uk.co.brightec.ratetheapp_android" 9 | minSdkVersion 14 10 | targetSdkVersion 25 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | testCompile 'junit:junit:4.12' 25 | compile project(':ratetheapp') 26 | compile 'com.android.support:appcompat-v7:25.0.1' 27 | compile 'com.android.support:cardview-v7:25.0.1' 28 | compile 'com.android.support:design:25.0.1' 29 | } 30 | -------------------------------------------------------------------------------- /ReleaseNotes.md: -------------------------------------------------------------------------------- 1 | # Release notes # 2 | 3 | ### v1.0.2 ### 4 | * Updated the default listener bad rating string to be more conversational. 5 | 6 | ### v1.0.1 ### 7 | * Made the `Utils.sendEmail()`, `Utils.getDefaultEmailMessage()` and `Utils.goToAppStore()` public. 8 | 9 | ### v1.0.0 ### 10 | 11 | RateTheApp v1.0.0 is our first official release of the the RateTheApp library. We hope you enjoy the library, please give us feedback on anything you find that you would like changed or improved. 12 | 13 | * RateTheApp - The widget itself, where all the stuff happens. 14 | * DefaultOnUserSelectedRatingListener - The default rating selection listener which provides all the resulting functionality. 15 | * InstanceSettings - The place where you can detect if should be shown and hide the widget. 16 | * RatingBar - Our subclass of the RatingBar so that we can provide vector drawable functionality. 17 | * Utils - Our utility methods. 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /javadoc/script.js: -------------------------------------------------------------------------------- 1 | function show(type) 2 | { 3 | count = 0; 4 | for (var key in methods) { 5 | var row = document.getElementById(key); 6 | if ((methods[key] & type) != 0) { 7 | row.style.display = ''; 8 | row.className = (count++ % 2) ? rowColor : altColor; 9 | } 10 | else 11 | row.style.display = 'none'; 12 | } 13 | updateTabs(type); 14 | } 15 | 16 | function updateTabs(type) 17 | { 18 | for (var value in tabs) { 19 | var sNode = document.getElementById(tabs[value][0]); 20 | var spanNode = sNode.firstChild; 21 | if (value == type) { 22 | sNode.className = activeTableTab; 23 | spanNode.innerHTML = tabs[value][1]; 24 | } 25 | else { 26 | sNode.className = tableTab; 27 | spanNode.innerHTML = "" + tabs[value][1] + ""; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 24 | 25 | -------------------------------------------------------------------------------- /ratetheapp/src/androidTest/java/uk/co/brightec/ratetheapp/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Brightec Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.brightec.ratetheapp; 18 | 19 | import android.app.Application; 20 | import android.test.ApplicationTestCase; 21 | 22 | /** 23 | * Testing Fundamentals 24 | */ 25 | public class ApplicationTest extends ApplicationTestCase { 26 | public ApplicationTest() { 27 | super(Application.class); 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/uk/co/brightec/ratetheapp_android/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Brightec Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.brightec.ratetheapp_android; 18 | 19 | import android.app.Application; 20 | import android.test.ApplicationTestCase; 21 | 22 | /** 23 | * Testing Fundamentals 24 | */ 25 | public class ApplicationTest extends ApplicationTestCase { 26 | public ApplicationTest() { 27 | super(Application.class); 28 | } 29 | } -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 16dp 19 | 16dp 20 | 21 | 16dp 22 | 160dp 23 | 8dp 24 | 25 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/drawable/ratetheapp_stars.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 20 | 23 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 21 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 18 | 19 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /javadoc/allclasses-noframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes (ratetheapp 1.0.0 API) 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 29 | 30 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /javadoc/allclasses-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | All Classes (ratetheapp 1.0.0 API) 7 | 8 | 9 | 10 | 11 | 12 |

All Classes

13 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /javadoc/uk/co/brightec/ratetheapp/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | uk.co.brightec.ratetheapp (ratetheapp 1.0.0 API) 7 | 8 | 9 | 10 | 11 | 12 |

uk.co.brightec.ratetheapp

13 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/layout/ratetheapp_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 21 | 22 | 29 | 30 | 38 | 39 | 46 | 47 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_header_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 28 | 29 | 36 | 37 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 23 | 24 | 28 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ratetheapp/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.github.dcendents.android-maven' 3 | 4 | ext { 5 | bintrayRepo = 'maven' 6 | bintrayName = 'rate-the-app' 7 | 8 | publishedGroupId = 'uk.co.brightec.ratetheapp' 9 | libraryName = 'RateTheApp' 10 | artifact = 'ratetheapp' 11 | 12 | libraryDescription = 'RateTheApp is an Android component that allows users to rate your app prompting them for further action depending on the rating they gave.' 13 | 14 | siteUrl = 'https://github.com/brightec/RateTheApp-Android' 15 | gitUrl = 'https://github.com/brightec/RateTheApp-Android.git' 16 | 17 | libraryVersion = '1.0.2' 18 | 19 | developerId = 'nickh' 20 | developerName = 'Nick Holcombe' 21 | developerEmail = 'nick@brightec.co.uk' 22 | 23 | licenseName = 'The Apache Software License, Version 2.0' 24 | licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' 25 | allLicenses = ["Apache-2.0"] 26 | } 27 | 28 | android { 29 | compileSdkVersion 25 30 | buildToolsVersion "25.0.1" 31 | 32 | defaultConfig { 33 | minSdkVersion 14 34 | targetSdkVersion 25 35 | versionCode 4 36 | versionName "1.0.2" 37 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 38 | } 39 | buildTypes { 40 | release { 41 | minifyEnabled false 42 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 43 | } 44 | } 45 | } 46 | 47 | dependencies { 48 | compile fileTree(dir: 'libs', include: ['*.jar']) 49 | testCompile 'junit:junit:4.12' 50 | testCompile 'org.powermock:powermock-api-mockito:1.6.5' 51 | testCompile 'org.powermock:powermock-module-junit4-rule-agent:1.6.5' 52 | testCompile 'org.powermock:powermock-module-junit4-rule:1.6.5' 53 | testCompile 'org.powermock:powermock-module-junit4:1.6.5' 54 | 55 | compile 'com.android.support:appcompat-v7:25.0.1' 56 | compile 'com.google.guava:guava:19.0' 57 | } 58 | 59 | // Place it at the end of the file 60 | apply from: 'https://raw.githubusercontent.com/brightec/JCenter/master/installv1.gradle' 61 | apply from: 'https://raw.githubusercontent.com/brightec/JCenter/master/bintrayv1.gradle' 62 | -------------------------------------------------------------------------------- /ratetheapp/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | Rate The App 18 | Send Email 19 | 20 | 21 | Rate this app? 22 | Please leave a review. We\'d love to hear how you\'re enjoying the app. 23 | Thanks! 24 | Thanks so much! Would you mind rating us or leaving a review at the App Store? 25 | Sure 26 | No Thanks 27 | Hi There! 28 | I’m really sorry to hear that you don’t like our 29 | app. Would you mind sending me your thoughts on how we can improve it? I’ll respond 30 | directly. Thanks for your help. 31 | 32 | 33 | App Feedback: Android 34 | \n\n\n\n\n// Please reply above this line\nInformation that helps us:\n%d stars, Android %s, Platform %d, App Version %s 35 | 36 | Oops 37 | Sorry something went wrong trying to send this email. 38 | 39 | OK 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/uk/co/brightec/ratetheapp_android/fragments/DefaultFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Brightec Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.brightec.ratetheapp_android.fragments; 18 | 19 | import android.content.Intent; 20 | import android.net.Uri; 21 | import android.os.Bundle; 22 | import android.support.v4.app.Fragment; 23 | import android.view.LayoutInflater; 24 | import android.view.View; 25 | import android.view.ViewGroup; 26 | 27 | import uk.co.brightec.ratetheapp_android.R; 28 | 29 | public class DefaultFragment extends Fragment { 30 | 31 | public DefaultFragment() { 32 | // Required empty public constructor 33 | } 34 | 35 | public static DefaultFragment newInstance() { 36 | return new DefaultFragment(); 37 | } 38 | 39 | @Override 40 | public void onCreate(Bundle savedInstanceState) { 41 | super.onCreate(savedInstanceState); 42 | } 43 | 44 | @Override 45 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 46 | Bundle savedInstanceState) { 47 | // Inflate the layout for this fragment 48 | View view = inflater.inflate(R.layout.fragment_default, container, false); 49 | 50 | // Add action for Learn More button 51 | View button = view.findViewById(R.id.btn_learnmore); 52 | button.setOnClickListener(new View.OnClickListener() { 53 | @Override 54 | public void onClick(View v) { 55 | String url = getString(R.string.learnMoreURL); 56 | Intent i = new Intent(Intent.ACTION_VIEW); 57 | i.setData(Uri.parse(url)); 58 | startActivity(i); 59 | } 60 | }); 61 | 62 | return view; 63 | } 64 | } -------------------------------------------------------------------------------- /app/src/main/java/uk/co/brightec/ratetheapp_android/fragments/CustomAppearanceFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Brightec Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.brightec.ratetheapp_android.fragments; 18 | 19 | import android.content.Intent; 20 | import android.net.Uri; 21 | import android.os.Bundle; 22 | import android.support.v4.app.Fragment; 23 | import android.view.LayoutInflater; 24 | import android.view.View; 25 | import android.view.ViewGroup; 26 | 27 | import uk.co.brightec.ratetheapp_android.R; 28 | 29 | public class CustomAppearanceFragment extends Fragment { 30 | 31 | public CustomAppearanceFragment() { 32 | // Required empty public constructor 33 | } 34 | 35 | public static CustomAppearanceFragment newInstance() { 36 | return new CustomAppearanceFragment(); 37 | } 38 | 39 | @Override 40 | public void onCreate(Bundle savedInstanceState) { 41 | super.onCreate(savedInstanceState); 42 | } 43 | 44 | @Override 45 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 46 | Bundle savedInstanceState) { 47 | // Inflate the layout for this fragment 48 | View view = inflater.inflate(R.layout.fragment_customappearance, container, false); 49 | 50 | // Add action for View Sourcecode button 51 | View button = view.findViewById(R.id.btn_viewsource); 52 | button.setOnClickListener(new View.OnClickListener() { 53 | @Override 54 | public void onClick(View v) { 55 | String url = getString(R.string.custom_appearance_viewSourceURL); 56 | Intent i = new Intent(Intent.ACTION_VIEW); 57 | i.setData(Uri.parse(url)); 58 | startActivity(i); 59 | } 60 | }); 61 | 62 | return view; 63 | } 64 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 25 | 26 | 30 | 31 | 42 | 43 | 48 | 49 | 52 | 53 | 58 | 59 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 24 | 25 | 29 | 30 | 37 | 38 | 39 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /javadoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ratetheapp 1.0.0 API 7 | 59 | 60 | 61 | 62 | 63 | 64 | <noscript> 65 | <div>JavaScript is disabled on your browser.</div> 66 | </noscript> 67 | <h2>Frame Alert</h2> 68 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="uk/co/brightec/ratetheapp/package-summary.html">Non-frame version</a>.</p> 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /app/src/main/java/uk/co/brightec/ratetheapp_android/fragments/CustomBehaviourFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 Brightec Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package uk.co.brightec.ratetheapp_android.fragments; 18 | 19 | import android.content.Intent; 20 | import android.net.Uri; 21 | import android.os.Bundle; 22 | import android.support.v4.app.Fragment; 23 | import android.view.LayoutInflater; 24 | import android.view.View; 25 | import android.view.ViewGroup; 26 | import android.widget.TextView; 27 | 28 | import uk.co.brightec.ratetheapp.RateTheApp; 29 | import uk.co.brightec.ratetheapp_android.R; 30 | 31 | 32 | public class CustomBehaviourFragment extends Fragment { 33 | 34 | public CustomBehaviourFragment() { 35 | // Required empty public constructor 36 | } 37 | 38 | public static CustomBehaviourFragment newInstance() { 39 | return new CustomBehaviourFragment(); 40 | } 41 | 42 | @Override 43 | public void onCreate(Bundle savedInstanceState) { 44 | super.onCreate(savedInstanceState); 45 | } 46 | 47 | @Override 48 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 49 | Bundle savedInstanceState) { 50 | // Inflate the layout for this fragment 51 | View view = inflater.inflate(R.layout.fragment_custombehaviour, container, false); 52 | 53 | // Add action for View Sourcecode button 54 | View button = view.findViewById(R.id.btn_viewsource); 55 | button.setOnClickListener(new View.OnClickListener() { 56 | @Override 57 | public void onClick(View v) { 58 | String url = getString(R.string.custom_behaviour_viewSourceURL); 59 | Intent i = new Intent(Intent.ACTION_VIEW); 60 | i.setData(Uri.parse(url)); 61 | startActivity(i); 62 | } 63 | }); 64 | 65 | // Demo 4, Remove the OnRateChangeListener 66 | RateTheApp rta = (RateTheApp) view.findViewById(R.id.noAction); 67 | rta.setOnUserSelectedRatingListener(null); 68 | 69 | // Demo 5, Add a custom OnRateChangeListener 70 | rta = (RateTheApp) view.findViewById(R.id.customAction); 71 | 72 | // Initialise the text view to the current rating 73 | final TextView textView = (TextView) view.findViewById(R.id.textView); 74 | String textStr = getString(R.string.current_rating) + " " + rta.getRating(); 75 | textView.setText(textStr); 76 | 77 | // Add a custom OnUserSelectedRatingListener to update the text view 78 | rta.setOnUserSelectedRatingListener(new RateTheApp.OnUserSelectedRatingListener() { 79 | @Override 80 | public void onRatingChanged(RateTheApp rateTheApp, float rating) { 81 | String textStr = getString(R.string.current_rating) + " " + rating; 82 | textView.setText(textStr); 83 | } 84 | }); 85 | 86 | return view; 87 | } 88 | } -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 19 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | Open Source 51 | 52 | 57 | 58 | 59 | 60 | 61 | 62 | 1.8 63 | 64 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 22 | 23 | 27 | 28 | 29 | 35 | 36 | 40 | 41 | 46 | 47 |