On emulator and device StatusBar is treated differently - android

I made simple tab navigation with content inside. (tested even without navigation just with button in app.compnent.tns.html) and on Android emulator button is hidden under StatusBar however on actual device it is not. I am sure i do not have any global styles applied. Can somebody advice why and what should I do to make it working simmilar?

try android:fitsSystemWindows="false" in xml root layout,
or <item name="android:fitsSystemWindows">true</item> in style.xml

It was due different version of Android (9 and 10) on device and emulator. I solved this by following this: https://github.com/NativeScript/nativescript-angular/issues/2110#issuecomment-576570728

Related

Can't make ProgressBar use material design style

I'm transitioning an app from Holo style to Material design, and am stuck with a ProgressBar widget that won't show up as it is supposed to.
It's supposed to be flat like (and that's what AndroidStudio's preview gives me):
But when on the emulator (running Android 7.1.1), I only get the version with an arrow tip (also, it's not being animated)
I've already tried removing every single bit of customization on top of the base AppTheme, which inherits from Material:
<style name="AppTheme" parent="android:Theme.Material.Light"></style>
The ProgressBar is declared without any styling whatsoever, plain:
<ProgressBar
android:id="#+id/sign_in_activity_login_progressbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="true" />
I'm at a loss here, already removed everything on the project that could reference styling, but this still happens. Already cleaned/rebuilt the project many times. What am I missing? How can I make that progress bar look like the flat one?
This is the problem of the emulator. Sometimes emulator does not give us the proper result.
If you run it on a device then you will get to see the difference and it also depends on a device. If any device's OS is customized then the progress bar may look different.

Toolbar design breaks in a lollipop device

I have implemented a collapsible toolbar(prevented the collapse) for my app and it works fine Here is the Screenshot of my collapsible toolbar for a device of 4.2.2
When i execute my app in a device of 5.0, App looks like this,
as you can see there is a gap difference at the bottom of a status bar in 5.0, similarly when i go to other fragment activities of my app the app looks ugly in terms of UI here is what i mean
In a device 4.2.2
In a device 5.0
Here is the link for my styles both styles folder
I don't understand what is the mistake i have done. please help.
Thanks
Not sure if this will help, but I had an issue similar to this, but the Toolbar content was pushed upwards. I added
<item name="android:fitsSystemWindows">true</item>
to my app theme and it fixed it.
Finally the solution is solved. I fixed it by using android:fitsSystemWindows="false" to the CoordinatorLayout and android:fitsSystemWindows="true" for the AppbarLayout and collapsingToolbar rather then using it in my style.xml.

Android marshmallow listview scrolling gets blurry

I have an android application which is running on production for several years. Lately, I have discovered a problem with a ListView in the app, that gets blurry while scrolling. The problem only occurs under Android Marshmallow.
Here is a screenshot of the ListView while scrolling
Any help would be much appreciated.
Thanks!
Preface: I posted a separate answer prior to this one, but that solution only worked on my MotoX. I later discovered it did not work for my Galaxy Tab A. The answer here seems to be more universal:
I was able to fix my scrolling blur by defining a separate ListView style for my application and specifying a different list divider. So, for my application theme I set this:
<item name="android:listViewStyle">#style/ListViewStyleNoBlur</item>
Where ListViewStyleNoBlur is defined as:
<style name="ListViewStyleNoBlur" parent="#android:style/Widget.ListView.White">
<item name="android:divider">#android:drawable/divider_horizontal_bright</item>
</style>
I specified these in a values-v23 resources folder so the change doesn't affect pre-Marshmallow devices.
My application theme is based off of android:style/Theme.Light, which is why my list view style's parent is android:style/Widget.ListView.White. My app min SDK is 8, which is why I'm using such an "old" theme. I also noticed that if I use a "newer" theme, such as Holo, the blur does not exist.
I also had this problem and, through trial-and-error, finally found a solution. Hopefully it will also work for you. This appears to be a bug in Marshmallow related to the scroll bar in list views. I had the following property set in my application theme, and removing this property fixed the blurry scrolling:
<item name="android:fadeScrollbars">false</item>
Using true instead of false also works, but is unnecessary since it is the default. I also discovered (through trail-and-error) that using android:fastScrollEnabled="true" causes the same blurring, but based on your scrollbar style, you do not appear to be using it.
In summary, don't use android:fadeScrollbars. If that doesn't fix your issue, try playing around with any other scrollbar-related styles you may be using on your ListView, bearing in mind these styles may be part of the view directly, or part of an activity or application theme.

Default scroll tooltip messing up as of Marshmallow

We have a scroll bar similar to Android Clock App 'Select Cities' activity, but its breaking now that we're making a Marshmallow supported build.
On M it was the wrong size and wrong width. We fixed that with an M-specific theme.
On L it is fine
On K it sits in the middle of the screen and spins, without following the scroll tap target. We guess that we could set a K specific theme too, but not sure how we would get it to follow the scroll bar.
What gives?
If you're using:
<item name="android:fastScrollOverlayPosition">aboveThumb</item>
change it to:
<item name="android:fastScrollOverlayPosition">atThumb</item>
Worked for me. For some reason "aboveThumb" doesn't play nice with pre-L devices.

Galaxy S4 SupportActionBar covers whole screen in ActionMode

The Samsung Galaxy S4 shows a very weird behavior when going into ACtionMode on my app which is using SupportActionBar from Support-v7.
Has anyone an idea how to fix this?
I guess the issue comes from Samsung custom Android-Rom.
I solved this changing the parent of my custom actionmode theme from:
<style name="MyApp.Widget.ActionMode" parent="#style/Widget.AppCompat.ActionMode">
to:
<style name="Apo.Widget.ActionMode" parent="#style/Widget.AppCompat.Light.ActionMode.Inverse">
For some reason those themes don't seem valid in the latest AppCompat libraries (I tried Widget.AppCompat.ActionMode.Light.Inverse, but it didn't fix the issue)
Instead if you are registered for orientation changes, you can override onConfigurationChanged(...) in your custom view and re-set the proper height parameters on the layout params. This reliably works to prevent the full-screen issue.

Categories

Resources