Android CoordinatorLayout 显示 ActionBar
Android CoordinatorLayout show ActionBar
我有一个 CoordinatorLayout,它是使用 Android Studio 中的默认选项卡 Activity 设置的。此 activity 具有如下滚动标志:
app:layout_scrollFlags="scroll|enterAlways"
我通过寻呼机适配器将 'scroll to top' 分配给了 TabLayout 中的一个图标:
mSectionsPagerAdapter.feedFragment.scrollToTop();
当我点击这个时,我也想强制 ActionBar 回到视图中。我以为我可以打电话给:
getSupportActionBar().show();
但是,这是行不通的。有什么建议吗?
我有一个 CoordinatorLayout,它是使用 Android Studio 中的默认选项卡 Activity 设置的。此 activity 具有如下滚动标志:
app:layout_scrollFlags="scroll|enterAlways"
我通过寻呼机适配器将 'scroll to top' 分配给了 TabLayout 中的一个图标:
mSectionsPagerAdapter.feedFragment.scrollToTop();
当我点击这个时,我也想强制 ActionBar 回到视图中。我以为我可以打电话给:
getSupportActionBar().show();
但是,这是行不通的。有什么建议吗?