导航抽屉的背景图像大小(轮廓零件-第一行)

Use*_*er3 2 android navigation-drawer material-design

我试图按照样式设置导航抽屉 官方材料设计指南来设计。此处定义了所有内容,尽管第一行(配置文件部分)的背景图像大小。我所拥有的是:

在此处输入图片说明

但是如您所见,图像看起来像张拉了。我将其设置如下:

<?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>
Run Code Online (Sandbox Code Playgroud)

我也尝试过使用Imageview作为背景,但仍然可以拉伸。截至目前,我的图片规格为800x600px,与 google在iosched中使用图像并保存在drawable-nodpi内,就像Google所做的那样。

我在这里想念什么吗?请提出建议。谢谢 :)

Ang*_*ngh 5

mdpi-
    宽度= 384像素
    高度= 216像素
hdpi-
    宽度= 576像素
    高度= 324像素
xhdpi-
    宽度= 768像素
    高度= 432像素
xxhdpi-
    宽度= 1152像素
    高度= 648像素

图片来源= Google的报亭应用程序,工具= Adob​​e photoshop 7.0