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

2.  Android  -  Activity

                가)  LoginActivity
            package com.example.jtbs_34.project;


            import android.app.Activity;
            import android.content.Context;
            import android.content.Intent;
            import android.os.Handler;
            import android.support.v7.app.AppCompatActivity;
            import android.os.Bundle;
            import android.text.InputType;
            import android.text.method.PasswordTransformationMethod;
            import android.util.Log;
            import android.view.View;
            import android.view.inputmethod.InputMethodManager;
            import android.widget.Button;
            import android.widget.EditText;
            import android.widget.Toast;


            public class LoginActivity extends AppCompatActivity {




                EditText txtID, txtPass;
                Button btnLogin;


                Handler mHandler = new Handler();
            //└토스트를 띄우기 위해 핸들러를 사용한다.


                @Override
                protected void onCreate(Bundle savedInstanceState) {
                    super.onCreate(savedInstanceState);
                    setContentView(R.layout.activity_login);


                    txtID = (EditText) findViewById(R.id.txtID);
                    txtPass = (EditText) findViewById(R.id.txtPass);
                    btnLogin = (Button) findViewById(R.id.btnLogin);


                    txtID.setSingleLine();
            //└ID를 넣어줄 EditText를 한 줄로 표시한다.


                    txtPass.setInputType(InputType.TYPE_CLASS_TEXT                                          |



                                                         -  71  -
   73   74   75   76   77   78   79   80   81   82   83