ROunding угол в FragmentDialog

Я знаю этот вопрос, который люди задавали биллиновые времена, но ни один sulotion, что я нахожу, не помогает мне. У меня есть такая форма

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"

    >

    <solid
        android:color="#FFFFFF"

        />

    <stroke
        android:width="2dp"
        android:color="#FFFFFF"

        />

    <corners android:radius="30dp" />
</shape>

добавить это в мой основной RelativeLayout, мой файл макета:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">
    <Button
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:background="@drawable/ic_clear_black_18dp"
        />
    <ImageView
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:layout_centerHorizontal="true"
        android:id="@+id/dialog_icon"
        android:src="@drawable/emilypic"
        android:background="@drawable/cicon"
        />
<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:id="@+id/LLTitleandNick"
android:layout_below="@id/dialog_icon"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="10dp"
    >
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/dialog_title"
        android:textSize="22sp"
        android:textColor="@color/title_color"
        android:text="Lily Martinson"
        />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/dialog_nickname"
        android:textSize="18sp"
        android:text="lilmartini"
        android:layout_marginLeft="35dp"
    />
    </LinearLayout>
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:layout_below="@id/LLTitleandNick"
android:layout_marginTop="30dp"
        android:id="@+id/LLFollowers"
        >
        <ImageView
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:id="@+id/image_like"
            android:layout_marginLeft="30dp"
            android:src="@drawable/ic_favorite_border_black_18dp"
            />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/Followers"
            android:text="Followers"
            />
<ImageView
    android:layout_width="20dp"
    android:layout_height="20dp"
    android:id="@+id/image_follow"
    android:layout_marginLeft="80dp"
    android:src="@drawable/ic_directions_walk_black_18dp"
    />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Following"

            />
        </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:id="@+id/LLwithButtons"
        android:layout_below="@+id/LLFollowers"
        android:layout_marginTop="70dp"
        >
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"

            android:background="@drawable/ic_question_answer_black_36dp"

            />
        <Button
            android:layout_width="60dp"
            android:layout_height="50dp"
            android:background="@drawable/cicon"

            android:layout_marginLeft="35dp"
            />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
android:background="@drawable/ic_person_add_black_36dp"
            android:layout_marginLeft="40dp"
            />


    </LinearLayout>
</RelativeLayout>

но проблема в том, что мне нужен диалог для какого-то размера, мой макет создает этот диалог, но когда я добавляю форму, форма для всего экрана, все элементы меняют свое положение и ничего хорошего для меня. Я попытался изменить размер RelativeLayout (мой основной макет) но форма все еще отображается для всех экранов. Как я могу изменить это? Я пытался добавить тему вроде (Transculent, извините за возможно ошибку) и некоторые другие, но ничего не помогает мне.

0 ответов

Другие вопросы по тегам