Android 带有ExpandableListView的操作栏

Android 带有ExpandableListView的操作栏,android,android-layout,Android,Android Layout,我想在这个布局中的操作栏上添加图标 我有两个布局,第一个包含ExpandableListView,第二个包含细节片段, 我怎么能做那样的事 这是主要的活动 <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="matc

我想在这个布局中的操作栏上添加图标

我有两个布局,第一个包含ExpandableListView,第二个包含细节片段, 我怎么能做那样的事

这是主要的活动

<android.support.v4.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
   <FrameLayout
        android:id="@+id/content_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
    <ExpandableListView
        android:id="@+id/left_drawer"        
         android:layout_width="240dp"
        android:layout_height="match_parent"
        android:choiceMode="singleChoice"
        android:cacheColorHint="#00000000"
       android:childDivider="@drawable/child_separator"
        android:dividerHeight="0dp" 
        android:layout_gravity="right"
      />
</android.support.v4.widget.DrawerLayout>

细节片段

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainLyt"
android:layout_width="fill_parent"
android:layout_height="fill_parent">


<TextView xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/detailsText"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal|center_vertical"
        android:layout_marginTop="20dip"
        android:text="Defaulyyyyyyyyt Text"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:textSize="30dip" />

<LinearLayout 
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:id="@+id/bottomBar"
    android:orientation="horizontal"
    android:background="?android:attr/dividerVertical"
    android:layout_alignParentBottom="true">
    <Button
        android:id="@+id/botton_matn"
        android:background="?android:attr/selectableItemBackground"
        android:text="المتون"
        android:layout_gravity="center"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"

        />
    <Button
        android:id="@+id/botton_rawe"
        android:background="?android:attr/selectableItemBackground"
        android:text="الراوي"
        android:layout_gravity="center"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"

        />   
</LinearLayout>

</RelativeLayout>

您可以尝试使用。它更简单