login.setOnClickListener(new OnClickListener() { public void onClick(View v) { Intent intent1; String name = username.getText().toString(); String pass = password.getText().toString(); Log.i("TAG", "username is" + name + "userpass is" + pass); UserService uService = new UserService(LoginActivity.this); boolean flag = uService.login(name, pass); if (flag) { Log.i("TAG", "Log right"); Toast.makeText(LoginActivity.this, "Log right", Toast.LENGTH_LONG).show(); AlertDialog.Builder dialog = new android.app.AlertDialog.Builder(LoginActivity.this); dialog.setTitle("Attention"); dialog.setMessage("Do you want to do the following test ?"); dialog.setPositiveButton("OK",new android.content.DialogInterface.OnClickListener(){ public void onClick(android.content.DialogInterface dialog,int which){ Intent intent1 = new Intent(LoginActivity.this, AAvtivity.class); startActivity(intent1); } }); dialog.setNegativeButton("Cancel",new android.content.DialogInterface.OnClickListener(){ public void onClick(android.content.DialogInterface dialog,int which){ Intent intent = new Intent(LoginActivity.this,YizhiActivity.class); startActivity(intent); } }); dialog.show(); } else { Log.i("TAG", "Log false"); Toast.makeText(LoginActivity.this, "Log false", Toast.LENGTH_LONG).show(); } } });
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="#f8f8f8" android:state_pressed="true"> <shape> <stroke android:width="1dip" android:color="#c1dbc0" /> <corners android:radius="4dp" /> </shape> </item> <item android:state_focused="true"> <shape> <stroke android:width="1dip" android:color="#c1dbc0" /> <corners android:radius="4dp" /> </shape> </item> <item> <shape> <gradient android:startColor="#e3f2e2" android:endColor="#e3f2e2"></gradient> <stroke android:width="1dip" android:color="#c1dbc0" /> <corners android:radius="4dip" /> </shape> </item> </selector>
其中:android
官网上的解释大概就是被弃用了,但能够在android-sdk/tools/目录的命令行中输入如下内容数据库
monitor浏览器
进入CMD窗口2,cd到目标文件夹tools下,而后输入命令montior,接下来,咱们就能够看到期待已久的Android Device Monitor界面了:3app
严域俊:链接不一样选项对应的小游戏窗口
吴恒佚:链接不一样选项对应的小游戏窗口,找回R文件
曾程:博客、todolist
刘辰:登录界面的动画
邓煜坤:数据库更新
你们一块儿思考:更改按钮样式的想法增长背景音乐布局
严域俊 | 吴恒佚 | 曾程 | 刘辰 | 邓煜坤 |
---|---|---|---|---|
3 | 3.5 | 2.5 | 3.2 | 2.6 |