Re: ImageView setColorFilter, what to do for a bitmap?

by Tim Jones » Sun, 03 Apr 2011 01:54:04 GMT


Sponsored Links
 You can create a new scratch bitmap with a copy of the data and then blt it 
back onto the target bitmap like so:

Paint p = new Paint();

 p.setColorFilter(<customColorFilter>);
 Canvas c = new Canvas(target);
c.drawColor(Color.BLACK);
c.drawBitmap(scratchBitmap, 0, 0, p);

-- 



Other Threads

1. first call to setContentView taking more than 10 seconds

I may have found a solution. I put a call to
getLayoutInflater().inflate(R.layout.new_order, null);
and assign it to a static variable.
right after the setContentView in the parent activity, and then in the
slow one I pass my static view to setContntView

My only problem is I dont understand why expanding the layout earlier
is faster, my program does not seem to take a long time to load.






-- 

2. first call to setContentView taking more than 10 seconds



Oh, heavens, please don't do that. You're begging for a memory leak.


If you only have four views, why do you need three flippers?


The problem most likely has nothing to do with ViewFlippers.

Use Traceview, or even just Log statements, to figure out where your
time is being spent.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android 2.0 Programming Books: http://commonsware.com/books

-- 

3. first call to setContentView taking more than 10 seconds

4. read text from file

5. add a scan barcode button to my webpage

6. Lots of questions and no answers: upgrading <my device> from Android 1.6 to 2.0

7. can't display OpenGL and Camera together on nexus one/Milestone whereas it works fine on HTC Magic