InstructionView.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:mapbox-navigation-android 作者:
/**
 * Hide the instruction list and show the sound button.
 * <p>
 * This is based on orientation so the different layouts (for portrait vs. landscape)
 * can be animated appropriately.
 */
public void hideInstructionList() {
  int orientation = getContext().getResources().getConfiguration().orientation;
  if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
    ConstraintSet collapsed = new ConstraintSet();
    collapsed.clone(getContext(), R.layout.instruction_layout);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      TransitionManager.beginDelayedTransition(InstructionView.this);
    }
    collapsed.applyTo(instructionLayout);
    instructionListLayout.setVisibility(INVISIBLE);
  } else {
    Animation slideUp = AnimationUtils.loadAnimation(getContext(), R.anim.slide_up_top);
    slideUp.setInterpolator(new AccelerateInterpolator());
    instructionListLayout.startAnimation(slideUp);
    instructionListLayout.setVisibility(INVISIBLE);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号