While I was using the Material components for Android (https://material.io/develop/android/docs/getting-started/) I was forced to inherit my application theme from "MaterialComponent" instead of the classic "Theme.AppCompat" in order to make the material components work. While I was testing the application with the integrated material components, on Android 6.x.x Marshmallow I observed that there is is a strange theme for the popup items when I select a text in any of my EditTexts.
Here is an example with the actual Material theme
and here is the expected theme
Has anyone encountered the same issue before?
Related
I need to add a drop down to my app, which is running on the AppCompat theme, since we are not using the Material design components, but rather have our own design for buttons, etc.
For a simple feature, I need to use a dropdown and here I think the Exposed drop down from the Material design theme would work nicely.
However, if I'm not specifically using the MaterialComponents theme in my styles, the app will crash whenever I try to use the style on the TextInputLayout.
Is there a way of using the nice Exposed dropdown from MaterialComponents without using the entire theme (as this overrides all colors for buttons and such)? Or maybe just a simple way of getting a nice and simple dropdown otherwise. Spinners seem kinda hard to work with..
Cheers.
Here is the screenshot of that screen,after installing Android Studio 3.0 i face this problem.
Click on the theme selector in the preview window ("MaterialTheme") and select an AppCompat one (or make your theme have that as parent).
The support components won't get rendered unless you select an AppCompat theme. I guess the MaterialTheme is your custom one, so just make sure it uses the appropriate theme as parent.
I'm trying to add simple button on my layout, my min api is 14, The problem is when run the app on android < 5.0 the button doesn't have any animation , How can I fix that?
I think the animation you are talking about is Ripple Effect. That is a feature of material design. And remember the official material design theme is supported for android >= 5.0.
I guess that you are using default theme. So, when you run your app on android 5.0 or above it will using material theme (with ripple effect for button). However, when you run android < 5.0, the theme now is not material theme and button doesn't have ripple effect.
For solve your problem, you need using third party libraries to apply material design to your app. Here is list of awesome ui library and you can find some libraries that help you applying material design.
The list of awesome ui library: https://github.com/wasabeef/awesome-android-ui
Is there a way to use Holo theme in android 2.3 without using actionBar with it. I tried using Holoeverywhere library but it is showing actionbarbar as well.
Also I want the Holo UI same throughout the app no matter which OS version user is on (2.3.3 and above)
Apply theme Holo.Theme.NoActionBar on activity. For decrease a memory leak you can disable abs by setting requireSherlock = false in onCreateConfig, like in demo.
I'm building an Android app that should be able to run on Android 2.1 and above. The minSdkVersion is set to 7, and the targetSdkVersion is set to 14. In order to have ActionBar functionality, I am using the ActionBarSherlock library and setting the theme of the application to a derivative of Theme.Sherlock (etc.), as required.
Aside from providing an ActionBar, I notice that when I run the app on a Honeycomb/ICS device, some of the other widgets and dialogs now have a different (i.e. Holo) appearance. I want to have an ActionBar but keep the normal, non-Holo Android theme - the Holo styling does not fit well with the rest of the app. EditText views in particular look significantly different.
I see that ActionBarSherlock defines some custom themes in values-11 (Honeycomb) and values-14 (ICS), which inherit from Theme.Holo. There are also custom styles in values-14 which map the ABS styles to the native ones (since the native ActionBar is used in ICS+).
I have found that I have to do at least the following things:
Disable the custom themes for values-11 and values-14 - this stops Holo widgets/dialogs appearing.
Disable the use of the native implementation of the ActionBar for ICS+ - this stops the crashing on ICS since it relies on the native ActionBar provided as part of Holo theme. This requires modification of the library.
Disable the custom styles for values-14 - this messed with the look/styling of the compatibility ActionBar.
I am not sure if there are other issues that I have missed. Has anyone found a good way to use the non-Holo Android theme with ActionBarSherlock, without modifying the library? Are there any problems with using the compatibility ActionBar in ICS and above?