cuốn sách gpt4 ai đã làm

android - android :width and android:layout_width之间的区别

In lại Tác giả: Taklimakan Thời gian cập nhật: 2023-11-01 21:38:23 31 4
mua khóa gpt4 Nike

Trong đoạn mã bên dưới, tại sao khi tôi đặtnút radioSự xuất hiện của

 android:layout_width="fill_parent"

 android:width="fill_parent"

Điều tôi đang nói đến là id là bên trái Nút _radio



android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >


android:id="@+id/orientation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="ngang"
android:padding="5px" >


android:id="@+id/horizontal"
android:text="ngang" />


android:id="@+id/vertical"
android:text="vertical" />



android:id="@+id/trọng lực"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="dọc"
android: đệm = "5px"

>


android:id="@+id/left"
android:văn bản="trái"
android:layout_width="fill_parent" // Tôi đang nói về dòng này
/>


android:id="@+id/center"
android:text="center" />


android:id="@+id/right"
android:text="right" />

câu trả lời hay nhất

android: chiều rộngĐược sử dụng để đặt số pixel chính xác.

android:layout_widthCó thể là một thứ nguyên như đã đề cập ở trên hoặc có thể là điền_parent,match_parent hoặc bọc_content một.

android: chiều rộng Sử dụng một cái gì đó không phải là kích thước là một sai lầm.

Về android - sự khác biệt giữa android :width và android:layout_width, chúng tôi đã tìm thấy một câu hỏi tương tự trên Stack Overflow: https://stackoverflow.com/questions/11181971/

31 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress