Minor fixes in profiles
This commit is contained in:
parent
6406d25938
commit
ff5e281db7
2 changed files with 14 additions and 1 deletions
|
@ -402,6 +402,8 @@ public class ProfileFragment extends LoaderFragment implements ScrollableToTop,
|
||||||
timelineFragment.onRefresh();
|
timelineFragment.onRefresh();
|
||||||
if(featuredFragment.loaded)
|
if(featuredFragment.loaded)
|
||||||
featuredFragment.onRefresh();
|
featuredFragment.onRefresh();
|
||||||
|
if(savedFragment!=null && savedFragment.loaded)
|
||||||
|
savedFragment.onRefresh();
|
||||||
}
|
}
|
||||||
V.setVisibilityAnimated(fab, View.VISIBLE);
|
V.setVisibilityAnimated(fab, View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
@ -545,6 +547,8 @@ public class ProfileFragment extends LoaderFragment implements ScrollableToTop,
|
||||||
if(timelineFragment!=null && timelineFragment.isAdded() && childInsets!=null){
|
if(timelineFragment!=null && timelineFragment.isAdded() && childInsets!=null){
|
||||||
timelineFragment.onApplyWindowInsets(childInsets);
|
timelineFragment.onApplyWindowInsets(childInsets);
|
||||||
featuredFragment.onApplyWindowInsets(childInsets);
|
featuredFragment.onApplyWindowInsets(childInsets);
|
||||||
|
if(savedFragment!=null)
|
||||||
|
savedFragment.onApplyWindowInsets(childInsets);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,6 +677,7 @@ public class ProfileFragment extends LoaderFragment implements ScrollableToTop,
|
||||||
if(onScrollListener!=null){
|
if(onScrollListener!=null){
|
||||||
onScrollListener.setViews(getToolbar());
|
onScrollListener.setViews(getToolbar());
|
||||||
}
|
}
|
||||||
|
getToolbar().setTranslationZ(tabBarIsAtTop ? 0 : V.dp(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
private CharSequence makeRedString(CharSequence s){
|
private CharSequence makeRedString(CharSequence s){
|
||||||
|
@ -924,6 +929,9 @@ public class ProfileFragment extends LoaderFragment implements ScrollableToTop,
|
||||||
editSaveMenuItem.setVisible(!buttonInView);
|
editSaveMenuItem.setVisible(!buttonInView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if((scrollY==0 && oldScrollY!=0) || (scrollY!=0 && oldScrollY==0)){
|
||||||
|
refreshLayout.setEnabled(scrollY==0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Fragment getFragmentForPage(int page){
|
private Fragment getFragmentForPage(int page){
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.joinmastodon.android.fragments;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
import android.widget.HorizontalScrollView;
|
import android.widget.HorizontalScrollView;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
@ -122,8 +123,12 @@ public class SavedPostsTimelineFragment extends StatusListFragment{
|
||||||
ImageView icon=banner.findViewById(R.id.icon);
|
ImageView icon=banner.findViewById(R.id.icon);
|
||||||
icon.setImageResource(R.drawable.ic_lock_24px);
|
icon.setImageResource(R.drawable.ic_lock_24px);
|
||||||
|
|
||||||
|
// Prevents margins messing up things
|
||||||
|
FrameLayout bannerW=new FrameLayout(getActivity());
|
||||||
|
bannerW.addView(banner);
|
||||||
|
|
||||||
MergeRecyclerAdapter mergeAdapter=new MergeRecyclerAdapter();
|
MergeRecyclerAdapter mergeAdapter=new MergeRecyclerAdapter();
|
||||||
mergeAdapter.addAdapter(new SingleViewRecyclerAdapter(banner));
|
mergeAdapter.addAdapter(new SingleViewRecyclerAdapter(bannerW));
|
||||||
mergeAdapter.addAdapter(new SingleViewRecyclerAdapter(filtersBar));
|
mergeAdapter.addAdapter(new SingleViewRecyclerAdapter(filtersBar));
|
||||||
mergeAdapter.addAdapter(super.getAdapter());
|
mergeAdapter.addAdapter(super.getAdapter());
|
||||||
return mergeAdapter;
|
return mergeAdapter;
|
||||||
|
|
Loading…
Add table
Reference in a new issue