Hello,
I have an activity "MyActivity" that repeatedly re-creates the custom
view "MyView".
While during the first iteration step, MyView is created with the
appropriate parameters from the layout file by the system, I could not
figure out how to re-create the View programmatically using the layout
specification. Thus, I have to set the layout parameters manually:
linearLayout.removeView( myView );
myView.destroy();
myView = new WebViewWithTiming( MyActivity );
LayoutParams lp = new
LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.FILL_PARENT, (float)
1.0 );
myView.setLayoutParams( lp );
linearLayout.addView( myView, 0 );
Is there anyway, I could load the layout parameters from the
corresponding layout file instead of hardcoding them?
Thanks for your help,
Lukas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---