I have a SwipeRefreshLayout that hosts ViewPager in my Activity.
I am adding two fragments to the ViewPager. The first fragment has RecyclerView and the second fragment has a ScrollView.
On the first fragment, SwipeRefreshLayout was consuming scroll event. I added OnScrollListener and I am disabling refreshing if the view is not on the top.
I have same the problem with ScrollView in the second fragment, and I added ViewTreeObserver.OnScrollChangedListener() to ScrollView.
However, when I am on the first page, the scroll event passes to second page.
I tried to set android:clickable="true" on parent view of the first fragment and it didn't work.
Any recommendation would be helpful.
my_activity.xml
<include android:id="#+id/toolbar" layout="#layout/include_toolbar" />
<FrameLayout
android:id="#id/container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#id/toolbar">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TabLayout
android:id="#+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/login_background"
android:fillViewport="true"
android:fitsSystemWindows="true"
android:layout_below="#id/tab_layout">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/last_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="#dimen/normal_padding"
android:paddingTop="#dimen/small_padding"
android:textColor="#color/gray"
android:paddingBottom="#dimen/small_padding"
android:textSize="#dimen/caption"
android:textStyle="bold" />
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_below="#id/last_update"
android:layout_width="match_parent"
android:layout_height="fill_parent"/>
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>
</FrameLayout>
first_fragment.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="16dp"
android:background="#android:color/transparent"
android:clickable="true">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</LinearLayout>
second_fragment.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/container"
android:background="#android:color/transparent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true">
There are some child views here.
</ScrollView
SecondFragment
onScrollChangedListener = new ViewTreeObserver.OnScrollChangedListener() {
#Override
public void onScrollChanged() {
SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) getActivity().findViewById(R.id.swipe_container);
int scrollY = scrollView.getScrollY();
if (scrollY == 0) swipeRefreshLayout.setEnabled(true);
else swipeRefreshLayout.setEnabled(false);
}
};
scrollView.getViewTreeObserver().addOnScrollChangedListener(onScrollChangedListener);
This is because the second Fragment is created along with the first Fragment and it gains focus. I had this issue when I had used a Depth Page Transformer. The second Fragment was rendered under the first Fragment and was thus consuming touches.
Try using the following Page Transformer:
viewPager.setPageTransformer(false, new CustomViewPager.PageTransformer() {
#Override
public void transformPage(View view, float position) {
// TODO Auto-generated method stub
int pageWidth = view.getWidth();
int pageHeight=view.getHeight();
if (position < -1) { // [-Infinity,-1)
// This page is way off-screen to the left.
view.setAlpha(0);
}
else if (position <= 1) { // [-1,1]
float scaleFactor = Math.max(min_scale, 1 -Math.abs(position));
float vertMargin = pageHeight * (1 - scaleFactor) / 2;
float horzMargin = pageWidth * (1 - scaleFactor) / 2;
if (position < 0) {
view.setTranslationX(horzMargin - vertMargin / 2);
} else {
view.setTranslationX(-horzMargin + vertMargin / 2);
}
// Scale the page down (between MIN_SCALE and 1)
view.setScaleX(scaleFactor);
view.setScaleY(scaleFactor);
// Fade the page relative to its size.
view.setAlpha((float) (0.2 +
(scaleFactor - min_scale) /
(1 - min_scale) * (1 - 0.2)));
}
else {
// This page is way off-screen to the right.
view.setAlpha(0);
}
}
});
The second Fragment is now rendered way off to the right and thus the touch events are passed to the first Fragment.
Try to add separate SwipeRefreshLayout instead of declaring commonly, for example.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="16dp"
android:background="#android:color/transparent"
android:clickable="true">
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/login_background"
android:fillViewport="true"
android:fitsSystemWindows="true"
android:layout_below="#id/tab_layout">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
If we add the fragment instead of replace, the fragment underneath can consume the click/touch events in case the fragment on top is not consuming it. To avoid that, we can set the root view of the top fragment clickable as shown below (not in XML):
private var binding: FragmentFragment1Binding? = null
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
binding = FragmentFragment1Binding.inflate(inflater, container, false)
binding?.root?.isClickable = true
return binding?.root
}
Related
I have a group horizontal RecycleViews inside a SwipeRefreshLayout and I am having trouble with swiping the Recycleviews on the start of the page as it keeps stopping it and detecting a refresh swipe.
How to stop this from happening?
Or is there a way to trigger refresh only if not swiping?
Also, is this the best way to implement my desired layout?
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/activity_main_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="70dp"
android:isScrollContainer="false"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/block_border"
android:orientation="vertical">
<TextView
android:id="#+id/trending_episodes_title"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<!--This is the first affected recycle -->
<android.support.v7.widget.RecyclerView
android:id="#+id/trendingEpisodesRecycle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:orientation="horizontal" />
</LinearLayout>
<!--This is the Second affected recycle -->
<android.support.v7.widget.RecyclerView
android:id="#+id/allNewsRecycle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/title_top"
android:clipToPadding="false"
android:orientation="horizontal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/block_border"
android:orientation="vertical">
<TextView
android:id="#+id/moods_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="#dimen/title_top"
android:textColor="#color/colorBlack"
android:textSize="20sp"
android:textStyle="bold" />
<android.support.v7.widget.RecyclerView
android:id="#+id/moodsRecycle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:orientation="horizontal" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
Ok so I solved this problem by disabling the SwipeRefreshLayout when the RecycleView is being touched, and re-enabling it again once the user let go of the RecycleView.
Bellow are the code for that from my program:
MyRecycleView.addOnScrollListener(new RecyclerView.OnScrollListener() {
#Override
public void onScrollStateChanged(final RecyclerView recyclerView, int newState)
{
super.onScrollStateChanged(recyclerView,newState);
if (newState != RecyclerView.SCROLL_STATE_IDLE) { // on scroll stop
mSwipeRefreshLayout.setEnabled(false);
}
else
{
mSwipeRefreshLayout.setEnabled(true);
}
}
}
Zaid answer works fine. But in my case I had horizontal recycle views inside adapter, so for me it would be hard to connect adapter with activity recycler.
Easier approach is to create custom VerticalRefreshLayout and use it instead of SwipeRefreshLayout.
Kotlin solution:
class VerticalRefreshLayout(context: Context?, attrs: AttributeSet?) : SwipeRefreshLayout(context!!, attrs) {
private val mTouchSlop: Int = ViewConfiguration.get(context).scaledTouchSlop
private var mPrevX = 0f
#SuppressLint("Recycle")
override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
when (event.action) {
MotionEvent.ACTION_DOWN -> mPrevX = MotionEvent.obtain(event).x
MotionEvent.ACTION_MOVE -> {
val eventX = event.x
val xDiff = abs(eventX - mPrevX)
if (xDiff > mTouchSlop) {
return false
}
}
}
return super.onInterceptTouchEvent(event)
}
I have a RecyclerView as the only child of SwipeRefreshLayout, I want the RecyclerView wrap_content. When I set both of them "wrap_content", it doesn't work. The RecyclerView with fewer items also match_parent. When i delete SwipeRefreshLayout, the RecyclerView will wrap_content. Can anyone help me? My English is poor, Maybe you cann't understand. Anyone can help me? Thank you very much.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/container_v"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00ffff">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.SwipeRefreshLayout>
Finally, I work out it. From this Answer
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/container_v"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#00ffff">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="#+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"/>
</LinearLayout>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
The key is to use Layout wrap RecyclerView. Beacause of SwipeRefreshLayout use MeasureSpec.EXACTLY mode measure mTarget size when onMeasure():
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
if (mTarget == null) {
ensureTarget();
}
if (mTarget == null) {
return;
}
mTarget.measure(MeasureSpec.makeMeasureSpec(
getMeasuredWidth() - getPaddingLeft() - getPaddingRight(),
MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(
getMeasuredHeight() - getPaddingTop() - getPaddingBottom(), MeasureSpec.EXACTLY));
......
}
And mTarget is the first child view of SwipeRefreshLayout. So this will cause the mTarget always match parent.
private void ensureTarget() {
// Don't bother getting the parent height if the parent hasn't been laid
// out yet.
if (mTarget == null) {
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
if (!child.equals(mCircleView)) {
mTarget = child;
break;
}
}
}
}
FrameLayout is used because it is more lightweight.
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp"
tools:itemCount="2"
tools:listitem="#layout/item_msg_detail_text_style" />
</FrameLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
I'm using RecyclerView inside NestedScrollView. Also i set setNestedScrollingEnabled to false for recyclerview
to support lower API
ViewCompat.setNestedScrollingEnabled(mRecyclerView, false);
Now! When user scrolled the view every thing seems okay, but!!! views in recyclerview does not recycled!!! and Heap size grows swiftly!!
Update:
RecyclerView layout manager is StaggeredLayoutManager
fragment_profile.xml:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<android.support.design.widget.AppBarLayout
android:id="#+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/ThemeOverlay.AppCompat.Dark.ActionBar" >
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="#+id/profileSwipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<!-- RecyclerView and NestedScrollView -->
<include layout="#layout/fragment_profile_details" />
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.design.widget.CoordinatorLayout>
fragment_profile_details.xml:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/rootLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:orientation="vertical" >
<android.support.v4.widget.NestedScrollView
android:id="#+id/nested_scrollbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:fillViewport="true"
android:scrollbars="none" >
<LinearLayout
android:id="#+id/nested_scrollbar_linear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
android:orientation="vertical" >
<android.support.v7.widget.CardView
android:id="#+id/profileCardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="#color/card_backgroind"
app:cardCornerRadius="0dp"
app:cardElevation="0dp" >
<!-- Profile related stuff like avatar and etc. --->
</android.support.v7.widget.CardView>
<android.support.v7.widget.RecyclerView
android:id="#+id/list_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="#dimen/four"
android:layout_marginEnd="#dimen/four"
android:layout_marginLeft="#dimen/four"
android:layout_marginRight="#dimen/four"
android:layout_marginStart="#dimen/four"
android:layout_marginTop="#dimen/four"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:clipToPadding="false" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>
ProfileFragment.java:
mAdapter = new MainAdapter(getActivity(), glide, Data);
listView = (RecyclerView) view.findViewById(R.id.list_view);
ViewCompat.setNestedScrollingEnabled(listView, false);
listView.setAdapter(mAdapter);
mStaggeredLM = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
mStaggeredLM.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS);
listView.setLayoutManager(mStaggeredLM);
mScroll.setOnScrollChangeListener(new OnScrollChangeListener() {
#Override
public void onScrollChange(NestedScrollView arg0, int arg1, int arg2, int arg3, int arg4) {
View view = (View) mScroll.getChildAt(mScroll.getChildCount() - 1);
int diff = (view.getBottom() - ( mScroll.getHeight() + mScroll.getScrollY()));
if(diff == 0){
int visibleItemCount = mStaggeredLM.getChildCount();
int totalItemCount = mStaggeredLM.getItemCount();
int[] lastVisibleItemPositions = mStaggeredLM.findLastVisibleItemPositions(null);
int lastVisibleItemPos = getLastVisibleItem(lastVisibleItemPositions);
Log.e("getChildCount", String.valueOf(visibleItemCount));
Log.e("getItemCount", String.valueOf(totalItemCount));
Log.e("lastVisibleItemPos", String.valueOf(lastVisibleItemPos));
if ((visibleItemCount + 5) >= totalItemCount) {
mLoadMore.setVisibility(View.VISIBLE);
Log.e("LOG", "Last Item Reached!");
}
mMore = true;
mFresh = false;
mRefresh = false;
getPosts();
}
}
});
P.s : I've set load more to scroll view, because recyclerview do it continuously and none stoppable!
Any help is appreciated
This is because we have a recycler view which has scroll behaviour inside a scroll view. (scroll inside a scroll)
I think the best way to resolve this issue is to your profileCardview as a header in your recycler view and then remove the nested scroll view.
If it were a listview then it was as simple as listView.addHeaderView(profileCardView) but for the Recycler view there is no addheadview equivalent. Hence you could refer the below link to change your implementation.
Is there an addHeaderView equivalent for RecyclerView?
For a RecyclerView or ListView the height should be constant, because if it will not a constant size then how it will manage the maximum number of visible rows in memory. Try by changing RecyclerView attribute android:layout_height="match_parent" or a fixed height(e.g. "300dp" - as needed), instead of "wrap_content". It should improve your memory management.
I have a FrameLayout at top
and ViewPager at bottom
FrameLayout has PagerTabStrips
ViewPager has ScrollView in it.
What I am trying to achieve is that on the scroll of ViewPager's ScrollView, I want to translate Y position of ViewPager and FrameLayout together in sync smoothly.
And at some point I have to fix the position of FrameLayout and stop its further scrolling to top.
Below is my xml code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.example"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:id="#+id/parentRelativeLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/black"
android:clickable="true"
android:clipToPadding="false"
android:fitsSystemWindows="true" >
<FrameLayout
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.sticky.pager.PagerSlidingTabStrip
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dip"
android:layout_gravity="bottom"
android:layout_marginTop="2dp" />
</FrameLayout>
<android.support.v4.view.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/header"
android:background="#color/blue" />
</RelativeLayout>
How can I achieve this programmatically:
#Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount, int pagePosition) {
float scrollY=getScrollY(view);
mViewPager.setTranslationY(-scrollY);
mHeader.setTranslationY(-scrollY);
//What to write here??? This does not work
You should change the top and bottom of that view instead of moving it. You can synchronize the scroll via the scroll offset
override fun onScrollChange(v: NestedScrollView?, scrollX: Int, scrollY: Int, oldScrollX: Int, oldScrollY: Int) {
view.bottom = valueBottomTranslate.toInt()
view.top = valueTopTranslate.toInt()
}
I have an Android app whose structure is:
A tabbar (bottom of the screen).
Each tab has a toolbar (just below the Action bar).
One of the Fragments has a GridView and I want to hide the ActionBar when the user scroll the grid. This is working ok, but during the hide antimation the Tabbar instead of stay fixed at the bottom of the screen, it makes some kind of bounce.
These are the XML.
The tabbar activity.
< android.support.v4.app.FragmentTabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent">
< RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
< FrameLayout
android:id="#android:id/tabcontent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
< TabWidget
android:id="#android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="-5dp"
android:paddingTop="5dp"
android:background="#color/white"/>
< /RelativeLayout>
< /android.support.v4.app.FragmentTabHost>
Each tab fragment XML:
< android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" / >
Each fragment has its own XML, but the one that I want to ask for is this. It's just a fragment with a GridView.
< FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<GridView
android:id="#+id/fragment_grid_id"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="2"
android:verticalSpacing="5dp"
android:horizontalSpacing="5dp"
android:stretchMode="columnWidth"
android:gravity="center"
android:paddingBottom="50dp" />
< /FrameLayout>
Inside this fragment I added a OnScrollListener to this GridView:
gridView = (GridView)fragment.findViewById(R.id.fragment_grid_id);
gridAdapter = new MyGridAdapter(getActivity(), myItems);
gridView.setAdapter(gridAdapter);
gridView.setOnItemClickListener(this);
gridView.setOnScrollListener(this);
And the listener methods are these:
#Override
public void onScrollStateChanged(final AbsListView view, final int scrollState) {
}
#Override
public void onScroll(final AbsListView view, final int firstVisibleItem, final int visibleItemCount, final int totalItemCount) {
int currentFirstVisPos = view.getFirstVisiblePosition();
if(currentFirstVisPos > scrollPrevItem) {
((ActionBarActivity)myActivity).getSupportActionBar().hide();
}
else if(currentFirstVisPos < scrollPrevItem) {
((ActionBarActivity)myActivity).getSupportActionBar().show();
}
scrollPrevItem = currentFirstVisPos;
}
As I told, when the user scrolls down the actionbar hides but the tabbar makes some kind of bounce that is awfull.
Anyone could tell me how to fix the tabbar to the bottom during the hide animation?
Thank you very much!