Galaxy S4 SupportActionBar covers whole screen in ActionMode - android

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.

Related

Android Theming toolbar isn't themed correctly

Trying to add Dark Mode to my app. I am mostly there, most things work as I expect after I made the required changes, however I have a problem with the Toolbar. What have I missed?
Screenshot of Toolbar issue, and layout
You're applying AppTheme to popupTheme, what does it have?
You don't usually need to make a custom one, one of the pre-made ones like ThemeOverlay.MaterialComponents.Toolbar is enough.
And actually, if you're using MaterialComponents, you don't need to apply anything to your app to make it work in Dark Mode, just use the DayNight MaterialComponents theme.

On emulator and device StatusBar is treated differently

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

S8 Specific Bug Android: Black color bottom navigation and action bar

I am developing an app and when I set android:background as "?attr/colorPrimary" , it appears black on s8 but appears fine on all other devices. Does anyone know what might be the reason and a fix apart from manually changing the background?
Finally found what was wrong, it was because of a bug in cardview and using
app:cardBackgroundColor="#color/white"
worked. There is also a similar issue created for google: https://issuetracker.google.com/issues/37087169

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.

Categories

Resources