0

action_bar.xml 레이아웃 파일을 만들었습니다. 어디에서 확장 목록 뷰와 2 개의 버튼을 구현해야합니까? 그림에서 볼 수 있듯이 문제는 전체 확장 가능한 목록 뷰가 actionBar Side에 표시된다는 것입니다. 내 레이아웃 파일은ActionBar의 Android 용 사용자 정의 레이아웃

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:gravity="fill_vertical" 
    android:orientation="horizontal" > 

    <Button 
     android:id="@+id/button3" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentRight="true" 
     android:layout_alignParentTop="true" 
     android:text="Button" /> 

    <Button 
     android:id="@+id/button2" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     android:layout_centerHorizontal="true" 
     android:text="Button" /> 

    <ExpandableListView 
     android:id="@+id/expandableListView1" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentLeft="true" 
     android:layout_alignParentTop="true" > 
    </ExpandableListView> 

</RelativeLayout> 

나는 complee 화면을 통해 expandible 목록보기를 보여주고 싶어요.

답변

0

ExpandableListView은 ActionBar 크기로 팽창되어 표시되는 작업 표시 줄 사용자 정의 레이아웃의 일부이기 때문에 ActionBar에 표시됩니다.

대신 단추 중 하나에 대한 클릭 수신기를 설정 한 다음 Listview를 popup control.

으로 표시 할 수 있습니다
관련 문제