Page 119 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 119
사) ShowLog
package com.example.jtbs_34.project;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;
import net.danlew.android.joda.JodaTimeAndroid;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.w3c.dom.Text;
import java.util.ArrayList;
public class ShowLog extends AppCompatActivity {
TableLayout tb;
DataBase db;
@Override
protected void onCreate(Bundle savedInstanceState) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//└상단에 뒤로가기 버튼이 있는 ActionBar를 만들어줌
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show_log);
tb = (TableLayout) findViewById(R.id.tbLayout);
db = new DataBase(getApplicationContext(), "log.db", null, 1);
//└log 테이블의 데이터베이스를 불러옴
ArrayList<SaveLog> array = db.getLog();
- 112 -