Better Cut

by hendro gunawan » Fri, 19 Feb 2010 14:10:02 GMT

Sponsored Links

Aku mau buat icon buat tiap email di homescreen dan butuh better cut...

Bagi yang nyimpen tolong dishare sekalian caranya...hahahaha...

sent from NEXUS1


Other Threads

1. Problem with SurfaceView

Hi, I am working in an Android application, now I am trying to migrate
it to version 0.9, but I am having some problems. I would like to use
the same SurfaceView to put videos and images.

In first place I would like to know how can I use a SurfaceView to
display bitmaps and videos. For example, I would like to put an image
of loading while I download the video, and when it is ready play it.
The problem is that when I use
myHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS), I can use
lockCanvas, so I can put any image even when I set another type.

(This used to work in m5)

Here is what I am using:

1. To set the bitmap in the SurfaceHolder:

        public static void setState(SurfaceHolder mHolder, SurfaceView
mPreview, Bitmap bitmap){
                    /*Center the image*/
                        double wP = mPreview.getWidth();
                        double hP = mPreview.getHeight();
                        double wB = bitmap.getWidth();
                        double hB = bitmap.getHeight();
                        double menos=1;
                        double i = 1;
                        double j = 1;

                        if (wP < wB)
                                i = wP/wB;
                        if (hP < hB)
                                j= hP/hB;

                        menos = Math.min(i,j);

                        int wTotal = (int)(wB*menos);
                        int hTotal = (int)(hB*menos);
                        int left = (int)((wP-wTotal)/2);
                        int top = (int)((hP-hTotal)/2);

                        Canvas canvas = mHolder.lockCanvas();
                        canvas.drawBitmap(bitmap, null, new 
+top), null);
                }catch(NullPointerException e){
                        Log.e("","NullPointerException in setState: ",e);

2. the SurfaceHolder and SurfacePreview

                mHolder = mPreview.getHolder();
                mHolder.setFixedSize(mPreview.getWidth(), mPreview.getHeight());

3. The mediaPlayer

                        mediaPlayer = new MediaPlayer();

And another quick question, how can I change the size of the display
video to the size of the SurfaceView?.

Thanks so much and I hope someone can help me.


2. Feature Suggestion: Maps caching

Could you log this as a feature request in Android Issue Tracker...Thanks!

2008/8/24 Nils <[EMAIL PROTECTED]>


3. Keytool apparently not signing apk - What am I missing here?

4. MapView on load

5. unknown error

6. DateUtils.getRelativeTimeSpanString in v0.9

7. Gallery missing attribute / method