Viewgroup using Xml layout

by Yatish » Wed, 14 May 2008 08:16:43 GMT

Sponsored Links
 hi ,
     can any one tell me that how to  show view group using Xml
layout .if yes then please provide me a short example for this .
thanks it very urgent for me .


Other Threads

1. Shell access in Dev Phone

Is this possible in the Dev Phone?

It will be much usable since many guy like me only know how to write
scripts, not Java Program.



2. DNS Caching


I've recently been bit by some DNS caching issues and am wondering if there
is some way around them.  The source seems to say 'no', but perhaps I'm
missing something.

I'm trying to resolve hostnames using a couple of different methods:

    new InetSocketAddress(host, port) // The 'normal ' way


    InetAddress[] addresses = InetAddress.getAllByName(host); // And this
way to bypass the cache in InetAddress

I start the emulator with -dns-server pointing at my host which is running
dnsmasq set to return records with a TTL of 1 second.  This allows me to
tweak the returned DNS values to simulate a DNS change.

In each case, I'm doing this to (try) to disable the cache.  I'm doing both
the generally accepted method (Security) and what PriviAction seems to be
actually doing (System).

        System.setProperty("networkaddress.cache.ttl", "0");
        Security.setProperty("networkaddress.cache.ttl", "0");

No luck, there is still DNS caching in place.

Some poking around bionic reveals that there is a DNS cache in there, an MRU
cache with 128 entries and a 10 minute timeout.  Sure enough, this matches
what I am seeing exactly.

There does not seem to be any way to flush this cache.

I can disable it by setting an environment variable, BIONIC_DNSCACHE, to
zero at process startup - if I can find a way to do that from Java.  That
would be useful.

While I am all for DNS caches, this 10 minute caching would seem to be
inappropriate for a roaming device.  The problem I am trying to work around
is that when I switch from my work network to the carrier network and vice
versa, the DNS cache is not flushed.  We have an internal server set to
resolve differently when you are inside the work network than when you are
external (common enough) and this switch takes 10 full minutes to take
effect after I switch networks.

Is there some way to dump this cache short of a process restart?

Neither of these caches honors TTL.  Bad caches.

And there are two of them, one in Java, one in C, one on top of the other,
which is very strange.  One would seem to be entirely sufficient.

Furthermore, would it not be better to centralize these caches and flush
them on a network change?  It would seem that it would be more efficient,
faster and better to have all applications hitting one DNS cache, which
could then be flushed after the DNS server changed.  It would be easy to
configure dnsmasq to do just this - and all of the processes' DNS caches
could be eliminated and fixed - and, presumably, this central cache could
honor TTL.  It further appears that this could be accomplished with minimal
code changes by setting the correct propery in Java, the right environment
variable in C, pointing everyone at the local dnsmasq instance, and then
configuring that on network change.

Any help which anyone can offer would be greatly appreciated.


3. Display multiple videos at the same time in Android r1.

4. Is Android going to use the LGPL'ed Qt 4.5?

5. debuggerd committing suicide to free the zombie?

6. Why is sometimes silent when the screen is off ?

7. Build Android fail with: /usr/lib64/gcc/x86_64-slamd64-linux/4.2.3/../../../../x86_64-slamd64- linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-slamd64-linux/4.2.3/../../../