나는 활동을 통해 안드로이드의 상대적 레이아웃을 아래로 슬라이드하고자합니다. 나는이 레이아웃 아래로 슬라이드 다음과 같은 기능 :android에서 ViewGroup을 참조하십시오.
public void setLayoutAnim_slidedown(ViewGroup panel, Context ctx) {
AnimationSet set = new AnimationSet(true);
Animation animation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF,
0.0f, Animation.RELATIVE_TO_SELF, -1.0f,
Animation.RELATIVE_TO_SELF, 0.0f);
animation.setDuration(800);
animation.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
// MapContacts.this.mapviewgroup.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
@Override
public void onAnimationEnd(Animation animation) {
// TODO Auto-generated method stub
}
});
set.addAnimation(animation);
LayoutAnimationController controller = new LayoutAnimationController(
set, 0.25f);
panel.setLayoutAnimation(controller);
}
첫 번째 줄에 매개 변수를 참조로이 유형의 뷰 그룹 ..My 질문입니다 인 내가보기 그룹을 참조 할 수있는 방법을 ...
참고 다음을 시도했습니다.
LayoutInflater inflater = (LayoutInflater) myContext
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.childView, null);
그러나이 경우보기가 아닌 그룹보기가 반환됩니다!
는 뷰 그룹으로 뷰 그룹에 항상 배역보기 슈퍼 클래스 수를 당신. –
또 다른 질문 ... 함수를 호출하는 것보다 더 많은 일을해야합니까 .. 애니메이션이 이런 식으로 시작하지 않기 때문에 .. 누락 된 것이 있습니까? – Developer