Page 851 - 3-3
P. 851
ImageButton btn_infor; // 정보 버튼
ImageButton btn_back; // 로그아웃 버튼
ImageButton btn_web; // 홈페이지 버튼
ImageButton btn_refresh; // 새로고침 버튼
// 날짜정보 받아오기
SimpleDateFormat mFormat = new SimpleDateFormat("yyyy 년 MM 월 dd 일");
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.office_menu);
// list 변수에 ListView 를 불러옴
list = (ListView) findViewById(R.id.list_class);
// ArrayList 생성
personList = new ArrayList<HashMap<String, String>>();
// listView 클릭 불가능
list.setSelector(R.drawable.selector);
Intent receivedIntent = getIntent(); // 인탠트 생성
// name 변수에 "name" 에서 받아온 Extra 정보를 받아옴
String name = receivedIntent.getExtras().getString("name");
// IP 변수에 "IP" 에서 받아온 Extra 정보를 받아옴
final String IP = receivedIntent.getStringExtra("IP");
// WebIP 변수에 "WebIP" 에서 받아온 Extra 정보를 받아옴
final String WebIP = receivedIntent.getStringExtra("WebIP");
// PORT 변수에 "PORT" 에서 받아온 Extra 정보를 받아옴
final int PORT = receivedIntent.getIntExtra("PORT",1);
name = name.trim(); // 공백제거
Te = (TextView) findViewById(R.id.Teacher);
YMD = (TextView) findViewById(R.id.day);
Te.setText(name); // 선생님 이름 TextView 에 표시
YMD.setText(getDateString()); // 날짜 TextView 에 표시
// 메뉴버튼 생성
btn_status = (ImageButton) findViewById(R.id.status);
btn_schedule = (ImageButton) findViewById(R.id.schedule);
btn_infor = (ImageButton) findViewById(R.id.infor);
btn_back = (ImageButton) findViewById(R.id.back);
btn_web = (ImageButton) findViewById(R.id.web);
btn_refresh = (ImageButton) findViewById(R.id.refresh);
// 선생님 사진을 불러올 이미지뷰 생성
imageView_01 = (ImageView) findViewById(R.id.imageView2);
// 선생님 이름에 따라 사진과 상태정보를 받아옴
if (name.equals(" 이두희")) {
imageView_01.setImageResource(R.drawable.jbts01);
getData("http://" + WebIP + "/project/smart-office/android/ldhinfo.php");
}
else if (name.equals(" 윤상종")) {
- 851 -