Page 914 - 3-2
P. 914

import android.view.View;
            import android.widget.Button;
            import android.widget.EditText;
            import android.widget.ImageView;
            import android.widget.TextView;
            import android.widget.Toast;
            import java.util.Timer;
            import java.util.TimerTask;
            import java.util.Vector;


            public class MainActivity extends Activity {
                static String useraddress;
                public static String callval=null;
                public static String room;
                static TextView txtAdd;
                static TextView txtRoom;
                static TextView txtGas;
                static TextView txtSpark;
                static TextView txtTemp;
                ImageView bg;


                int alFlag=0;


                ListItem Item;
                Vector<ListItem> listItem = new Vector<ListItem>();


                protected void onCreate(Bundle savedInstanceState) {
                    final Intent intent = new Intent(MainActivity.this,MyService.class);
                    startService(intent);
                    final AlertDialog.Builder builder = new AlertDialog.Builder(this);
                    super.onCreate(savedInstanceState);
                    setContentView(R.layout.activity_main);
                    final EditText editTextEnter = (EditText) findViewById(R.id.editTextEnter);
                    //txtAl = (TextView) findViewById(R.id.textAl);
                    txtAdd = (TextView) findViewById(R.id.textAdd);
                    txtRoom = (TextView) findViewById(R.id.textRoom);
                    txtGas = (TextView) findViewById(R.id.textGas);
                    txtSpark = (TextView) findViewById(R.id.textSpark);
                    txtTemp = (TextView) findViewById(R.id.textTemp);
                    Button buttonEnter = (Button) findViewById(R.id.buttonEnter);
                    Button buttonLR = (Button) findViewById(R.id.buttonLR);
                    Button buttonMR = (Button) findViewById(R.id.buttonMR);
                    Button buttonK = (Button) findViewById(R.id.buttonK);
                    bg = (ImageView)findViewById(R.id.bg);
                    SharedPreferences pref = getSharedPreferences("pref", MODE_PRIVATE);


                                                         - 914 -
   909   910   911   912   913   914   915   916   917   918   919