Without knowing the specifics of what you're trying to do, it's
difficult to advise you. However, it's very possible that what you
really want to do is create a suitable number of layouts depending on
expected device configurations. That way, you don't need to worry
about dynamically setting up a layout at runtime.

Your other option would be to use code to define the layout you want
at runtime. You wouldn't create an XML layout file dynamically, you'd
be executing code to instantiate layouts and views. Although you could
use an Inflater to load in pre-built pieces of layout that exist in
resources. But Inflater doesn't allow you to read raw XML, just
resources that got built from layout XMLs at build-time.

- dave
http://www.androidbook.com/proandroid3

On Aug 4, 6:22 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Thu, Aug 4, 2011 at 4:50 AM, abhay chavan <chavan....@gmail.com> wrote:
> > I want edit layout file runtime and use this file for layout how its
> > possible
>
> You cannot edit layout resources at runtime, sorry. All resources are 
> read-only.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in NYC:http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to