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.
Related
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
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
So yeah, i'm looking for a solution online to this issue since 3 days ago but i couldn't find anyone having this same problem.
This only happens in my Galaxy Note 2 Android version 4.4.2.
What happens is that the toolbar works when i'm using an virtual machine with android 5.0, but unfortunately if i install it in my cellphone it renders as a white space. The funny part is that its buttons work (up button to open my drawer layout). Any clue on this?
Method where i startup my Toolbar:
My main Activity Layout:
My toolbar XML:
The problem itself:
I wasn't able to fix this problem until google released the new AppCompatActivity within the appcompat library. Basically it is a substitute to the ActionBarActivity which eases the implementation of the new Toolbar on pre-lollipop devices.
To anyone interested: Example usage of AppCompatActivity in 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.
I use ActionBarSherlock on my app compiled with Android 4.0.3.
When testing on my device running JellyBean 4.2.1, I can see the overflow icon both in the ActionBar and in the bottom buttons bar.
See Screenshot.
How can the bottom overflow button be removed?
EDIT: Both buttons work!
Increase your android:targetSdkVersion to 14 or higher, as I outline in this blog post.
I create a menu like that in my app and have some items in a menu.xml that looks like this:
<item
android:id="#+id/menu_main_about"
android:orderInCategory="100"
android:showAsAction="never|withText"
android:title="Acerca de"/>
Maybe you are supplying some extra or different attributes that cause that behavior. Please try with this to confirm that.
In the samples that brings the ActionBarSherlock, one's of these are what you need.