Iknow тыс вопрос люди задавали billin раз, но не один sulotion то, что я считаю, не оленья кожа помогает me.I иметь форму, как этотзакругленные углы в FragmentDialog
<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>
, но проблема в том, что мне нужно dialog
для некоторого размера, мой макет построить этот dialog
, но когда я добавляю shape
, форма для всего экрана, все элементы меняют положение и ничего хорошего для меня. Я попытался изменить размер RelativeLayout
(мой основной макет), но shape
все еще показывать для всех screen
. Как я могу это изменить? пытался добавить тему вроде (Transculent
, извините, может быть, за ошибку), а некоторые другие, но ничего не помогают мне.
использование андроида: layout_gravity = «центр» на родительском относительное расположение также, так что вы можете увидеть это расположение в центре экрана –
пожалуйста прекратите добавлять несколько ответов. Одного достаточно. Либо отредактируйте старый, либо замените более старые на более новые. –
Я не знаю, что за проблема, но углы не меняют – Rost