[英]Nine-patch bitmap does not show up
我使用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>
麻烦的是按钮的背景无法显示。
请参阅:我在一个仅显示上面子布局的测试项目中进行了测试。 显示了背景。 这就是我遇到的
我注意到,如果您将9色块另存为带有调色板的PNG,则不会显示。 另存为TrueColor,看看是否有所不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.