Adding tool bar as an Action bar creating additional margin - android

I'm trying to build a layout which is using CollapsingToolbarLayout to perform collapse of Toolbar and allow Recycle View contain to scroll.
It work great except.
View that I want to hookup on scrolling, and scroll till action bar height.
What I need:
Scroll Sticky Header with/till it's own size, not action bar size.
Small Snippet from XML i'm using added here.
What is my observation:
There must be some dependency between CollapsingToolbarLayout and toolbar I'm using as an Action Bar.
If use theme with Default Action bar, then everything worked so perfect.
Any suggestion if I'm missing anything!!

Related

Android collapse any view on scroll

I don't have an action bar in my activity. At the top is a search bar and below that are a couple of chips, which assist filtering.
I want to collapse just the chipgroup on scrolling. Is this possible with an animation?
The only things I found were using the action bar.

Is possible have to different menu in Action Bar? (Kotlin)

I have an app, which have an action menu item on the right (2).
I need an ulterior menu in the left(1) or a button in the action bar, is that possible?
I attach a image.
enter image description here
You may create a custom toolbar. The standard height of a toolbar is 89dp.
To create a custom toolbar you should make your activity view container RelativeLayout. Then create a custom toolbar view (it may also be RelativeLayout) which height is 89dp. Then add your toolbar to the main container and set alignParentTop to true. So you have a custom flexible toolbar and you can add any view to it.
This way is very comfortable to use any custom views on your toolbar.
I also faced the same situation of customizing action bar. After a lot of searching I got the solution which is Toolbar.
Checkout: https://developer.android.com/training/appbar/setting-up
I think from now on, you should start using Toolbar as the default action bar for your apps. It provides high level of customization and material design features.

Showing Contextual Action Bar in front on TabLayout

I have a screen with TabLayout (Using Android Design Support library) at the top and a ListView below it. I don't have any Action Bar.
Whenever I select one or more Items of ListView I show Contextual Action Bar to perform some operations on selected rows. The CAB is shown above TabLayout. It seems like whole screen is shifted downwards which is not a good user experience. I want to show the CAB in front of TabLayout. The tabs should be behind CAB.
Below is my expected output:
Please help me out. How can I show CAB in front of TabLayout?
Set android:windowActionModeOverlay to true in your theme. If you're using the AppCompat library, set windowActionModeOverlay in your app's attribute namespace to true.

What is this toolbar icon called and how can I access it? (ANDROID)

I'm looking at the toolbar at the top here:
http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2013/10/digg11.jpg
Does anyone know what the icon on the top left is called and where I can find it? Also, is there anyway of adding this to my toolbar without using an ActionBar? For some reason ActionBar is deprecated for me and I have all sorts of trouble following tutorials since they all link the toolbar with ActionBar.
Appreciate any help!
you should use the action bar for that and just lay the background to the same color of your Activity background so it gives the illusion you have no Action bar. but if for some reason you insist in doing it without an Action Bar then use an image view and align it to parent top and to the left side.
And Just change your extends to AppCompatActivity so you can see your Action Bar

FitsSystemWindows with translucent status bar and action bar tabs

In the app I am currently working on, I am working on implementing the translucent status bar with action bar tabs. I hide the ActionBar and only show the tabs.
My problem is that now, the system lets space for the action bar that is not there so FitsSystemWindows is making an error.
How can I fix that?
Thanks
The actual solution that time was quite dirty: I needed to set a custom padding from the top (I think it was 47dp or something like that) to the ViewPager (I think it was the ViewPager).
The real solution has come with AppCompat that fixes such issues: So use AppCompat!

Categories

Resources