MapFragment を含むビューがあります
私のmainViewPanelは次のようになります
<LinearLayout
android:id="@+id/main_view_panel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="horizontal">
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
class="com.google.android.gms.maps.SupportMapFragment"
map:cameraTargetLat="40.72"
map:cameraTargetLng="-74.00"
map:cameraZoom="8"/>
</LinearLayout>
私の翻訳コードは次のようになります
TranslateAnimation anim = new TranslateAnimation(0, 500, 0, 0);
anim.setFillAfter(true);
anim.setDuration(250);
mainViewPanel.startAnimation(anim);
ビューの残りの部分はアニメーション化されますが、マップはそのままです。メイン ビュー ウィンドウが移動しているようで、マップの右側にさらに多くのものが表示されますが、マップ自体は視覚的に移動していません。アニメーションは、TextView などの他のビューでも問題なく機能します。