Gary Paluk
Gary Paluk

Reputation: 1058

Android CoordinatorLayout show ActionBar

I have a CoordinatorLayout that is setup using the default Tabbed Activity in Android Studio. This activity has the scroll flags as follows:

app:layout_scrollFlags="scroll|enterAlways"

I have a 'scroll to top' assigned to an icon in the TabLayout via the pager adapter:

mSectionsPagerAdapter.feedFragment.scrollToTop();

When I click this, I would also like to force the ActionBar back into view. I had assumed that I would be able to call:

getSupportActionBar().show();

However, that isn't working. Any suggestions?

Upvotes: 0

Views: 80

Answers (1)

Muthukrishnan Rajendran
Muthukrishnan Rajendran

Reputation: 11642

You can use appBarLayout.setExpanded

Upvotes: 1

Related Questions