better approach for FrameLayout in android? -


i'm using framelayout in project.. totally confused in android developement if use xml file static approach whereas on other side i'm using java code run time behaviour framelayout(or android feature) approach project user-experience point of view.. please provide straight forward sight of view reason.. thanx in advance.

it's similiar earliar asked question.

declare ui elements in xml. android provides straightforward xml vocabulary corresponds view classes , subclasses, such widgets , layouts. instantiate layout elements @ runtime. application can create view , viewgroup objects (and manipulate properties) programmatically.

 advantage declaring ui in xml enables better separate  presentation of application code controls behavior. ui descriptions external application code, means can modify or adapt without having modify source code , recompile. example, can create xml layouts different screen orientations, different device screen sizes, , different languages. additionally, declaring layout in xml makes easier visualize structure of ui, it's easier debug  problems.  

when compile application, each xml layout file compiled view resource. should load layout resource application code, in activity.oncreate() callback implementation. calling setcontentview(), passing reference layout resource.

please visit more refference http://developer.android.com/guide/topics/ui/declaring-layout.html


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -