Adding multiple images to AnimateDrawables sample code

by Madiba » Fri, 23 Apr 2010 12:38:36 GMT


Sponsored Links
 Hello,
I was trying to add more than one images in the AnimateDrawables under
com.example.android.apis.graphics, but for some reason I couldn't. Can
anyone post a sample code on how to accomplish it or at least explain
it to me?  This beginner programmer would really appreciate it :)

Thanks

--



Other Threads

1. what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

Mark, thank you so much for the pointer and information!!

you are right on the tabs and activity. the view hierarchy depth of my
activity is only 6 but, because the activity is 'hosted' by another
TabActivity, the total depth on StackOverflowError exception is 13
(6+7).

what i don't understand is:

1). is the critical point measured by the depth of hierarchy or by the
total memory size used by all the views on the hierarchy?

2). how does setBackgroundResource() increase the depth or memory
usage of 'the stack'?


thanks again!!








-- 

2. Bluetooth connect not working

I am trying to establish a connection to another Bluetooth device on
my Nexus One (2.1) with the following code, which occurs when on the
broadcast receiver when a device is found.

BluetoothDevice device = (BluetoothDevice)
intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
BluetoothSocket btSocket = null;

try
{
    btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
    BluetoothClass btClass = device.getBluetoothClass();
    Log.d("BLUETOOTH", "------ createRfcommSocketToServiceRecord
WORKED: " + btClass.toString());
    btSocket.connect();
    Log.e("BLUETOOTH", "ON RESUME: BT connection established, data
transfer link");
}
catch (IOException e)
{
    Log.e("BLUETOOTH", "IOException: " + e);
}

I have tried both the following UUIDs for both the SPP and OOP
profiles:

private static final UUID MY_UUID =
UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
private static final UUID MY_UUID =
UUID.fromString("00001105-0000-1000-8000-00805F9B34FB");

Every time I call the connect command I get an IOException with
"Service discovery failed". I have tried connecting to a G1, iPhone
and a Nokia phone all with the same results.

What am I doing wrong?

-- 

3. FW: FormatDateTime

4. Bluetooth A2DP/AVRCP profiles on Android

5. Any built-in intent for viewing a single image?

6. what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception

7. what is the CRITICAL POINT of view layout to get hit by StackOverflowError exception