0

expandablelistview を使用していくつかの機能を構築しました。expandablelistview の子レイアウトは

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="75dp" 
    android:paddingTop="23dp"
    android:paddingBottom="15dp"
    android:paddingLeft="44dp"
    android:paddingRight="44dp"
    android:orientation="horizontal" 
    android:gravity="center_vertical"
    android:background="@drawable/app_expandable_list_child_bg" >

    <Button
        android:id="@+id/app_download_cancel"
        android:layout_width="100dp"
        android:layout_height="37dp"
        android:background="@drawable/app_cancel_detail_button_bg"
        android:layout_weight="1"
        android:layout_marginRight="32dp"
        android:gravity="center"
        android:textColor="#454545"
        android:textSize="13sp"
        android:clickable="true"
        android:focusable="false"
        android:text="@string/app_cancel_downloading" />

    <Button
        android:id="@+id/app_more_info"
        android:layout_width="100dp"
        android:layout_height="37dp"
        android:background="@drawable/app_cancel_button_bg_normal"
        android:gravity="center"
        android:layout_weight="1"
        android:textColor="#454545"
        android:textSize="13sp"
        android:clickable="true"
        android:focusable="false"
        android:text= "@string/app_more_details"/>

</LinearLayout>

問題は、ボタンの背景が表示されなかったことです。

参照してください: 上記の子レイアウトのみを表示するテスト プロジェクトでテストしました。背景が表示されます。これは私が出会ったものです

4

1 に答える 1

0

9 パッチをパレット付きの PNG として保存すると、表示されないことに気付きました。TrueColor として保存し、違いがあるかどうかを確認します。

于 2012-10-19T16:00:43.987 に答える