i trying style navigation drawer per official material design guidelines. defined here albeit background image size first row - profile part. have is:
but can see image seems stretched. setting follows:
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/mat2" > <com.blackb.roundedimageview xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/icon" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignparentleft="true" android:layout_centervertical="true" android:layout_marginleft="16dp" android:background="@drawable/icon_default" android:contentdescription="@string/imageviewcontactus" android:scaletype="centercrop" app:riv_border_color="#bdbdbd" app:riv_border_width="0dip" app:riv_corner_radius="38dip" app:riv_mutate_background="true" app:riv_oval="true" /> <relativelayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_centervertical="true" android:layout_marginleft="72dp" android:gravity="left|center"> <textview android:id="@+id/counter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/title" android:layout_below="@+id/title" android:text="profile completion" android:textcolor="#ffffff" android:textsize="14sp" /> <textview android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="mr.right" android:textcolor="#ffffff" android:textsize="14sp" /> </relativelayout> </relativelayout>
i tried using imageview background, still stretches. of image specs 800x600px same image used google in iosched , saved inside drawable-nodpi, google has done.
do miss here? please suggest. :)
mdpi- width=384 pixels height=216 pixels hdpi- width=576 pixels height=324 pixels xhdpi- width=768 pixels height=432 pixels xxhdpi- width=1152 pixels height=648 pixels
image source= google's newsstand application, tool=adobe photoshop 7.0
Comments
Post a Comment