0

ExpandableListView でグループと子アイテムのテキストビューのスタイルを変更したいのですが、うまくいきません。

アダプターの作成では、最初のテキスト ビューは (lblListHeader ) になり、2 番目は (lblListItem ) になります。

mAdapter = new HadithExpandableListAdapter(mGroupsCursor, this,
                R.layout.drawer_list_ahadith, R.layout.drawer_list_ahadith,
                new String[] { "ChapterName" },
                new int[] { R.id.lblListHeader }, new String[] { "HadithTitel" },
                new int[] { R.id.lblListItem });

レイアウトでは、これは2つのテキストビューを含むファイルです

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="55dip"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/lblListItem"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="17dip"
        android:paddingTop="5dp"
        android:paddingBottom="5dp"
        android:paddingLeft="?android:attr/expandableListPreferredChildPaddingLeft" />

     <TextView
        android:id="@+id/lblListHeader"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="17dip"
        android:paddingTop="5dp"
        android:paddingBottom="5dp"
        android:paddingLeft="?android:attr/expandableListPreferredChildPaddingLeft" />


</LinearLayout>
4

0 に答える 0