viewflipper에서 다른 레이아웃으로 넘기기위한 샘플 애플리케이션을 만들었습니다. (그냥 집처럼 화면에 드래그하면Android 홈 화면 설정시 효과 깜박임 문제가 발생했습니다. child.setvisibility (View.Visible)
XML은 의사 코드 위 (의사 코드)
<ViewFlipper>
<LinearLayout><TextView text:"this is the first page" /></LinearLayout>
<LinearLayout><TextView text:"this is the second page" /></LinearLayout>
<LinearLayout><TextView text:"this is the third page" /></LinearLayout>
</ViewFlipper>
그리고 자바 코드에서,
public boolean onTouchEvent(MotionEvent event)
case MotionEvent.ACTION_DOWN {
oldTouchValue = event.getX()
} case MotionEvent.ACTION_UP {
//depending on Direction, do viewFlipper.showPrevious or viewFlipper.showNext
//after setting appropriate animations with appropriate start/end locations
} case MotionEvent.ACTION_MOVE {
//Depending on the direction
nextScreen.setVisibility(View.Visible)
nextScreen.layout(l, t, r, b) // l computed appropriately
CurrentScreen.layout(l2, t2, r2, b2) // l2 computed appropriately
}
기본적 것은 물론 viewflipper 안쪽은 LinearLayouts 이동 작품 화면).
문제는 nextScreen.setVisibility (View.VISIBLE)입니다. 다음 화면이 보이도록 설정되면 해당 위치로 이동하기 전에 화면에서 깜박입니다. (0 위치에서 볼 수 있습니다.)
화면에서 깜박이지 않고 다음 화면을로드 할 수 있습니까? 나는 화면 밖으로 로딩 (가시화)되어 깜박 거리지 않도록하고 싶다.
시간을내어 도와 주셔서 감사합니다.