일반적으로 두 가지 활동간에 애니메이션을 확대/축소하는 코드가 있지만 다른 것을 원합니다. 첫 번째 버튼을 클릭하면 센터에서 확대/축소하는 대신 첫 번째 버튼의 위치에서만 확대가 시작됩니다. 도와주세요.android에서 애니메이션 확대/축소
편집 : 확대/축소 버튼을 중심으로 클릭해야합니다.
일반적으로 두 가지 활동간에 애니메이션을 확대/축소하는 코드가 있지만 다른 것을 원합니다. 첫 번째 버튼을 클릭하면 센터에서 확대/축소하는 대신 첫 번째 버튼의 위치에서만 확대가 시작됩니다. 도와주세요.android에서 애니메이션 확대/축소
편집 : 확대/축소 버튼을 중심으로 클릭해야합니다.
나는 당신이 생각
넣어 애니메이션 설명
목적 "에서"
당신은 아파치 2.0 라이선스에 따라
을 구글에서 제공하는 안드로이드 SDK 샘플 애니메이션을 사용하거나 참조 할 수 있습니다이있는 사용 전
당신이 할 수있는 것보다 쉽습니다 기반의 줌 배율 새 활동을 시작하기 위해 명령을 실행 한 후에이 방법을 사용하십시오.
startActivity(intent);
overridePendingTransition(animation_in_goes_here,animation_out_goes_here);
그런 다음 animation_in_goes_here
을 새로 시작한 활동에 필요한 애니메이션 리소스로 바꾸고 떠나는 활동의 애니메이션 리소스로 바꿔야합니다 (animation_out_goes_here
). 이것은 스위칭 효과를 줄 것입니다.
zoom_in.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true" >
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="3"
android:toYScale="3" >
</scale>
</set>
zoom_out.xml이 귀하의 질문에 대답하는 데 도움이
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true" >
<scale
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.5"
android:toYScale="0.5" >
</scale>
</set>
희망.
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromXScale="0"
android:fromYScale="0"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.5"
android:toYScale="0.5">
</scale>
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:fromXScale="2.1"
android:fromYScale="2.1"
android:pivotX="50%"
android:pivotY="50%"
android:startOffset="3000"
android:toXScale="0"
android:toYScale="0">
</scale>
create zoom.xml 축소 및 확대를 위해 사용됩니다 – bhoomika
귀하의 질문은 매우 명확하고 당신이 당신의 애니메이션이 제대로 작동되지 않는 것입니다, 레이아웃의 중심에서 확대하려는 또는되지 않는 이유는 무엇입니까? – kabuto178
버튼을 클릭하면 확장되고 다음 활동이 시작됩니다. – jagdish
새로운 활동을 시작하고 싶지 않으십니까? – kabuto178