我想在操作栏中添加图标,在此布局中
我有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>