Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/190.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在任何应用程序屏幕上创建cutom对话框_Android_Android Layout_Android Intent_Android Fragments - Fatal编程技术网

Android 在任何应用程序屏幕上创建cutom对话框

Android 在任何应用程序屏幕上创建cutom对话框,android,android-layout,android-intent,android-fragments,Android,Android Layout,Android Intent,Android Fragments,我只想让它出现在任何应用程序屏幕上的对话框。我可以创建这样的对话框。意味着对话框的应用程序1超过应用程序2,3,4。。。屏幕 请帮助创建如图所示的对话框活动??这里 让我解释一下,在chrome中,我首先单击了要下载的文件,然后使用“Android下载管理器”使用其编辑器活动捕获URI。。并创建了这样的对话框 但我想这样做,在这张图片中,android下载管理器的对话框在chrome上。那么,我如何创建这样一个对话框,当它被意图调用时,它会出现在任何应用程序/屏幕上。当我尝试在没有“setCon

我只想让它出现在任何应用程序屏幕上的对话框。我可以创建这样的对话框。意味着对话框的应用程序1超过应用程序2,3,4。。。屏幕

请帮助创建如图所示的对话框活动??这里

让我解释一下,在chrome中,我首先单击了要下载的文件,然后使用“Android下载管理器”使用其编辑器活动捕获URI。。并创建了这样的对话框


但我想这样做,在这张图片中,android下载管理器的对话框在chrome上。那么,我如何创建这样一个对话框,当它被意图调用时,它会出现在任何应用程序/屏幕上。当我尝试在没有“setContentview”的情况下执行对话框时,我的程序崩溃。

您可以使用此布局:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >
/>


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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="bottom" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Link:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="right" >

                <ImageView
                    android:id="@+id/imageView1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/browser" />

                <ImageView
                    android:id="@+id/imageView2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/settings" />

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >

            <EditText
                android:id="@+id/editText1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ems="10" >

                <requestFocus />
            </EditText>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="bottom" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Name:"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="right" >

                <ImageView
                    android:id="@+id/imageView2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/unnamed" />

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >

            <EditText
                android:id="@+id/EditText01"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:ems="10" />
        </LinearLayout>

    </LinearLayout>

</RelativeLayout>

我只想让它出现在任何应用程序屏幕上的对话框。我可以创建这样的对话框。我需要应用程序1在应用程序2,3,4上的对话框。。。屏幕。看到这里的图片了吗
Button image1 = (Button) dialog.findViewById(R.id.imageView1);

.
.
.

dialog.show();