Forum Xamarin Xamarin.Android

How to read the .axml file in run time from Resource.Layout. folder in c# xamarin android?

jackrajjackraj USMember ✭✭

like separate string file or XML node like Textview, EditText etc
ex:

string rootvalues = "<?xml version=\"1.0\" encoding=\"utf - 8\"?>";
rootvalues+= "< LinearLayout xmlns: android = \"http://schemas.android.com/apk/res/android\" android: orientation = \"vertical\" android: layout_width = \"match_parent\" android: layout_height = \"match_parent\">";
rootvalues += "< TextView android: text = \"Name\" android: textAppearance = \"?android:attr/textAppearanceLarge\" android: layout_width = \"match_parent\" android: layout_height = \"wrap_content\" android: id = \"@+id/textView1\" />";
rootvalues += "< TextView android: text = \"Text\" android: layout_width =\"match_parent\" android: layout_height =\"wrap_content\" android: id = \"@+id/textView2\" /> </ LinearLayout > ";

Sign In or Register to comment.