私は以下を含む全画面のRelativeLayoutを持っています: 1. FrameLayout、フルスクリーン、内容を表示します。 2. LinearLayoutは、コントロールメニューとして機能し、コンテンツ#1の上に留まり、要求に応じてスライドまたはフェードイン/アウトできる必要があります(実際には2つあります。ボトム)。削除するにはTranslateAnimationの後に場所をクリックしますか?
メニュー表示が正しく表示され、メニューボタンが押されたときにメニューコントローラがスライド/フェードイン/フェードアウトします。しかし、スライドしてビューをフェードアウトすると、クリックアクションが残ります。このアクションを削除するにはどうすればよいですか?
私はmenuLayout.setVisibility(View.GONE)を呼び出そうとしました。行動は残っている。
私はTranslateAnimationでいくつかの問題を読んでいますが、動作させることはできません。 誰かが私にこれをどのように修正するのか教えてもらえますか?例が分かるだろう。
XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000"
android:layout_alignParentLeft="true"
android:gravity="center_vertical"
android:id="@+id/contentFrame"
>
<ViewSwitcher
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/viewSwitch">
<include layout="@layout/main_car" />
</ViewSwitcher>
</FrameLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="43dp"
android:background="@drawable/um_top_bar"
android:layout_alignParentTop="true"
android:id="@+id/topMenu"
android:gravity="top"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/um_btn_home"
android:id="@+id/homeMainBtn" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/exp_menu_btn"
android:id="@+id/menuMainBtn" />
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FF000000"
android:layout_alignParentBottom="true"
android:id="@+id/bottomMenu"
android:gravity="top"
>
<include layout="@layout/menu_bottom" />
</LinearLayout>