Sto lavorando su Android e ci sono alcuni problemi visualizzati Voglio riempire un colore su un oggetto bitmap ma non posso Ho provato bitmap.setPixel ma la mia immagine è in formato PNG (come un cerchio o di contrasto, circondato con colore trasparente) e android non può getHeight() o getWidth(), cioèCome riempire l'oggetto bitmap con il colore in Android
ImageView i = new ImageView(mContext); Bitmap bMap = BitmapFactory.decodeResource(this.mContext.getResources(), mImageIds[position]);// for(int i1 = 0; i1 < bMap.getHeight();i1++) // for(int j = 0; j < bMap.getWidth(); j ++) // bMap.setPixel(i1, j, Color.RED); //can not set
i.setImageBitmap(bMap); i.setLayoutParams(new Gallery.LayoutParams(150, 100)); i.setScaleType(ImageView.ScaleType.FIT_XY); i.setBackgroundResource(mGalleryItemBackground); i.setBackgroundColor(Color.TRANSPARENT);