EDIT AT THE END
I was trying to implement a SplashScreen following this guideline. So I'm setting a drawable with a layer-list and using an icon, but the icon is too big so I make a new file that's smaller. The result never showed up in my app: the first drawable I made is always showing up, never updating.
I renamed the picture file, the drawable
I renamed the style that's
used in the manifest
I cleaned the project
I rebuilt the project
I
synchroinized
I used the Invalidate cache/restart option
I updated
Android Studio
I moved my project folder, created a new one and
copy-pasted only the java and xml files because I thougt then the
cache files would be deleted
Nada, the old drawable is always showing when I deploy the apk on my phone.
What is this, whichcraft? What am I missing? Where do I find the cache? I looked for a bin folder, I read on some forums I should delete it but it's not in my workspace.
I'm posting my code below:
AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lu.intech.mcfc">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".activity.InitActivity"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.LoginActivity" />
</application>
</manifest>
styles.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">#drawable/splash_screen</item>
</style>
</resources>
splash_screen.xml:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="#color/colorPrimary"/>
<item>
<bitmap
android:gravity="center"
android:src="#drawable/logo_wega_100x31"/>
</item>
</layer-list>
EDIT
I did try my app on another phone and it worked as intended straight away. So I'm guessing the problem lies on the phone. Even if I uninstalled the app everytime I tested again, the old drawable was shown. What more than uninstalling the app can I do to clean the cache on the phone?
I face the same problem but I guess it relates to Android Version.
I tested in a Samsung phone (Android 4.4.4) and windowBackground is updated immediately, but in a Sony phone (Android 7.0) it's not working. Seems like Android is trying to be "smarter" by saving some states of applications.
I did try all solutions that you tried, plus: via Application Manager -> Clear Cache, Clear Data. And... it's still not working.
Only one thing make it work: restart the device and then rebuild.
Yep, I'm not sure if user can face that problem when update our apps via Play Store. It's not convenience but it's only working solution that I found.
you need to clean out the system caches:
On the main menu, choose File | Invalidate Caches/Restart. The Invalidate Caches message appears informing you that the caches will be invalidated and rebuilt on the next start. Use buttons in the dialog to invalidate caches, restart IntelliJ IDEA or both.
Application uninstall on your phone
Run project again.
First, try to clean you app then rebuild and relaunch it.
If not working, try to clean, uninstall on your phone, rebuild, then launch it again. Sometime when launching without cleaning some strange bugs appears.
Cf. another similar problem I had: Android status bar hide/change color in splash screen
It's not the first time I have a cache problem with that kind of screen, it must be the particular condition of having no layout and a drawable as a background. I tried invalidating the cache in Android Studio, I cleaned and rebuilt the project, I uninstalled the app on the phone but nothing works. So if you are in this cofiguration, just try to run your app on another phone if you can, just to check that your solution isn't already working, just not updating on your device.
Related
I am seeing a weird issue with a new app that I am starting. I am utilizing the new Android 12 splash screen API to create my splash screen and I followed the guide provided by Google to do so. I included core-splashscreen in my project to provide compatibility with older versions of Android OS. When I run the app, I see the splash screen as expected on older OS versions like API 30, but when I run it on API 31, the splash screen icon that I provide is not displayed. The background color that I specify is displayed, but the icon is not there at all. I have tried this with a drawable asset as well as a mipmap and nothing is working. I am stumped as every tutorial I find shows the same steps I have followed and screenshots of their working splash screens, but I am not having any luck.
For context here is my splash screen style definition for v31:
<style name="Theme.Splash" parent="Theme.SplashScreen">
<item name="android:windowSplashScreenBackground">#color/orange_7A</item>
<item name="android:windowSplashScreenAnimatedIcon">#drawable/splash_foreground</item>
<item name="postSplashScreenTheme">#style/Theme.App</item>
</style>
I have an identical style for all other OS versions except I'm using "windowSplashScreenAnimatedIcon" instead of "android:windowSplashScreenAnimatedIcon". I have tried v31 with and without the "android:" in front of the item names and neither work. Here is my MainActivity.kt:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
installSplashScreen()
setContent {
MyVeevaTheme {
Login()
}
}
}
I am also setting the "android:theme" property to my splash style in my AndroidManifest.xml. I know the splash style is being applied because it honors the background color, but it is not showing the icon for some reason even though the icon shows fine for older OS versions. Thanks in advance for any help you can give.
TL;DR kill the app and run from the launcher, icon does not show up when run from Android Studio.
Adding my comment here as an answer for better visibility.
I did figure out how to get it to show. I was following this tutorial to set up a base project to recreate the issue and I noticed the note the author put right near the bottom that mentions that just running the app doesn't show the full splash screen. You have to kill it and open the app from the launcher. Once I did that, I was able to see my splash screen. Annoying, but at least I have a way to test it now. I did go ahead and log a bug report for this as well, but I have a work around for now. Thanks for everyone's answers/comments!
folks as per the document installSplashScreen() should have been called prior to super.onCreate()
When you use the AndroidX SplashScreen Library, like you are doing (Theme.SplashScreen) you need to use the windowSplashScreen* attributes without the android: prefix.
The android: prefix is used to call the platform attributes, but in this case you are using the library and not the platform, so no need for the prefix:
res/values/themes.xml:
<style name="Theme.Splash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">#color/orange_7A</item>
<item name="windowSplashScreenAnimatedIcon">#drawable/splash_foreground</item>
<item name="postSplashScreenTheme">#style/Theme.App</item>
</style>
For some reason when the app is launched through android studio it doesn't show the icon. Kill the app and launch app from the menu. Then the icon will appear.
This is true if you are not using Splash API: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
Icons are also not shown when navigating from the deeplink.
And It looks like its more then only not showing the icon. It also stops calling code for setOnExitAnimation lambda.
installSplashScreen().apply {
setOnAnimationListener { viewProvider ->
viewProvider.iconView
.animate()
.setDuration(500L)
.alpha(0f)
.withEndAnimation {
viewProvider.remove()
someActionCall()
}
.start()
}
If you relied upon this code to be always called it is not.
See mention in issue tracker: https://issuetracker.google.com/issues/207095799
The following instructions helped me, you may try this one. A few things need to keep in mind while working with the new splash screen API.
Keep updated on the latest library version. Follow this link (https://developer.android.com/jetpack/androidx/releases/core).
Put installSplashScreen() before setContentView()
Make a proper theme for the splash screen. You may try the following one.
Put this into your styles.xml or themes.xml folder and use it with your activity as the theme.
<!-- Splash Screen Theme. -->
<style name="Theme.AppSplash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">#color/white</item>
<item name="windowSplashScreenAnimatedIcon">#mipmap/ic_launcher_round</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<item name="postSplashScreenTheme">#style/AppTheme</item>
</style>
Make sure you set the theme to the MainActivity as well. For me that was the cause for the splash screen to now show. So you have to set the theme in both the application and the MainActivity
In addition to the other explanations above, I had the same issue but I realized that in my Manifest file I was setting the Splashscreen theme on my MainActivity which is correct, but my MainActivity was not having the main/launcher intent-filter which tells the android OS that this is the starting activity.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
So in your manifest, check that you are actually setting the Splashscreen theme on the Starting activity that is having the main/launcher intent-filter, and leave the Application tag to have your application theme and not the Splashscreen theme, to avoid having your app misbehave on other activities due to the theme because I experienced that too (This is especially for those migrating to the new splash screen).
Thank you, I hope someone finds this helpful
I had the same problem on my phone running Android 12. None of the above suggestions worked, (moving installSpashScreen() above super.onCreate etc...)
What fixed it for me was adding the android:theme attribute in the manifest to the Launching <activity> Tag, Not the <application> Tag, which is contrary to the documentation :
In the manifest, replace the theme of the starting activity to the theme you created in the previous step.
<manifest>
<application android:theme="#style/Theme.App.Starting">
<!-- or -->
<activity android:theme="#style/Theme.App.Starting">
Note, you still have to kill the activity and launch it from the launcher for this to work :(
In my case, the problem with the lack of a splash screen was the installation of the default activity theme:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:name=".App"
android:theme="#style/Theme.Tracker.StartSplashScreen"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:allowBackup="true"
android:dataExtractionRules="#xml/data_extraction_rules"
android:fullBackupContent="#xml/backup_rules"
tools:targetApi="tiramisu">
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="#style/Theme.Tracker"> <-------
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
When I deleted android:theme="#style/Theme.Tracker" line, it started working.
I was recently trying to add a splash screen to my android app that I am trying to develop. But no matter what changes I make changes are not getting reflected. I am new to flutter to I am including a lot of code. Here is the code -
values>colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="background_color">#FFCC00</color>
</resources>
drawable>>launch_background.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#color/background_color" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="#drawable/welcome" />
</item> -->
</layer-list>
I am using flutter channel 'master' as Android Studio 4.1.2 is not supported in channel 'stable'
Please inform me if any other code is required. Thanks in advance.
I tried a lot of stuff. Wasted nearly 14 hours, to realize that Android Studio 4.1.2, has some sort of problem with flutter doctor as of 12/2/2021. So I switched back to Android Studio 4.0 and re-installed the flutter SDK. This solved the problem for me. As far as, I am aware of the issue, it was due to different unsupported versions of Android Studio and Flutter. Maybe in the future, smart guys at google sort this out :)
Just want to drop this here for those who may have this issue with React Native. What solved it for me was slightly renaming the splash screen file inside my assets folder. It was splash.png, after I made changes to it and overrode the file, the old splash screen kept showing.
Reloading, restarting the server, clearing cache, none solved it.
When I finally renamed the file to splashscreen.png and reload. Viola!
I have created a flutter application that works well on a physical phone but when I try it out on an emulator the application stops unfortunately. Error produced java.lang.RuntimeException: Unable to start activity ComponentInfo{big.xxxx.xxxxx/xxx.xxxxx.xxxxx.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable/launch_background.xml from drawable resource ID #0x7f040019
I have checked and the launch_background.xml is present. Here is the content
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="#mipmap/launch_image" />
</item> -->
</layer-list>
Looks like you have deleted your launch_background.xml this is the first screen that is execute in your Android when you are using Flutter. Check in the path /android/app/src/main/drawable if you have the launch_background.xml.
If you don't you must added in your project.
After asking around I was able to solve the problem by removing the instances where I call the drawable file.
This was mainly in my styles.xml file and Manifest.xml file respectively.
<item name="android:windowBackground">#drawable/launch_background</item>
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="#drawable/launch_background" />
Had an opportunity of asking another person who had solved this problem differently and this is what he had to say.
The underlying cause
The underlying cause seems to be that the expects a bitmap but it didn't get one. Even though #mipmap/ic_launcher points to some PNGs (see e.g. res/mipmap-hdpi), on API >= 26, it would point to this XML which Android did not seem to like very much.
So in my case, referencing the #drawable (which is always a PNG == a nice bitmap) rather than the #mipmap (which may be an adaptive-icon == a weird bitmap? if a bitmap at all?) fixed it.
In other words: don't use an as the android:src of a .
If I'd to this today I would try if a vector drawable (just import an SVG in Android Studio to get the vector XML) works as well (as opposed to having to use a PNG).
Hope that helps (or at least explains this change of mine).
Do double check that you have the same issue - Resources$NotFoundException may be thrown for many different reasons, e.g. the ressource being in the drawable-v26 folder and thus ignored when running on e.g. API 24. Sometimes the gradle build log shows some warning saying that an XML failed to compile (but the build still succeeds and then things blow up at runtime).
Best search the internet for other causes and fixes for Resources$NotFoundException if it's not the same issue.
Just comment this out in android\app\src\main\AndroidManifest.xml
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background"/>
Edit: new image displaying rendering errors(first time asking a question, sorry if I've left anything out!)
I haven't come across a solution for this. On google there's only solutions to the reverse of this where the emulator isn't showing what the design preview is!
It must be something to with my themes because I have rendering problems:
"Failed to find style 'textInputStyle' in current theme".
However I've tried to switch between every theme with no improvement.
Honestly just confused as to why it would work perfectly on the emulator but not on the preview, It would be handier to have this function working rather than building and running for every single change, thanks!
This is my styles.xml:
`
<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:textColor">#color/colorText</item>
<item name="android:textColorHint">#color/colorText</item>
<item name="colorControlNormal">#color/colorText</item>
<item name="colorControlActivated">#color/colorText</item>
</style>
`
and the manifest:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="com.example.cathy.myapplication.activities.LoginActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.cathy.myapplication.activities.RegisterActivity"
android:screenOrientation="portrait" />
<activity
android:name="com.example.cathy.myapplication.activities.UsersListActivity"
android:screenOrientation="portrait" />
</application>
There can be many reasons causing this issue! lets see them one by one!
In android studio cache is one issue so first follow the solution 1!
SOLUTION ONE
"1: INVALIDATING CACHE AND RESTART"
As in your provided styles you are not changing any builtin theme style then this input is one clear sign that android studio is not properly responding with the design part of the project that you require to build!
So GO to FILE menu ==> Invalidate Cache and Restart and see if that works! on restart ! this should!
SOLUTION TWO
"1: Selecting the proper design render sdk option"
In the image I encircled the option to select by default it select what's more suitable but Softwares do make tiny mistakes too! so try changing the sdk version there! if you have multiple sdk platforms installed for android! This will refresh the design in the design area!
SOLUTION Three
"3: Updating the sdk from settings or Downloading most famously used Android sdk api"
go in your settings of android and open sdk manager! download any other android api for android install it completely!
SOLUTION Four
"4 Update your android studio to latest build tools and latest apis"
Go in Help Menu and press Check for updates and follow the rules!
Change your build file in android. I had alpha3 before.
dependencies {
.....
implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
.......
implementation 'com.android.support:design:28.0.0-alpha1'
.....
}
Missing styles. Is the correct theme chosen for this layout? Use the Theme combo box above the layout to choose a different layout, or fix the theme style references. Failed to find style mapViewStyle in current theme.
I tried every solutions available to solve this problem but nothing seems to work. I have included library in the manifest file. I even created style is styles.xml, I have chosen Google Apis build target as well.
Can somebody please give me a solution?
here is my xml file:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="#style/AppTheme"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.google.android.maps.MapView
android:id="#+id/themap"
style="#style/mapViewStyle"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="here i have my key"
android:clickable="true"
android:enabled="true" />
</RelativeLayout>
Here is my manifest snippet:
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Second" />
<activity android:name=".Third" android:theme="#android:style/Theme.Black"/>
</application>
here is my style.xml file
<resources>
<style name="mapViewStyle" parent="#android:style/Theme.Black">
</style>
</resources>
For Android Studio (or IntelliJ IDEA),
If everything looks OK in your project and you're still receiving the error in your layouts, try to 'Invalidate caches & restart'.
Enjoy a coffee while Android Studio is recreating caches & indexes.
I had the same problem and found it was the Theme dropdown at the top of the graphical layout editor. I changed from Holo to Theme and the layout displayed and error disappeared.
What I usually do is the following: a Gradle Clean, Rebuild and Sync all my Gradle files. After that I restart Android Studio, and I go to:
Select Theme -> Project Themes -> AppTheme
This is because you select not a theme of your project. Try to do next:
If we are creating too many projects using Android Studio sometime Rendering issue comes. Even creating a blank activity we receive such rendering error.
Please shut down and restart Android studio. In case the issue persists you can
Hope this helps. It works similar fashion as rule of thumb, in case all looks good and still error persists a restart of application usually resolves the issue.
In my case the problem occurred while the default setting for Android Version in the Designer was set to 'Preview N'. Changed Android Version to '23' and the error notification went away.
Edit And don't forget to uncheck 'Automatically Pick Best'.
I had the same problem using Android Studio 1.5.1.
This was solved by using the Android SDK Manager and updating Android Support Library, as well as Local Maven repository for Support Libraries.
After updating the SDK and restarting Android Studio, the problem was rectified.
Hope this helps anyone who has the same problem after trying other suggestions.
I solved it by changing "classpath" in "dependencies" in build.gradles.
Just change:
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0-alpha2'
or something like that to:
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
I got this error after overriding action bar style like this. Also i lost action bar in preview.
<style name="general_app_theme" parent="#style/Theme.AppCompat">
<!-- for API level 11 -->
<item name="android:actionBarStyle">#style/action_bar_style</item>
<!-- Support library compatibility -->
<item name="actionBarStyle">#style/action_bar_style</item>
</style>
<style name="action_bar_style" parent="#style/Widget.AppCompat.ActionBar">
<!-- for API level 11 -->
<item name="android:height">#dimen/action_bar_height</item>
<item name="android:background">#color/action_bar_color</item>
<item name="android:displayOptions">showTitle</item>
<!-- Support library compatibility -->
<item name="displayOptions">showTitle</item>
</style>
So, problem is overriding theme by my custom. this is the reason, why I've changed AppCompat (from "Project Themes") to general_app_theme (from "Manifest Themes"). Now I have no this error and action bar in preview come back.
Try switching the theme in the design view to one of the options in "Manifest Themes". I'm guessing this is Because you are inheriting the theme from the manifest to support multiple api levels. It worked for me anyway.
With reference to the answer provided by #Benno:
Instead of changing to a specific theme, you can simply choose 'DeviceDefault' from the theme menu. This should choose the theme most compatible with the emulated device.
If you still have the problem after trying all the solutions aboveļ¼ please try modify the API Level as shown below. Incorrect API Level may also cause the problem.
It can be fixed by changing your theme in styles.xml from
Theme.AppCompat.Light.DarkActionBar to Base.Theme.AppCompat.Light.DarkActionBar
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
to
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
and clean the project. It will surely help.
Most of the errors in XML happen due to the names you have given to the resources.
Images stored in the drawable folder need to be named in a proper manner.
just check these things:
Are there any duplicate files? if so remove the duplicates. (For example "image.jpg" and "image.png" are not allowed in the same time. It will not show any errors but sometimes it will show that R.java cannot be resolved)
Do the filenames contains any uppercase letters? If so right click on that file->refactor->rename
and rename it with all lowercase, no hyphens, and only a-z and 0-9 are allowed.
Just make sure of the above cases.
I got the same problem with my customized theme that used Holo.Light as its parent. In grayed text Android Studio indicated that some attributes were missing. When I added these missing attributes as follows, the rendering problems went away -
<item name="android:textEditSuggestionItemLayout"></item>
<item name="android:textEditSuggestionContainerLayout"></item>
<item name="android:textEditSuggestionHighlightStyle"></item>
Even though they introduced errors in my style's theme, they caused no problems in rendering the activity designs or building my app.
You can simply remove this error through change "App theme" and select any theme such as light. This error will be removed.
I meet the same problem.Select theme to another one in preview can solve problem temporary.Like the image
Finally,I found out that there are AppTheme and AppBaseTheme in my styles.xml.
And AppTheme has parent AppBaseTheme.
The AppBaseTheme has parent of one system style.
And every layout file use the theme AppTheme.
Just change AppTheme's parent to AppBaseTheme's parent.
It solve the problem permanent.
Just need click button 'AppTheme', and choose 'Manifest Themes'. It works in most cases.
For me, it was occurring on menu.xml file as i was using android:Theme.Light as my theme, So what i did was -
Added new Folder in res directory named values-v21.
Added android:Theme.Material.Light as AppTheme in styles.xml.
This is very late but i like to share my experience this same issue.
i face the same issue in Android studio i tried to some other solution that i found in internet but nothing works for me unless i REBUILD THE PROJECT and it solve my issue.
Hope this will works for you too.
Happy coding.
Change your App theme to AppCombat..