java - Show Mainlayout again from diffetent layout and class -
i checked string variable web service every 15 min, if returns "0", new layout open new class. want if returns me different "0" again main layout shown again. when press shows whitout background music want whole mainactivity , layout automaticly.
intent_second= new intent(this, second.class); if (str.equals("0")) { startactivity(intent_second); } else { //can here want? qst.settext(str); }
this code showing second screen, can request class? can mainactivity (calling itself) or how can send variable second class , how can listen , start again mainactivity?
if flag == 0 start second activity , on second activity if flag == 1 call finish() second activity oncreate() { intent_second= new intent(this, second.class); if (str.equals("0")) { startactivityforresult(intent_second,intent_code); } else { //can here want? qst.settext(str); } } onactivityresult(intent intent, code) { if(code == intent_code) { // update main layout string result=data.getstringextra("result"); // here u data second activity "result" key , should used on second activity } }
Comments
Post a Comment