My first question :-)
So recently I took up app development, and was going through the tutorial posted here:
http://developer.android.com/training/basics/firstapp/index.html
I finished part 1 - "Building Your First App" and followed exactly every instruction.
According to the Google tutorial, the result should look like:
http://developer.android.com/images/training/firstapp/firstapp.png
However, when I ran the app using the emulator (Platform 4.2.2, API level 17), the app was missing the theme, meaning only the black bar with the app icon and a white background.
I don't know what is wrong, when I created the application (project), I made sure to set the theme to "Holo Light with Dark Action Bar" as instructed in the tutorial.
Is it because I am running the app in the emulator? If not, then what do you think I should do to fix the issue?
Thank you very much :-)
However, when I ran the app using the emulator (Platform 4.2.2, API
level 17), the app was missing the theme, meaning only the black bar
with the app icon and a white background.
Theme.Holo.Light.DarkActionBar is a light theme with a dark ActionBar, so your app does not look wrong. If you want a dark theme, then use Theme.Holo.
Related
Android 12 came with the new app widget feature "device theming" using the system's default theme #android:style/Theme.DeviceDefault.DayNight.
Seeing a screenshot like the one below in the documentation I was expecting to see more of the theme colours to be picked up in my own widget:
Compared to both the screenshot above and Google's app widgets like the ones for the weather and Gmail I can hardly measure any colours being picked up.
I also tried out Material Design 3's way of doing it via Theme.Material3.DynamicColors.DayNight with the same result. The screenshot below shows the Material design example app widget vs Google's weather widget - running on an Android 12 Pixel 5 device.
What is that Google's app widgets do differently to pick up so much more colour from the device theme?
I got word about the system_accent1_* colours and the blog post https://medium.com/#xch3dx/using-material-you-in-your-app-15ec982eecb4 .
Using <item name="android:backgroundTint">#android:color/system_accent1_50</item> I finally got the same background colour as Google has for their widgets.
I'm working on an MVVM Android application. When I run the app on an OnePlus 6 with Android Pie all views appear in a sort of "dark theme". All the CardViews, Spinners and Dialogs through the app have a black background out of nowhere.
I made a new app with a CardView and let it run on the OnePlus6. That app was normal with a white CardView background.
I also tried to build the app on lots of different phones but only on the OnePlus 6 this sudden "dark theme" appears.
The OnePlus 6 uses the light theme, so that can not be the problem.
Does anyone know where this comes from? What code can I upload to make things extra clear?
one plus 6 has his own theme engine so you have first to installs themes to the mobile using for example : "substratum" then it will be better.
The problem is with the develop options on the phone. I tried to turn that off and on and for a while it worked in the normal way.
I don't know why it turns to black but it has to do with the Developer Options.
I have an app which I'm developing since Android 1.6, starting with Eclipse and moving to Android Studio later. I did my best to keep the compatibility but recently decided to give up on these 6 people having it installed on Android below 4.0 version. I changed the compileSdkVersion and targetSdkVersion to 26 and... I lost my styling.
My text is black instead of white:
So apparently my default app style was switched from dark to light (I guess it was Holo Dark back then?). What can I do to fix this?
I've seen some answers about using styles, colors etc. but I don't have xml's like these because when I started this project, they didn't exist yet.
I'd like to avoid recreating every color and applying it to every element to bring back the old look. What should I do?
I am making an Android app and was messing around with styles. Instead of using the Material Light/Dark or other themes that I could find, is it possible to render the phone in Jellybean? I would like the look and feel of Jellybean while keeping the functionality of Lollipop. Does anyone know how to do this?
-- Ben
I saw this in a flashlight app on my nexus 5 the other day running Lollipop, and I now really want to implement it in some of the apps I am developing, but I can't seem to find any resources saying how to enable the transparent navigation keys.
This is what I mean:
If someone could point me in the right direction I would be hugely grateful.
In your theme add the following line:
<item name="android:windowTranslucentNavigation">true</item>
Check out iosched(I/O 14) app in github which describes the API to use.