Communicate between tabs

by Rog » Sat, 28 Feb 2009 01:55:09 GMT


Sponsored Links
 I am using a TabHost one tab with a list and another to show the
details of a specific item selected in the list.
Does anyone know how I can communicate between tabs?

--~--~---------~--~----~------------~-------~--~----~



Communicate between tabs

by Nykolas » Sat, 28 Feb 2009 03:39:39 GMT


 When you say "communicate" what do you mean? What you can do is write
information to the intent you are firing, using bundles or extras.
Other then that you can use sharedpreferences.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Drawable issues

Hi,

I am trying to resize an image in a textview (set using imagespan). I
tried using setbounds but the image is not reflected.

OnPreDraw - set the bounds
OnDraw - shows the image in some weird place - the updated position
isn't shown correctly.

Can someone please suggest any other option to resize a drawable ?

-- 

2. OutOfMemoryError: how best to transfer large video files into a byte array?

Apologies for cross-posting with StackOverflow, but I'm getting a bit
desperate. I'll cross-post any final answer too.

Please could anyone suggest an approach for transferring a >2MB video
from a ContentResolver into a Bytestream, without running out of
memory?

See question: 
http://stackoverflow.com/questions/2599305/android-outofmemoryerror-while-uploading-video-how-best-to-chunk

Here's the current code, which throws an OutOfMemoryError on the
byteBuffer.write(buffer, 0, len) line when transferring large videos:

// get bytestream to upload
videoByteArray = getBytesFromFile(cR, fileUriString);

public static byte[] getBytesFromFile(ContentResolver cR, String
fileUriString) throws IOException {
    Uri tempuri = Uri.parse(fileUriString);
    InputStream is = cR.openInputStream(tempuri);
    byte[] b3 = readBytes(is);
    is.close();
    return b3;
}
public static byte[] readBytes(InputStream inputStream) throws
IOException {
    ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();
    // this is storage overwritten on each iteration with bytes
    int bufferSize = 1024;
    byte[] buffer = new byte[bufferSize];
    int len = 0;
    while ((len = inputStream.read(buffer)) != -1) {
        byteBuffer.write(buffer, 0, len);
    }
    return byteBuffer.toByteArray();
}

-- 

3. FAT32 file size limited to 2GB

4. save a temporary file to /cache

5. Browser Back Button

6. how to start application in last viewed activity in previous session

7. | WTB | htc hero / qliq......