안녕하세요?
 
현재 버튼 5개를 framelayout에 중앙 정렬 한 후에
 
액티비티 실행시 4개의 버튼을 TranslateAnimation 효과를 주어
 
좌/우/상/하로 이동하려고 합니다.
 
버튼의 크기는 모두 동일하고, 버튼의 넓이만큼 이동하려고 합니다.
 
그런데 아래처럼 구현했는 데, 버튼의 넓이만큼 이동하지 않네요.
 
다른 방법이 없을 까 싶어 도움 요청드립니다.
 
즐거운 하루 보내세요~^^
 
     int centerWidth = centerMenuBtn.getWidth();
     int centerHeight = centerMenuBtn.getHeight();
 
     TranslateAnimation topTranslate=new TranslateAnimation(0,0,0,-centerHeight);
     topTranslate.setDuration(1000);
     topTranslate.setFillAfter(true);
     topMenuBtn.startAnimation(topTranslate);