Skip to content

Commit

Permalink
HotBitmapGG
Browse files Browse the repository at this point in the history
修复了一个issues,界面共享元素动画的问题,
目前发现Fragment使用共享元素动画只能在Api23上正常.自己的N6可以,使用模拟器5.0和5.1就有问题,这个我在慢慢优化下.
  • Loading branch information
HotBitmapGG committed Jul 28, 2016
1 parent 6177713 commit ebe2f7e
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,6 @@ public void onPageSelected(int position)
mToolbar.setTitle(doubanMeizis.get(position).getTitle());
currenIndex = position;
url = doubanMeizis.get(currenIndex).getUrl();

//切换ViewPager时隐藏ToolBar
ImmersiveUtil.enter(DoubanMeiziPageActivity.this);
mAppBarLayout.animate()
.translationY(-mAppBarLayout.getHeight())
.setInterpolator(new DecelerateInterpolator(2))
.start();
isHide = true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public void onItemClick(int position, AbsRecyclerViewAdapter.ClickableViewHolder
{

Intent intent = DoubanMeiziPageActivity.luanch(getActivity(), position, type);
if (Build.VERSION.SDK_INT >= 21)
if (Build.VERSION.SDK_INT >= 22)
{
startActivity(intent,
ActivityOptions.makeSceneTransitionAnimation(getActivity(),
Expand Down Expand Up @@ -332,7 +332,6 @@ public boolean onPreDraw()
});
}

LogUtil.all("onResume" + " index " + imageIndex);
}

private void setRecycleScrollBug()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public void onItemClick(int position, AbsRecyclerViewAdapter.ClickableViewHolder
{

Intent intent = GankMeiziPageActivity.luanch(getActivity(), position);
if (Build.VERSION.SDK_INT >= 21)
if (Build.VERSION.SDK_INT >= 22)
{
startActivity(intent,
ActivityOptions.makeSceneTransitionAnimation(getActivity(),
Expand Down Expand Up @@ -366,8 +366,6 @@ public boolean onPreDraw()
}
});
}

LogUtil.all("onResume" + " index " + imageIndex);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import com.hotbitmapgg.moequest.R;
import com.hotbitmapgg.moequest.base.RxBaseActivity;
import com.hotbitmapgg.moequest.model.gank.GankMeizi;
import com.hotbitmapgg.moequest.rx.RxBus;
import com.hotbitmapgg.moequest.module.commonality.MeiziDetailsFragment;
import com.hotbitmapgg.moequest.rx.RxBus;
import com.hotbitmapgg.moequest.utils.ConstantUtil;
import com.hotbitmapgg.moequest.utils.GlideDownloadImageUtil;
import com.hotbitmapgg.moequest.utils.ImmersiveUtil;
Expand Down Expand Up @@ -84,7 +84,6 @@ public int getLayoutId()
@Override
public void initViews(Bundle savedInstanceState)
{

Intent intent = getIntent();
if (intent != null)
{
Expand Down Expand Up @@ -114,14 +113,6 @@ public void onPageSelected(int position)
mToolbar.setTitle(gankMeizis.get(position).getDesc());
currenIndex = position;
url = gankMeizis.get(currenIndex).getUrl();

//切换ViewPager时隐藏ToolBar
ImmersiveUtil.enter(GankMeiziPageActivity.this);
mAppBarLayout.animate()
.translationY(-mAppBarLayout.getHeight())
.setInterpolator(new DecelerateInterpolator(2))
.start();
isHide = true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ public void onPageSelected(int position)
mToolbar.setTitle(meizis.get(position).getTitle());
currenIndex = position;
url = meizis.get(currenIndex).getImageurl();

//切换ViewPager时隐藏ToolBar
ImmersiveUtil.enter(MeiziTuPageActivity.this);
mAppBarLayout.animate()
.translationY(-mAppBarLayout.getHeight())
.setInterpolator(new DecelerateInterpolator(2))
.start();
isHide = true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void onItemClick(int position, AbsRecyclerViewAdapter.ClickableViewHolder
{

Intent intent = MeiziTuPageActivity.luanch(getActivity(), position, type);
if (Build.VERSION.SDK_INT >= 21)
if (Build.VERSION.SDK_INT >= 22)
{
startActivity(intent,
ActivityOptions.makeSceneTransitionAnimation(getActivity(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void onItemClick(int position, AbsRecyclerViewAdapter.ClickableViewHolder
{

Intent intent = MeiziTuPageActivity.luanch(getActivity(), position, type);
if (Build.VERSION.SDK_INT >= 21)
if (Build.VERSION.SDK_INT >= 22)
{
startActivity(intent,
ActivityOptions.makeSceneTransitionAnimation(getActivity(),
Expand Down

0 comments on commit ebe2f7e

Please sign in to comment.