android - How to add linear layout dynamically to relative layout in a fragment which itself a part of tablayout? -


i couldn't find answer question, please can me this, here scenario (graphically) scenario

apply them in fragment class

public view oncreateview(layoutinflater inflater, viewgroup container,                          bundle savedinstancestate) {     view rootview = inflater.inflate(r.layout.<fragment_xml_name>, container, false);      relativelayout rl = (relativelayout)rootview.findviewbyid(r.id.<yourlayoutid>);     linearlayout ll = new linearlayout(getactivity().getapplicationcontext());      textview tv1 = new textview(getactivity().getapplicationcontext());     textview tv2 = new textview(getactivity().getapplicationcontext());     //do confs textviews...     ll.addview(tv1);     ll.addview(tv2);     rl.addview(ll);      return rootview; } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -