0

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

我有 2 个布局,第一个包含 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>
4

1 回答 1

0

你可以试试ActionBarSherlock。它更简单。

于 2013-11-06T12:16:13.690 回答