I was Designing one activity with top Rounded Corners For Both left and Right with transparent
I was trying To Design something Like this
i created a rounded_drawable.xml file and i implement that xml in my newlist.xml with android:background = "@drawable/rounded_drawable"
still my activity was not transparent and also it doesnot comes with rounded layout
here is what i designed
here is My Code :
rounded_drawable.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/transparent"
/>
<corners android:topRightRadius="10dp"
android:topLeftRadius="10dp"/>
</shape>
newlist.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background = "@drawable/rounded_drawable" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/l1"
android:orientation="horizontal"
>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/close"
android:src="@drawable/ic_close"
android:layout_marginTop="50dp"
android:layout_marginLeft="100dp"
android:layout_marginStart="100dp"
android:layout_marginRight="15dp"
android:layout_marginEnd="15dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:fontFamily="@string/sans_serif_thin"
android:text="@string/new_list"
android:textStyle="bold"
android:textSize="20dp"
/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_check_circle"
android:layout_marginTop="50dp"
android:id="@+id/done"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/l2"
android:orientation="horizontal"
android:layout_below="@+id/l1"
android:layout_marginTop="20dp"
>
<ImageView
android:layout_width="150dp"
android:layout_height="150dp"
android:id="@+id/img"
android:src="@drawable/ic_image"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
/>
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listname"
android:hint="@string/enter_the_list_name"
android:layout_marginEnd="50dp"
android:layout_marginRight="50dp"
android:layout_marginTop="60dp"
android:layout_marginLeft="15dp"
android:layout_marginStart="15dp"
/>
</LinearLayout>