Creating Custom ImageView

后端 未结 2 1558

I create a custom image view by extending ImageView that just draws some text on the screen, however I don\'t see anything painted in the Emulator Screen, but the log messag

相关标签:
2条回答
  • 2020-12-06 03:04

    Use color values Color.WHITE or Color.BLACK instead of hexa values.

    0 讨论(0)
  • 2020-12-06 03:12

    Have you checked your canvas size? An image view expects the bitmap/drawable to return its size and based on the scaletype flags, determine the size of the view. I don't see anything in your code that determines the size of the view for layout needs.

    -Rick

    0 讨论(0)
提交回复
热议问题