Hiding Toolbar Android when scrolling down but not All Layout views - android

I have an Android Layout with a Scroll View Layout as Root, with a Relative Layout.
Inside of this Relative Layout I have a Toolbar and a Text View and other children below.
How can I change this layout when scrolling down, the toolbar can hide and other children inside Scroll View as well, but not this specific Text View?
ScrollView
Relative Layout
Toolbar
TextView (Visible even in Scrolling Down)
Other Children...

Related

How to implement 2 way scrolling- vertical as well as horizontal scrolling in kotlin?

I want to implement a tab layout with a horizontal swipe or scroll view and in each tab view, I could be able to scroll vertically. For reference just like WhatsApp where there are tab layouts that are horizontally scrollable or swipeable and in each tab layout there is a vertical scroll view in kotlin.
Problem I am facing -
I have implemented the recycler view in each tab layout but the problem is when I am setting the height of the recycler view as match parent then I am only able to scroll vertically as it is in the focus and when I am setting the height of viewpager2 as match parent then I am only able to swipe through the tabs. If you have any solutions for that please give.

ScrollView: How to detect if certain View inside ScrollView is past scrolling?

I have ScrollView and inside this ScrollView are some independent Views. What I want to achieve is if View A touches top of ScrollView, it will start animating - transforming instead of hiding out of ScrollView (visible screen).
It should have "collapse" effect but not completely collapsed. This View A is not toolbar or action bar so I cant use CollapsingToolbarLayout
I want to achieve "paralax" effect on custom View instead of ToolBar. With certain child views inside this View should animate/shuffle/hide as I scroll. I cant find any native solution to this only default Toolbar.

scroll Textview from out of collapse toolbar as title

I have one CollapsingToolbar and NestedScrolView under these contain of several CardView I want along with scroll up. Header TextView of one of CardView placed into toolbar. Thanks.

How to attach a linear layout inside preference screen so that entire screen is scrollable together?

I want to add a linear layout as a child to a layout with preferencescreen as root element, so that this is linear layout is scrolled together with elements in the preferencescreen just like scrolling in a single scrollview.

Display view in a scroll view on screen

In my activity I have a scroll view which contains a linear layout that has many views. Is there a way I can display a specific view (from the linear layout) when starting this activity? By default this view is hidden, so I must scroll the scroll view to make it visible.
Scroll the view to the view you want to show:
scrollView.smoothScrollTo(0, specificView.getTop())
See Is there a way to programmatically scroll a scroll view to a specific edit text?
You can use:
setVisibility(View.GONE);
see setVisibility for details

Categories

Resources