-2

I have achieved layout as shown in Fig 1 and when I scroll up the yellow part, I should get result as shown in Fig 2. I tried doing this by using coordinator layout but I couldn't achieve it. As you can see after scrolling up the button gets hidden and the text will get smaller and pinned there, it will be fixed and wont get hidden like button. The text and button are horizontally center aligned. After scrolling down it will be back to Fig 1. BTW the yellow part consists of text. Need help on this. Thanks

Fig 1

Fig 1

Fig 2

Fig 2

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Sujeet
  • 1
  • 2

1 Answers1

0

add scroll listener. if the page is scrolled hide the button (better to add button in layout and handle the layout)

Avinash
  • 361
  • 4
  • 16
  • I want to give the collapsing toolbar effect to text part. And even the button should hide in same manner(collapsing) – Sujeet Jan 24 '18 at 09:25