/**
* Show the instruction list and hide the sound button.
* <p>
* This is based on orientation so the different layouts (for portrait vs. landscape)
* can be animated appropriately.
*/
public void showInstructionList() {
int orientation = getContext().getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
ConstraintSet expanded = new ConstraintSet();
expanded.clone(getContext(), R.layout.instruction_layout_alt);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
TransitionManager.beginDelayedTransition(InstructionView.this);
}
expanded.applyTo(instructionLayout);
instructionListLayout.setVisibility(VISIBLE);
} else {
Animation slideDown = AnimationUtils.loadAnimation(getContext(), R.anim.slide_down_top);
slideDown.setInterpolator(new DecelerateInterpolator());
instructionListLayout.setVisibility(VISIBLE);
instructionListLayout.startAnimation(slideDown);
}
}
InstructionView.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:mapbox-navigation-android
作者:
评论列表
文章目录