What exactly is being passed into onMeasure()?

by ajb468 » Fri, 23 Apr 2010 00:21:52 GMT


Sponsored Links
 I don't understand the method onMeasure(int widthMeasureSpec, int
heightMeasureSpec). In the example I have seen, MeasureSpec.getMode()
is used, and passed in the widthMeasureSpec or heightMeasureSpec to
find the restrictions placed on the View's boundaries. The restictions
are either "EXACTLY," "AT_MOST," or "UNSPECIFIED." Well my questions
is, what determines these restictions? What calls and passes the
arguments of onMeasure that determine these restrictions? Is it the
parent View? Please help, im so confused.

--



Other Threads

1. Error message while running an application on adb shell

Hello all,


i am getting the below error message while issuing the following command on
adb shell
i installed iperf.exe and moved in to phone via adb push iperf.exe
/data/app, chmod 777 iperf.exe

# ./iperf.exe -u -s -p 5001
./iperf.exe -u -s -p 5001
MZ  ..@ not found
: not found
./iperf.exe: 1: Syntax error: end of file unexpected (expecting ")")
#

could anybody suggest ?

regds
rocky..

-- 

2. Camera taking upside down pictures

I'm working on an application that uses the camera to take pictures of
objects.  I have built a small frame to set my phone on while I move
things in and out to take pictures of.  The problem is that
occasionally the pictures will come out upside down.

I have been experimenting with the camera and I have discovered I can
take a picture holding the camera upside down and the picture will be
flipped over as though the camera was right side up - Android is smart
enough to know the orientation of my device and flips the picture over
for me.  This is how I am opening the intent to take a picture:

                        Intent imageCaptureIntent = new
Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        
imageCaptureIntent.putExtra(MediaStore.EXTRA_SCREEN_ORIENTATION,
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
                        imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT,
fileUri);

                        startActivityForResult(imageCaptureIntent,
IMAGE_CAPTURE_INTENT);

The problem happens when the device is lying on it's back suspended by
my frame... it will take a picture and render it upside down - but
only occasionally I can take 5-6 pictures just fine and then get one
upside down...

Is there some way I can force the camera to not rotate the image?
Similar to forcing the image to have a SCREEN_ORIENTATION_PORTRAIT ?

I'm working on a Nexus One but I believe that the ION has the same
behavior...

Thanks in advance!

-Aaron

-- 

3. values-land not being picked up for Android 1.5

4. ImageView and ViewRoot

5. Fire event to the upper level activity

6. Listview append with new element on RUNTIME

7. connecting to internet via app