Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个只有红色或任何其他颜色的位图。我可以使用CreateBitmap(),如果可以怎么办?
CreateBitmap()
Bitmap b= Bitmap.createBitmap //WHAT DO I NEED HERE?
有任何想法吗?
以低效的方式:
Bitmap bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888); for (int i = 0; i < width; i++) { for (int j = 0; j < height; j++) { bitmap.setPixel(i, j, Color.argb(255, 255, 0, 0)); } }
完整的红色位图