1

アプリケーションでスライド メニューを使用しています

ここに画像の説明を入力

設定アイコンをクリックすると、次の結果が表示されます

ここに画像の説明を入力

最初のレイアウトのコンテンツは折り返しています。代わりに、ビューのその部分を非表示にしたい

XML ファイル

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/menu_bg"
tools:context=".PrincipalActivity" >

<include layout="@layout/actionbar_menu" android:id="@+id/actionBarMenu"/>
 //listview for displaying menu
<ListView
    android:id="@+id/listMenu"
    android:layout_below="@+id/actionBarMenu"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:divider="#282828"
    android:dividerHeight="1dip"
    android:background="#3F3F3F"
    android:fadingEdge="none"
    android:listSelector="@drawable/list_selector">

</ListView>

 //this is main layout which is visible first time when application starts
<RelativeLayout
    android:id="@+id/layoutToMove"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/actionBar"
    android:background="#282828">

    <include layout="@layout/actionbar_layout" android:id="@+id/actionBar"/>

    <ImageButton
        android:id="@+id/menuButton"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignBottom="@+id/actionBar"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:onClick="openCloseMenu"
        android:src="@drawable/menu"
        android:background="@android:color/transparent" />
     <TextView android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="asdkjasdksajdkasjdkasjdkasdddddddddddddddddddddddddddddd"
        android:textColor="#fff"
        android:layout_centerVertical="true"/>
    <Button
        android:id="@+id/separator"
        android:layout_width="1dp"
        android:layout_height="50dp"
        android:layout_toRightOf="@+id/menuButton"
        android:background="@drawable/custom_button_black" />

</RelativeLayout>

どんな種類の助けも大歓迎です

4

1 に答える 1

0

jfeinstein10 のSlidingMenuの使用を検討する必要があります。非常に優れており、Foursquare Rdio、Falcon Pro などの多くの人気のある Android アプリで広く使用されています。

于 2013-03-07T22:52:59.883 に答える