|
|
@@ -78,8 +78,6 @@ public class ActMain extends BaseCompatActivity{
|
|
|
|
|
|
@BindView(R.id.other_container)
|
|
|
LinearLayout other_container;
|
|
|
- @BindView(R.id.layout_bottom)
|
|
|
- RelativeLayout mLayoutBottom;
|
|
|
|
|
|
public final static String INTEN_GAME_ID = "INTEN_GAME_ID";
|
|
|
|
|
|
@@ -110,7 +108,6 @@ public class ActMain extends BaseCompatActivity{
|
|
|
mDownloadTaskService.restoreDownloadTaskStatus();
|
|
|
|
|
|
initLinsener();
|
|
|
- initAnimation();
|
|
|
}
|
|
|
|
|
|
private void initLinsener() {
|
|
|
@@ -394,71 +391,4 @@ public class ActMain extends BaseCompatActivity{
|
|
|
return backStr;
|
|
|
}
|
|
|
|
|
|
- private Animation animationShow;
|
|
|
- private Animation animationHide;
|
|
|
-
|
|
|
- private void initAnimation() {
|
|
|
- if(mLayoutBottom == null){
|
|
|
- mLayoutBottom = findViewByIdT(R.id.layout_bottom);
|
|
|
- if(BuildConfig.DEBUG) G.showToast("怎么会是空呢?");
|
|
|
- }
|
|
|
- animationShow = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f,
|
|
|
- Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 1f,
|
|
|
- Animation.RELATIVE_TO_SELF, 0f);
|
|
|
- animationShow.setDuration(600);
|
|
|
- animationShow.setAnimationListener(new Animation.AnimationListener() {
|
|
|
- @Override
|
|
|
- public void onAnimationStart(Animation animation) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onAnimationEnd(Animation animation) {
|
|
|
- mLayoutBottom.clearAnimation();
|
|
|
- mLayoutBottom.setVisibility(View.VISIBLE);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onAnimationRepeat(Animation animation) {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- animationHide = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f,
|
|
|
- Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF, 0f,
|
|
|
- Animation.RELATIVE_TO_SELF, 1f);
|
|
|
- animationHide.setDuration(600);
|
|
|
- animationHide.setAnimationListener(new Animation.AnimationListener() {
|
|
|
- @Override
|
|
|
- public void onAnimationStart(Animation animation) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onAnimationEnd(Animation animation) {
|
|
|
- mLayoutBottom.clearAnimation();
|
|
|
- if (tabsHelper.getCurrentItem() == MainTab.FgtMainGame.getPosition()) {
|
|
|
- mLayoutBottom.setVisibility(View.GONE);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onAnimationRepeat(Animation animation) {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 显示或者隐藏底部
|
|
|
- *
|
|
|
- * @param isShow
|
|
|
- */
|
|
|
- public void showOrHideBottom(boolean isShow) {
|
|
|
- if (isShow) {
|
|
|
- mLayoutBottom.startAnimation(animationShow);
|
|
|
- return;
|
|
|
- }
|
|
|
- mLayoutBottom.startAnimation(animationHide);
|
|
|
- }
|
|
|
}
|