Giter Site home page Giter Site logo

Comments (6)

bclymer avatar bclymer commented on May 29, 2024 3

@hotchemi I'm not entirely sure why this issue was created, but I think it might be related to an issue I'm seeing.

I'm passing in a wrapped context

ContextThemeWrapper(context, R.style.my_style)

which has a theme specifically for dialogs. However since you call getApplicationContext on the passed in Context, the theme doesn't work.

from android-rate.

Aditya94A avatar Aditya94A commented on May 29, 2024

Just ran into this:

I have a dark theme in my app, the dialog shows up as light, i.e it does not inherit the app's theme.

I tried the ContextThemeWrapper way as well but @bclymer says it's basically ignored:

AppRate.with(new ContextThemeWrapper(this, R.style.AppRateDialogTheme))

private AppRate(Context context) {
    this.context = context.getApplicationContext();
}

Why is getApplicationContext() being called anyways? We don't need the context of the global application object for a simple dialog, plus the user should be responsible for sending the appropriate context.

Edit: Using a custom view doesn't help either, this should be marked as a bug.

from android-rate.

sundeepkmallick avatar sundeepkmallick commented on May 29, 2024

Any update on it ? Is there any new version after 1.0.1?

from android-rate.

AlexanderLS avatar AlexanderLS commented on May 29, 2024

Hi @paddykily , @bclymer , @AdityaAnand1 , @sundeepkmallick

You can use https://github.com/Vorlonsoft/AndroidRate and call

AppRate.with(this).setThemeResId(R.style.YourAppRateDialogTheme);

@AdityaAnand1 getApplicationContext() being called because we need the context of the global application object for the library purposes, not the creation of a dialog only; plus the user should be responsible for as few things as possible.

from android-rate.

sundeepkmallick avatar sundeepkmallick commented on May 29, 2024

Hi @AlexanderLS,

Thanks for your response. But I managed to resolve the problem from styles.xml.

The new library which you have referred, does it also support Kotlin? I will let you know if I use the new library in the apps I am working on. Thanks..

from android-rate.

AlexanderLS avatar AlexanderLS commented on May 29, 2024

Hi @sundeepkmallick ,

Yes, https://github.com/Vorlonsoft/AndroidRate supports Kotlin also. It 245 commits ahead (21,924 lines ++, 6,285 lines --)

from android-rate.

Related Issues (20)

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.