java - ImageButton over another image -


well, see whatsapp , tinder application. "change profile picture" option same besides button over. how can this? there lib? or shape ?

enter image description here

use code :

<framelayout     android:gravity="center"     android:layout_centerinparent="true"     android:layout_height="wrap_content"     android:layout_width="wrap_content"     android:paddingbottom="24.0dip"     android:paddingleft="0.5dip"     android:paddingright="0.5dip"     android:paddingtop="35.0dip"     android:background="#ff26a69a"     xmlns:android="http://schemas.android.com/apk/res/android">       <de.hdodenhof.circleimageview.circleimageview         xmlns:app="http://schemas.android.com/apk/res-auto"         android:id="@+id/profile_image"         android:layout_width="178.0dip"         android:layout_height="178.0dip"         android:src="@drawable/ic_settings_profile"         app:civ_border_width="2dp"         app:civ_border_color="#ff000000"/>       <progressbar         style="?android:attr/progressbarstyleinverse"         android:id="@+id/change_photo_progress"         android:layout_gravity="center"         android:layout_height="wrap_content"         android:layout_width="wrap_content"         android:visibility="gone" />      <imagebutton         style="@style/actionbarbuttonstyle"         android:background="@drawable/input_circle"         android:elevation="2.0dip"         android:id="@+id/change_photo_btn"         android:layout_gravity="bottom|center|right"         android:layout_height="52.0dip"         android:layout_marginbottom="2.0dip"         android:layout_width="52.0dip"         android:src="@drawable/ic_cam_white" /> </framelayout> 

in drawable folder

input_circle.xml

<?xml version="1.0" encoding="utf-8"?> <selector   xmlns:android="http://schemas.android.com/apk/res/android">     <item android:state_pressed="true" android:drawable="@drawable/input_circle_pressed" />     <item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/input_circle_pressed" />     <item android:drawable="@drawable/input_circle_normal" /> </selector> 

output :

enter image description here


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -