Git Product home page Git Product logo

Comments (12)

fengdai avatar fengdai commented on July 18, 2024

Hi @KChernenko, If you want a material design dialog, you only need to add:

compile 'com.github.fengdai:alertdialogpro-theme-material:0.2.0'

Doing like below (your first try) is also okay:

compile 'com.github.fengdai:alertdialogpro-theme-material:0.2.0'
compile 'com.github.fengdai:alertdialogpro-core:0.2.0'

I think the reason of your first exception is that you may include a nineoldandroids.jar lib to your project. If so, you should remove it. Because alertdialogpro-theme-material also depends on nineoldandroids. And Gradle can automatically resolve this dependency. You don't need to include it manually.

from alertdialogpro.

fengdai avatar fengdai commented on July 18, 2024

Hi @KChernenko, How about now?

from alertdialogpro.

KChernenko avatar KChernenko commented on July 18, 2024

Thank you for your answer! Yes, you are right - I use another library which used nineoldandroids. Therefore, there is a conflict. I'm trying to slove it.

from alertdialogpro.

KChernenko avatar KChernenko commented on July 18, 2024

Hello @fengdai! I've sloved problem with the nineoldandroids library. But I still have android.content.res.Resources$NotFoundException: Resource ID #0x0 exception.
I've added compile 'com.github.fengdai:alertdialogpro-theme-material:0.2.0' dependency to my build.gradle.
And used <item name="alertDialogProTheme">@style/Theme.AlertDialogPro.Material</item> in my style.xml.

from alertdialogpro.

fengdai avatar fengdai commented on July 18, 2024

Where did you use the alertDialogProTheme attribute. Can you post the code?

from alertdialogpro.

KChernenko avatar KChernenko commented on July 18, 2024

Here is my style.xml:

<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<!-- Customize your theme here. -->
<item name="colorPrimary">#000000</item>
<item name="colorPrimaryDark">#000000</item>
<item name="colorAccent">#ffd10f21</item>
<item name="windowActionBar">false</item>
<item name="alertDialogProTheme">@style/Theme.AlertDialogPro.Material.Light</item>
</style>
</resources>

from alertdialogpro.

fengdai avatar fengdai commented on July 18, 2024

Your code is correct. I don't know what the reason of this exception... Did you apply this style to <application> or <activity> in your AndroidManifest.xml?

from alertdialogpro.

fengdai avatar fengdai commented on July 18, 2024

Oh. Did you use getContext() to supply a context? It should be an Activity.

from alertdialogpro.

KChernenko avatar KChernenko commented on July 18, 2024

I use getActivity().getApplicationContext(), because I'm calling dialog from a fragment.

from alertdialogpro.

fengdai avatar fengdai commented on July 18, 2024

Use getActivity().

from alertdialogpro.

KChernenko avatar KChernenko commented on July 18, 2024

Yep, it works. Thank you very much!

from alertdialogpro.

fengdai avatar fengdai commented on July 18, 2024

You're welcome.

from alertdialogpro.

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.