Comments (12)
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.
Hi @KChernenko, How about now?
from alertdialogpro.
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.
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.
Where did you use the alertDialogProTheme
attribute. Can you post the code?
from alertdialogpro.
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.
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.
Oh. Did you use getContext()
to supply a context? It should be an Activity.
from alertdialogpro.
I use getActivity().getApplicationContext()
, because I'm calling dialog from a fragment.
from alertdialogpro.
Use getActivity()
.
from alertdialogpro.
Yep, it works. Thank you very much!
from alertdialogpro.
You're welcome.
from alertdialogpro.
Related Issues (20)
- Compatibility with support v20 HOT 3
- Suggestion: publish on those websites HOT 3
- Possible to use AlertDialogPro with ListPreference widget?
- White buttons in Activity when using dark theme with AppCompat 22 HOT 2
- ProgressDialogPro exception HOT 12
- adpButtonBarPositiveButtonStyle with Holo theme HOT 5
- Add support for the new Support library 22.1 HOT 6
- Resource not found Exception for Api > 21 HOT 4
- Checkbox Buttons Offset on Xperia T HOT 1
- Error when tryin do compile 23 SDK version HOT 3
- Do it support accent color of edittext in the alert dialog pro? HOT 1
- NoClassDefFoundError AllCapsTransformationMethod HOT 2
- Caused by: java.lang.NoClassDefFoundError: android.support.v7.internal.widget.TintTypedArray HOT 1
- hope upgrade to compile 'com.android.support:appcompat-v7:23.1.1' HOT 2
- in support v7 23.1.1 android.support.v7.internal become private how to solve this problem? HOT 1
- Failed to resolve: com.github.fengdai:alertdialogpro-theme-material:0.2.6 HOT 2
- Changing texts' typeface HOT 3
- have error with compile 'com.android.support:appcompat-v7:23.2.1' HOT 2
- 示例代码报错? HOT 1
- Issue About Deprecated Then How Can Handle That Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alertdialogpro.