I am using the code at http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/comment-page-1/#comment-14326 for building custom view.
I wanted to display the image in place of drawing the hand through code. I have tried setting the texture for the hand but have not got any success.
Can anyone let me know how can I set the image in place of hand?
You can do it with a BitmapShader:
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.images);
fillBMPshader = new BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
mPaint.setShader(fillBMPshader);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With