2013-03-07 2 views
1

Я использую скользящее меню в моем приложенииИзменение размера представления в андроида

enter image description here

После нажатия на иконку настройки захожу следующий результат

enter image description here

Содержание в сначала макет обертывания, вместо этого я хочу скрыть эту часть обзора

Xml file

<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> 

Любой вид помощи будет весьма признателен

ответ

0

Вы должны рассмотреть возможность использования jfeinstein10-х SlidingMenu. Это неплохо и широко используется многими популярными приложениями для Android, такими как Foursquare Rdio, Falcon Pro, и т. Д.

Смежные вопросы