I trying to show the profile image in topside of the dialog fragment with half outside the image.and i attach the sample dialog in below, like that.And tried all FrameLayout collaboration from old Stackoverflow solutions, But i cant able to archive this. Please give me correct solution. Thankyou.
Updated I also tried to make transparent the ImageView parent layout but it's not working in after dialog show. i attach my xml and result screen shot below.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_item"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/imageshow"
android:layout_width="match_parent"
android:layout_height="100dp">
<View
android:id="@+id/imagePadding"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/transparent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/imagePadding"
android:background="#ff0000"></LinearLayout>
<ImageView
android:id="@+id/info_profile"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:src="@drawable/technician_pitcher" />
</RelativeLayout>
Try the below
xml
custom_dialog_layout.xml
And when you are displaying your dialog, follow the code below:
This will definitely help you try this.
use this code inside Relative layout