【发布时间】:2013-11-06 21:32:38
【问题描述】:
我正在尝试制作一个如图所示的警报对话框。我试图使用框架布局,但不能让它像图片一样正确。在我当前的布局中,我使用了 imageView 和 textview。
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src=""/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@strings/text"
/>
</FrameLayout>
<!---<other layouts--->
</LinearLayout>
【问题讨论】:
-
代码中的哪个布局代表错误?
-
@Demand 我试图让它覆盖到另一个活动。像自定义对话框或像图片一样平滑。
-
您可以使用带有自定义布局的 Toast..
-
@bakriOnFire 你帮了我很多。带有自定义布局的 Toast 成功了 :)