Comments (8)
It uses colorControlActivated
as its color:
final int color = getThemeAttrColor(context, R.attr.colorControlActivated);
So, you can specify your color with attribute colorControlActivated
in your AlertDialogPro's theme like this:
<style name="YourAlertDialogProTheme">
...
<item name="colorControlActivated">@color/your_color</item>
</style>
Since colorControlActivated
use colorAccent
by default:
<item name="colorControlActivated">?attr/colorAccent</item>
So you can also specify your color with attribute colorAccent
directly:
<style name="YourAlertDialogProTheme">
...
<item name="colorAccent">@color/your_color</item>
</style>
from alertdialogpro.
That is exactly what I did, see updated question (forgot to apply code style). That doesn't seem to work.
from alertdialogpro.
Update: My mistake. You should add it to your AlertDialogPro's theme.
from alertdialogpro.
Yes, works.
from alertdialogpro.
@fengdai I'm not sure, but I think that the support library has some styles for the material-style. Maybe you could use theirs?
Example:
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
from alertdialogpro.
@AndroidDeveloperLB Yes. I have used some of them. But must of them are not useful for backward compatibility. Like Widget.AppCompat.ProgressBar.Horizontal
which is defined as below:
<style name="Widget.AppCompat.ProgressBar.Horizontal" parent="Base.Widget.AppCompat.ProgressBar.Horizontal"></style>
Look into Base.Widget.AppCompat.ProgressBar.Horizontal
. Defined in default values dir:
<style name="Base.Widget.AppCompat.ProgressBar.Horizontal" parent="android:Widget.ProgressBar.Horizontal"></style>
In v11 values dir:
<style name="Base.Widget.AppCompat.ProgressBar.Horizontal" parent="android:Widget.Holo.ProgressBar.Horizontal"></style>
And in v21 values dir:
<style name="Base.Widget.AppCompat.ProgressBar.Horizontal" parent="android:Widget.Material.ProgressBar.Horizontal"></style>
That means ProgressBar with this style will be material-style only on Lollipop...
from alertdialogpro.
@fengdai Oh, I see. Just though it might be useful. Sorry.
from alertdialogpro.
That's fine ; )
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.