java - 如何在android中制作覆盖窗口?

标签 java android

我正在尝试制作一个警报对话框,如图所示。我尝试使用框架布局,但无法使其像图片一样正确。在我当前的布局中,我使用了 imageView 和 textview。 enter image description here

<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>

最佳答案

您可能需要查看Crouton library :

enter image description here enter image description here

关于java - 如何在android中制作覆盖窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19812895/

相关文章:

Java 确保类已解析

java - 如何在 JFreeChart 折线图中显示数据库值

android - 如何在 Android 2.3(Gingerbread) 中录制 mp4/m4a 格式的音频?

java - MapFragment - 应用程序可能在其主线程上做了太多工作

android - 互联网连接检查线程 Android

java - 为什么我的 Java 9 模块服务没有注册其实现?

java - Eclipse Virgo 与 Apache Servicemix 对比

java - 不将值输入到数组中,即使它进入 if 循环

java - 获取不同的加密 key 会导致 Android 使用相同的密码

android - android MediaRecorder 的 IllegalStateException