This question already has answers here:
android.view.View.systemUiVisibility deprecated. What is the replacement?
(21 answers)
Closed 2 years ago.
Recently Google has deprecated setting system UI visibility directly using the setSystemUIVisibility method found in the View class and passing flags to it.
I couldn't find the source code for this as it's not released publically yet. Do you guys know how I can achieve going fullscreen without using this method?
Yes now since it is deprecated, you can use:
window.setDecorFitsSystemWindows(false)
Then make sure you make the status bar transparent as well by adding below style to your app theme
<item name="android:navigationBarColor">#android:color/transparent</item>
Hope this helps :)
Related
This question already has answers here:
getColor(int id) deprecated on Android 6.0 Marshmallow (API 23)
(14 answers)
Closed 5 years ago.
I've searched long time but I couldn't find the correct answer.
I have Resources/values/colors.xml
I added <color name="colorBottomBar">#D0D0D0</color>
I want to set that color to my textview programmatically.
I tried this.
txtBottomHome.SetTextColor(Resources.GetColor(Resource.Color.colorBottomBar));
But Resources.GetColor is deprecated.
Please help me.
I am not familiar with Xamarin, but in standard Android, Resources.getColor(int) was deprecated in favor of Resources.getColor(int, Theme). The backwards-compatible way to get a color, then, was ContextCompat.getColor(Context, int). Perhaps there is an equivalent in Xamarin.
This question already has answers here:
How do I change the background color of the ActionBar of an ActionBarActivity using XML?
(21 answers)
Closed 6 years ago.
I am newbie to android and i am working on a demo related to actionbar and fragments,I have done with it but now i want to change the colour of my actionbar,I have tried below link which gives me exception,
Change Color of Actionbar in Android
So,Can anybuddy helps me to do it?
Thanks in advance,Dont close it as i couldnt find any solution so far.So i request you to guide rather than close the question.
I think that this answer will fit all your requirements - change-color-of-actionbar-in-android.
You simply need to modify your Theme.
This question already has answers here:
Style SnackBar in theme app
(5 answers)
Closed 2 years ago.
I would like to reduce boilerplate setting up Snackbar colors in my code. Can I style it overriding an existing style, for example?
Unfortunately, Snackbar using a few common items with other widgets (like colorAccent), so just changing those was problematic for me too. Instead I added my own design_layout_snackbar_include.xml. Take the original and modify what you will need. It will work for all of your snackbars.
This question already has answers here:
Change Toolbar color in Appcompat 21
(11 answers)
Closed 7 years ago.
I have made an actionbar like this which is nested using the child Fragment Manager but i am unable to style it like the red color youtube has done. How do I style the actionbar for nested fragments. Please Help.
Follow this example, it uses all the latest libraries and is very easy to understand and copy/reuse for your project
https://github.com/chrisbanes/cheesesquare
This question already has an answer here:
Android: Using default styles
(1 answer)
Closed 8 years ago.
Okay this is the third time I am asking this question. It would be appreciative if someone gave me a concrete answer with an appropriate example..
While styling my Android UI, I needed to change the look and feel of my ALertDialog. However, I tried import the alert dialog default style using the following
style name="alertDialogStyle" parent="#android:style/AlertDialog"
While doing the above I get an error saying something like "parent resource not found". As far as I heard from others it seems that its a private style and cannot be used.
So is there anyway that it can be used that I am nit aware of?
I think you are supposed to use a Theme as your parent instead of a Style.
For AlertDialog, the default theme is #android:style/Theme.Holo.Dialog.Alert for Honeycomb and later, and #android:style/Theme.Dialog.Alert for older versions.
You can see the theme declaration in [ANDROID_SDK]/platforms/android-19/data/res/values/themes.xml. There are several variations you might be interested into.