android - How to code a sort of layout in XML where a circular ImageView is aligned on top of a CardView as shown in the picture below? -
i want develop below shown sort of layout app.
i want know how align circular imageview
on cardview
shown above.
well can done through both image view , cardview put in relative layout. use com.joooonho.selectableroundedimageview rounded image view. use this:
<relativelayout android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="2dp" android:paddingright="2dp" > <android.support.v7.widget.cardview android:id="@+id/card_view" android:layout_gravity="center" android:layout_width="match_parent" android:layout_height="define it" android:margintop="70dp" card_view:cardcornerradius="4dp"/> <com.joooonho.selectableroundedimageview android:id="@+id/image" android:src="@drawable/photo1" android:scaletype="centercrop" android:width="100dp" android:height="100dp" android:margintop="20dp" android:layout_centerhorizontal="true" app:sriv_left_top_corner_radius="16dip" app:sriv_right_top_corner_radius="0dip" app:sriv_left_bottom_corner_radius="48dip" app:sriv_right_bottom_corner_radius="16dip" app:sriv_border_width="2dip" app:sriv_border_color="#008fea" app:sriv_oval="true" /> </relativelayout>
Comments
Post a Comment