Hi,

I need draw a "dotted line" in my app. I use codes below:
        Paint paint = new Paint();
        paint.setColor(0xff00b900);
        paint.setStyle(Paint.Style.STROKE);
        paint.setStrokeWidth(1);
        paint.setPathEffect(new DashPathEffect(new float[] {5, 5, 5,
5}, 1));
        canvas.drawLine(0, 50, 160, 50, paint);

Now I'd like know the unit of parameter of "setStrokeWidth". Is it dp
or pixel? If the unit is "dp", will the line seems same width in
devices with different DPI?
I test it on emulator and my phone, it seems that "x,y" coordinate of
"drawLine" is "dp".

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to