I'm looking for an advanced Android color picker dialog. The standard color picker from the API Demos and examples from this post aren't quite acceptable to me. I'd like it to look like this: this image. Are there any open source color pickers that look like that?
UPDATE: My primary goal is to make the Color Picker easy to use: it'd be great if the user only needs to click once to pick any color, and all possible colors are represented. The Color Pickers from the examples I've mentioned require two clicks to pick a color and are too complicated for the average user.
This one looks pretty close to what you want, and is FOSS:
https://github.com/LarsWerkman/HoloColorPicker
how about this solution ?
look at the screenshot:
source code here .
Have you tried Android Color Picker?
If you need to show the RGB-Code of the currently selected color, just modify the dialog by adding an TextView and adding an update to it in the ColorChangeListener (or whatever it's called)
Or take a look at the color-picker dialog of CyanogenMod
Here a link to the source: CyanogenMod color-picker on GitHub
Related
As an Android developer new to iOS/swift, I am trying to implement a global theme/style which every view controller can inherit. I expect one file which I can modify which would affect all View Controllers's UI. This is possible in android. Does iOS have anything similar?
The best match for what you are looking for is probably UIAppearance, although not quite the same.
What it allows you to do is basically setup each component once, and then have that be the default look for all other components.
An example for setting button colors (you could do this in your AppDelegate):
UIButton.appearance().setTitleColor(.white, forState: .normal)
UIButton.appearance().backgroundColor = .blue
Try looking at these tutorials:
https://www.raywenderlich.com/108766/uiappearance-tutorial
http://blog.iseinc.biz/use-uiappearance-create-ios-app-themes
Usually if you want to do something like that, you can go to the AppDelegate File, and add code like the ones below:
[[UITextField appearance] setTintColor:[UIColor redColor]];
[[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
For example textfield by default has a bluish tint color, but with the code above, the default tint color becomes red. The single line of code you place will affect all UI related to it. Try it out.
I want to know how all the Android components such as dialogs, buttons,.. will look like on different themes.
Somebody got a blog or an article for this? Thank you.
Here is an example of different Android themes:
http://android.appstorm.net/how-to/customization/dress-up-your-android-with-gorgeous-themes/
As a developper, I'll say that the appearance depends on what you're using for example for a button you may re-program your own button to use in your custom theme by adding an image in the button's background, change the button's shape or color .. and of course you can also change the look at each state (pressed, focused,etc.).
I need to edit default AlertDialog theme so that it will look like part of the design of my app. I don't want to create a whole new theme for it. I will just play with its own properties and make small changes. But the problem is I can't manage to reach the source code and I don't know what kind of attributes it has.
What I need to do is basically to give background a little transparency and roundness.
Does anyone know where can I get the AlertDialog style code? And which attributes do I need to edit for transparency and roundness of background?
Thanks.
Here's the style code for AlertDialog: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/styles.xml
I don't know how to change it the way you want though.
I want to have colors for specific card states. I want to be able to reset it to its default.
Where can I find the default material colors from Android? Especally of the Android CardView.
Thanks for help.
Edit:
The Cards have an backgroundcolor (not the images) which is not white. Which color is this?
Or is there any method to reset the Backgroundcolor of View-Elements?
Sry for bad english.
Finally, I found the solution: #fafafa
It's the Background colour that Google used on the website hakkikonu posted.
Edit:
Maybe it changed over time. Updated answer (thanks to arts777)
https://material.google.com/style/color.html#color-themes link describes all of your question. Also you can see more notes about material design.
If you're worried that this color will change over time and you'd like to be up to date if and when Google changes it, you can use ?android:colorBackground.
As of July 2017, it is still #FAFAFA
I would like to change the default orange color that appears when someone press an Android button. I have done many searches but all I found was the use of selectors.
I understand the principle, but I don't want to modify the grey aspect of the normal button (not pressed). But using selectors force to define all characteristics of all aspects (pressed or not).
I don't know how to obtain the default aspect of buttons in the light theme, so can anyone tell me where I can find the original parameters of the light theme or at least give me another means to simply change the color of the button when clicked?
You can copy the Android's selector into your project, the one that Android sets it by default to buttons, and modify only the state when the button is pressed by just changing one single drawable.
You could find the file in \android-sdk\platforms\android-10\data\res\drawable\btn_default.xml
Sorry bro...........
i guess only selector will help you......
You must go with selector.....
and selector are reusable xmls you can use in all buttons.....:)
You can refer below link.
:)
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
I tried to find a solution to this problem, but did not succeed.
Maybe this will help:
How to modify the default button state in Android without affecting the pressed and selected states?
Standard Android Button with a different color