package com.jmi.Dddtext; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.util.Base64; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import org.json.JSONObject; import java.util.concurrent.TimeUnit; public class MainActivity extends Activity implements View.OnClickListener { private static final String TAG = "login"; Button loginBtn = null; EditText useridEt = null; EditText passEt = null; TextView promptText = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); loginBtn = (Button) findViewById(R.id.loginBtn); loginBtn.setOnClickListener(this); useridEt = (EditText) findViewById(R.id.userId); passEt = (EditText) findViewById(R.id.pass); promptText = (TextView) findViewById(R.id.promptText); } public void onClick(View v) { String userid = useridEt.getText().toString().trim(); String pass = passEt.getText().toString().trim(); if(userid.equals("")){ promptText.setText(R.string.userIdError); return ; } if(pass.equals("")){ promptText.setText(R.string.passError); return ; } if (userid.length()>=4 && pass.length()>=6) { Toast.makeText(this, R.string.loginSuccess, Toast.LENGTH_LONG).show(); Intent intent = new Intent(MainActivity.this,Dian.class); startActivity(intent); } else { Toast.makeText(this, R.string.loginError, Toast.LENGTH_LONG).show(); } } }
最近下载更多
aliguaguagua LV1
2023年10月12日
2074520745 LV1
2023年6月24日
yyyyyyzh LV8
2023年6月11日
1602701143 LV1
2023年6月3日
我真不会打篮球 LV1
2023年6月3日
龙门客栈 LV9
2023年6月1日
chloe0417 LV1
2023年5月29日
倾城之恋1 LV5
2023年5月21日
202105013142 LV1
2023年1月31日
tong07 LV2
2022年12月20日
最近浏览更多
wxb666 LV3
3月13日
不止是六位数 LV7
2023年12月13日
微笑刺客 LV15
2023年12月12日
statics
2023年11月27日
暂无贡献等级
G2andIG LV5
2023年11月6日
faux123455 LV1
2023年10月27日
aliguaguagua LV1
2023年10月12日
panwill LV4
2023年8月18日
Yanguu
2023年7月11日
暂无贡献等级
2074520745 LV1
2023年6月24日