package - Modifying code for Android application to multiple screens -


i have application android change, matter follows:

the application launched has single screen configuration , data management (the application itself), modify have same application on several screens (screen settings, application, information, etc.) , inclurile menu option ..

within oncreate, have several methods, , out of several clasess, need out (otherwise) , interact independent displays each class, can these out ..

the code looks ...

package com.test1; 

import com.test1.r.drawable;

public class test1activity extends activity {

public handler_thread handlerthread; public testinterface uartinterface;  edittext readtext;                               edittext writetext;                              spinner option1spinner;                          button writebutton, configbutton;                  byte[] writebuffer;  public context global_context; public boolean bconfiged = false; public sharedpreferences shareprefsettings; drawable originaldrawable; public string act_string;    @override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.main);      readtext = (edittext) findviewbyid(r.id.readvalues);     writetext = (edittext) findviewbyid(r.id.writevalues);      global_context = this;      configbutton = (button) findviewbyid(r.id.configbutton);     writebutton = (button) findviewbyid(r.id.writebutton);      originaldrawable = configbutton.getbackground();      '     '     '        configbutton.setonclicklistener(new view.onclicklistener() {          // @override         public void onclick(view v) {             '     '     '         }      });      /* handle write click */     writebutton.setonclicklistener(new view.onclicklistener() {          // @override         public void onclick(view v) {             '     '     '              }         }     });      getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_hidden);      handlerthread = new handler_thread(handler);     handlerthread.start();  }      protected void cleanpreference(){         '     '     ' }    public class selectedlistener implements onitemselectedlistener {     public void onitemselected(adapterview<?> parent, view view, int pos,             '     '     ' }  public class selectedlistener implements onitemselectedlistener {     public void onitemselected(adapterview<?> parent, view view, int pos,             '     '     ' }     //@override public void onhomepressed() {     onbackpressed(); }     public void onbackpressed() {     super.onbackpressed(); }        private class handler_thread extends thread {     handler mhandler;      /* constructor */     handler_thread(handler h) {         mhandler = h;     }      public void run() {         message msg;          while (true) {              try {                 thread.sleep(200);             } catch (interruptedexception e) {             }              status = interface.readdata(4096, readbuffer,actualnumbytes);              if (status == 0x00 && actualnumbytes[0] > 0) {                 msg = mhandler.obtainmessage();                 mhandler.sendmessage(msg);             }          }     } } 

}

i think , have use bundle arguement . answer can

https://stackoverflow.com/a/3913720/2382964


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -