Android设计可图标化的自定义对话框布局

不要停下来

这是我想设计为自定义对话框布局的下面的图像,我的问题是:我不能将圆形imageview放在对话框顶部的布局上作为对话框图标

在此处输入图片说明

我的布局xml文件:

<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             xmlns:app="http://schemas.android.com/apk/res-auto"
             android:layout_gravity="center">

    <ir.pishguy.signalpresentationproject.Widgets.CircularRevealView
        android:id="@+id/reveal"
        android:layout_width="match_parent"
        android:layout_height="350dp"
        android:layout_gravity="center"/>

    <FrameLayout
        android:id="@+id/frame"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <de.hdodenhof.circleimageview.CircleImageView
            android:layout_width="55dp"
            android:layout_height="55dp"
            android:src="@drawable/ic_messages"
            app:civ_border_color="#ffffff"
            app:civ_border_width="5dp"
            android:layout_marginTop="-35dp"
            android:id="@+id/store_avatar"
            android:layout_gravity="top"/>

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="vertical">


            <ScrollView
                android:id="@+id/scrollView"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                              android:layout_width="match_parent"
                              android:layout_height="match_parent"
                              android:orientation="vertical">

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:text="New Text"/>

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:text="New Text"/>
                </LinearLayout>
            </ScrollView>
        </LinearLayout>
    </FrameLayout>
</FrameLayout>

我的布局屏幕截图:

在此处输入图片说明

甘地
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_vertical"
    android:background="@android:color/transparent">

    <LinearLayout
        android:id="@+id/linearLayout3"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginTop="55dp"
        android:background="@android:color/holo_blue_dark"
        android:orientation="vertical">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="60dp"
            android:text="@string/app_name"
            android:textColor="@android:color/black"
            android:textSize="22sp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:layout_marginTop="16dp"
            android:background="@android:color/white"
            android:gravity="center"
            android:text="Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! Hello World! "
            android:textColor="@android:color/black"
            android:textSize="18sp" />

        <Button
            android:id="@+id/alert_btn_cancel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:background="#FF00F5"
            android:text="Done"
            android:textColor="@android:color/white"
            android:textSize="18sp" />
    </LinearLayout>

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:src="@mipmap/ic_launcher" />
</RelativeLayout>

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Android自定义对话框设计

来自分类Dev

自定义对话框的布局

来自分类Dev

android自定义对话框视图不适合对话框布局

来自分类Dev

对话框自定义布局无法正确拉伸

来自分类Dev

自定义对话框扩展对话框不执行onCreate渲染布局

来自分类Dev

动态更新自定义布局对话框中的文本,NPE-Android

来自分类Dev

无法在自定义对话框视图中删除 Android 布局文件末尾的空格

来自分类Dev

Android自定义对话框图标

来自分类Dev

Android自定义对话框图标

来自分类Dev

Android自定义对话框样式

来自分类Dev

Android自定义对话框片段崩溃

来自分类Dev

自定义视图中的Android显示对话框

来自分类Dev

在Android中自定义包含图像的对话框

来自分类Dev

Android-样式自定义对话框

来自分类Dev

Android自定义对话框强制关闭问题

来自分类Dev

Android自定义对话框样式

来自分类Dev

Android中的“自定义警报”对话框

来自分类Dev

Android微调器显示自定义对话框

来自分类Dev

来自自定义对话框的android片段调用

来自分类Dev

Android-自定义权限通知对话框

来自分类Dev

WXPYTHON自定义对话框

来自分类Dev

自定义对话框片段

来自分类Dev

自定义对话框太小

来自分类Dev

自定义进度对话框

来自分类Dev

自定义对话框错误

来自分类Dev

自定义引导对话框

来自分类Dev

如何自定义PlaceAutocomplete小部件对话框设计以列出地点

来自分类Dev

在点击“地图标记”的infoWindow时显示“自定义ListView”对话框

来自分类Dev

用于自定义对话框的Eclipse插件设置图像图标