Tôi đã recentrly thử một Toast tùy chỉnh sau khi hướng dẫn:Tạo một tùy chỉnh Toast fullscreen
http://developer.android.com/guide/topics/ui/notifiers/toasts.html#CustomToastView
với một diện như:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toast_layout_root"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="8dp"
android:background="#DAAA"
>
<ImageView android:src="@drawable/droid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
/>
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFF"
/>
</LinearLayout>
Nhưng dường như fill_parent trong cách bố trí gốc không có hiệu lực.
Bạn có ý tưởng về cách tôi có thể khắc phục điều này để nhận được bánh mì nướng toàn màn hình không?