Page 624 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 624

정보통신기기  프로젝트




            import  java.util.ArrayList;


            public  class  DataBaseView  extends  Activity  implements  OnClickListener  {


                 private  boolean  FinishFlag;
                 private  String  ips;
                 private  int  l,  flag =  0;
                    private  ImageButton  light,  home,  del;
                 MyThread  th;
                    private  ArrayList<SaveLog>  array;
                 TableLayout data;
                    DataBase  db;


                 public  void onCreate(Bundle savedInstanceState)  {
                       requestWindowFeature(Window.FEATURE_NO_TITLE);
                       setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
                       super.onCreate(savedInstanceState);
                       setContentView(R.layout.databaseview);
                       getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);


                       db =  new  DataBase(getApplicationContext(), "log.db",  null,  1);
                       home = (ImageButton)  findViewById(R.id.homeBtn);
                       light  =  (ImageButton) findViewById(R.id.lightBtn);
                       del  =  (ImageButton)  findViewById(R.id.delBtn);
                       data  = (TableLayout) findViewById(R.id.data);
                       array  =  db.getLog();


                       light.setOnClickListener(this);
                       home.setOnClickListener(this);
                       del.setOnClickListener(this);
                       getPreferences();


                            th  =  new  MyThread(ips,  9999);
                       th.start();
                       flag = 1;


                       for  (int j  = 0;  j  <  array.size();  j++) {
                            SaveLog  log  =  array.get(j);
                            TableRow  row  =  new  TableRow(this);
                            TextView  view =  new  TextView(this);




                                                         -  617  -                             정보통신기기과
   619   620   621   622   623   624   625   626   627   628   629