Android: I have created a new activity, I called it but the window doesn't have the GUI -


(i running on nexus 7) created new activity , have called on properly. new window appears correctly, except none of gui elements declared int eh xml file appear in new window. how fix that?

in main activity:

    final intent mapintent = new intent(this, mapactivity.class);     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_fullscreen);     button b = (button)findviewbyid(r.id.mapbutton);//finds button w/id "mapbutton"     b.setonclicklistener(new onclicklistener()     {         @override         public void onclick(view v)          {             startactivity(mapintent);            }     }); 

and called activity (mapactivity) empty except super.oncreate(savedinstancestate) line in oncreate().

let me guess: didn't call setcontentview(r.id.xml_file_layout) in activity oncreate() - after call super.oncreate(savedinstancestate)!


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -