How to enable transparent on screen keys in app on Android Lollipop? - android

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.

Related

How to achieve Google's Android 12 app widgets backgrounds?

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.

Android view elements appear black (only on OnePlus 6 with Android Pie)

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.

Force Android App to have Jellybean Theme?

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

Android: How to change the status bar color in JellyBean (API 18)

I want to implement transparent/colored status bar in Android JellyBean (v18). After reading lots and lots of SO threads and googling, I decided to post a new question.
I have seen an app in my JellyBean phone which does this. (Asus Email app)
Screenshot 1 (sidebar collapsed
Screenshot 2
Screenshot 3
I know it can be done in API > KITKAT. But I want to understand how to do similar effect in API > 16. I am using v7 support library and AppCompatActivity. I have also tried below code
<item name="colorPrimaryDark">#color/white100</item>
<item name="android:fitsSystemWindows">false</item>
I have no clues now. Please help!
Sorry posting this as an answer but I can't comment yet. Android doesn't have this implemented on it's API before kitkat. So I think that you're using a smartphone from asus and the app in the screenshots is a native app. In this case asus could do it by changing the android source code.

Android App Development - Theme Trouble

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.

Categories

Resources