开发者

Do all widgets in an Android layout file require layout_width and layout_height?

开发者 https://www.devze.com 2022-12-24 23:22 出处:网络
I have a ListView composed of LinearLayouts. Inside each is an ImageView, TextView and another ImageView laid out horizontally:

I have a ListView composed of LinearLayouts. Inside each is an ImageView, TextView and another ImageView laid out horizontally:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    >
            <ImageButton
                android:id="@+id/thumbnail"
                android:background="@color/white"
                android:paddingTop="10dip"
                android:paddingLeft="8dip"
                android:paddingBottom="10dip"
                />
            <TextView
                android:id="@+id/title"
                android:background="@color/开发者_运维知识库white"
                android:textColor="@color/bntext"
                android:paddingTop="10dip"
                android:paddingLeft="8dip"
                />
            <ImageButton
                android:src="@drawable/green_arrow_small"
                android:background="@color/white"
                />
</LinearLayout>


Yes. This should be crashing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号