Not just DatePicker and TimePicker, but a lot of dialogs I use from third party libraries look like this ever since I switched to material design:
Even when using android themes like HoloDark. I've tried changing buttonBarPositiveButtonStyle in the style and a few more related attributes, but none work. I assume the issue is they're using material buttons now which use different styling. But has anyone figured out a way to fix this? Thanks
EDIT: Just to clarify the issue is the button background being right next to eachother and not being transparent. Either adding a slight margin or making the buttons transparent will do for me
you can use your customButton and applay custombutton style
Turns out adding
<item name="android:buttonBarPositiveButtonStyle">#style/Widget.MaterialComponents.Button.TextButton.Dialog</item>
to my theme fixed the issue
Related
I need to change button style from "contained" to "outlined" at runtime.
For now the only way I've found to create an outlined button is to set its style to ?attr/materialButtonOutlinedStyle.
Unfortunately I haven't found a way to change the style at runtime, is it possible?
Is there any way to get this effect?
As a view with text inside, it should have "setTextAppearance" function. It's not the ideal option but may help. Also can be useful to look on https://github.com/airbnb/paris.
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 am stuck combining windowIsFloating with an Activity which should have an ActionBar.
I want to have an Activity which looks like a popup, thats why i am using a theme for it which has:
<item name="android:windowIsFloating">true</item>
but this seems to cause problems, because as soon as it is set i get a java.lang.IllegalStateException: ActionBarImpl can only be used with a compatible window decor layout
What i want to achive is a popup-like view containing an ActionBar, which can reuse my apps themes and styles. Is there a way to acive it or do i have to try to fake the look of an action bar with a custom view? Is any of the free ActionBar implementations suited for this?
There is actually a way to achieve this. Basically the solution works around the constraints enforced by the ActionBarView on the styles attribute android:windowIsFloating. The solution is very good described in the following post here on StackOverflow.
Additionally I put together a sample project based on the code found in that particular post for everybody to check out.
I am trying to reverse the title shadow on a button in android like the implementation in the ios. I have no idea where I should start. Does anyone have any idea?
I think you can make your own style for button, using Android style Widget.Button as parent. I didn't try it, so I don't know if it private style or not. In your style you can define textShadow attributes. More about styles you can read there