[android-developers] Merge bitmaps

2011-04-06 Thread Krzysztof Majkowski
I want to merge and show two bitmaps few times per second ( I'm using
orientation sensor and need to display in ImageView two parts of one
big bitmap ).

Bitmap b = BitmapFactory.decodeFile( url );
Bitmap all = Bitmap.createBitmap( xScreen, yScreen,
Config.ARGB_ );
Canvas c = new Canvas( all );
ImageView imageView = ...;

public void drawBitmaps( float values[] )
{
...
c.save();
Bitmap b2 = Bitmap.createBitmap( b, 0, startY,
xScreen / 2, yScreen );
Bitmap b3 = Bitmap.createBitmap( b, startX, startY,
xScreen / 2, yScreen );

c.drawBitmap( b2, 0, 0, null );
c.drawBitmap( b3, startX, 0, null );
imageView.setImageBitmap( all );
c.restore();
}

I need to call drawBitmaps(...) few times per second, and operation
Canvas.drawBitmap(...) take a lot of time and it's useless. Do you
know any better idea how to merge two bitmaps faster?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Source code for StackView(Honeycomb build) available yet?

2011-04-05 Thread Krzysztof Majkowski
I don't think Google will make the source code of Honeycomb opened.
I recently read about they want to have more control about devices
which has installed Android. The Honeycomb is dedicated for tablet's
and they don't want to let anybody install it in smartphone.

On 5 Kwi, 06:03, Samuh samuh.va...@gmail.com wrote:
 Has the source code for Honeycomb been made available for general
 public yet?
 I was looking for StackView.java in android.git.kernel.org but was not
 able to find it.

 Thanks.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: MediaPlayer.isPlaying() question

2011-03-15 Thread Krzysztof Majkowski
From documentation:

Returns
true if currently playing, false otherwise


So, when player is paused method is playing will return false.

On 13 Mar, 19:25, Ken H hunt1...@gmail.com wrote:
 Will android.media.MediaPlayer.isPlaying() return true if the
 MediaPlayer is paused?

 Ken

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: MediaPlayer.isPlaying() question

2011-03-15 Thread Krzysztof Majkowski
From documentation:

Checks whether the MediaPlayer is playing.

Returns
true if currently playing, false otherwise


It means, that the method will return true only when players is
playing. When it's stopped or paused will return false.

On 13 Mar, 19:25, Ken H hunt1...@gmail.com wrote:
 Will android.media.MediaPlayer.isPlaying() return true if the
 MediaPlayer is paused?

 Ken

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en