java - How to open xml by clicking button -
so have made new layout in res/layout called about, want is, when clicking button directed layout.
simplified. when press button on "activity_main.xml" opens "about.xml". how can achieve this??? don't have access resource heavy websites, stackoverflow last option. appreciated if know how.
if don't want start new activity, invoke:
setcontentview(r.layout.about);
when button clicked. set current activity new layout located @ res/layout/about.xml
. work if change activity presentation without changing functionality.
if want launch activity, should create new activity class implements functionality of new activity , keeps about.xml
layout. on button click, start new activity.
Comments
Post a Comment