Code Monkey home page Code Monkey logo

android-app-rating-dialog's Introduction

AndroidAppRatingDialog

License

This is a Android App Rating Dialog to encourage user to rate the app on the Google Play Store.

Preview of AndroidAppRatingDialog

     

Using this Library in your project

  1. Add it in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }
  2. Add this in your app's build.gradle

    dependencies {
        implementation 'com.github.shurajcodx:android-app-rating-dialog:1.0.6'
    }

How to use

Use the app rating dialog:

final AppRatingDialog appRatingDialog = new AppRatingDialog.Builder(this)
    .setTriggerCount(2)
    .setRepeatCount(5)
    .build();

appRatingDialog.show();

Or customize app rating dialog ui from builder class:

final AppRatingDialog appRatingDialog = new AppRatingDialog.Builder(this)
        .setTriggerCount(4)
        .setRepeatCount(7)
        .setLayoutBackgroundColor(R.color.colorDialogBox)
        .setIconDrawable(true, ContextCompat.getDrawable(this, R.drawable.love))
        .setTitleText(R.string.rating_dialog_custom_title)
        .setTitleTextColor(R.color.white)
        .setMessageText(R.string.rating_dialog_custom_message)
        .setMessageTextColor(R.color.white)
        .setMessageTextSize(R.dimen.text20sp)
        .setRateButtonText("Rate App", null)
        .setRateButtonBackground(R.color.colorPrimaryDark)
        .build();

appRatingDialog.show();

Standard configuration

You have the following options to customize dialog ui and dialog show up:

When to Show Dialog

  • Change the mimimum number of app launches
    .setTriggerCount(int triggerCount) // default is 2
  • Change the minmium number of repeat count
    .setRepeatCount(int repeatCount) //default is 5

Design

  • Change the icon of the dialog

    .setIconDrawable(boolean showIconDrawable, Drawable drawable) // default icon isn't show
  • Change the title text and color

    .setTitleText(@StringRes int titleText) //for changing title text
    
    .setTitleTextColor(@ColorRes int textColor) //for changing title text color
  • Change the message text, size and color

    .setMessageText(@StringRes int messageText)
    
    .setMessageTextColor(@ColorRes int textColor)
    
    .setMessageTextSize(@DimenRes int textSize)
  • Change the store link

    .setStoreLink(String storeLink)
  • Change the rate later button text and add a click listener

    .setRateLaterButtonText(String rateLaterButtonText, @Nullable RatingDialog.onRemindMeLater onRateLaterClickListener)
  • Change the rate later button text color and background color

    .setRateLaterButtonTextColor(@ColorRes int buttonTextColor)
    
    .setRateLaterButtonBackground(@DrawableRes int rateLaterButtonBackground)
  • Change the never rate button text and add listener

    .setNeverRateButtonText(@StringRes int neverRateButtonText, @Nullable RatingDialog.onNever onRateLaterClickListener)
  • Change the never rate button text color and background color

    .setNeverRateButtonTextColor(@ColorRes int buttonTextColor)
    
    .setNeverRateButtonBackground(@DrawableRes int neverRateButtonBackground)
  • Change the rate button text and add listener

    .setRateButtonText(String rateButtonText, @Nullable RatingDialog.onRate onRateClickListener) // default listener redirect user to google play store 
  • Change the rate button text color and background color

    .setRateButtonTextColor(@ColorRes int buttonTextColor)
    
    .setRateButtonBackground(@DrawableRes int rateButtonBackground)

If this library helps you in anyway, show your ❤️ by putting 🌟 on this project

License

Copyright (C) 2019 Shuraj Shampang

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Contributing to AppRatingDialog

Make sure to follow the contribution guidelines when you submit pull request.

android-app-rating-dialog's People

Contributors

shurajcodx avatar surajrai-dzango avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rajeshpatadiya

android-app-rating-dialog's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.