forked from hzuapps/android-labs-2017
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
...ain/java/edu/hzuapps/androidlabs/homeworks/net1414080903117/Net1414080903117Activity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package edu.hzuapps.androidlabs.homeworks.net1414080903117; | ||
|
||
import android.content.Intent; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.EditText; | ||
import android.widget.Toast; | ||
|
||
import edu.hzuapps.androidlabs.R; | ||
|
||
public class Net1414080903117Activity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_net1414080903117); | ||
|
||
final EditText etUsername = (EditText) findViewById(R.id.et_main_username); | ||
final EditText etPassword = (EditText) findViewById(R.id.et_main_password); | ||
|
||
Button btLogin = (Button) findViewById(R.id.bt_login); | ||
|
||
btLogin.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
String username = etUsername.getText().toString(); | ||
String password = etPassword.getText().toString(); | ||
if (check(username, password)) { | ||
startActivity(new Intent(Net1414080903117Activity.this, Net1414080903117MenuActivity.class)); | ||
} else { | ||
Toast.makeText(Net1414080903117Activity.this, "账号/密码错误!!", Toast.LENGTH_SHORT).show(); | ||
} | ||
|
||
} | ||
}); | ||
} | ||
|
||
|
||
public boolean check(String username, String password) { | ||
if (username.equals("linjianchao") && password.equals("123")) | ||
return true; | ||
return false; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
.../java/edu/hzuapps/androidlabs/homeworks/net1414080903117/Net1414080903117FeeActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package edu.hzuapps.androidlabs.homeworks.net1414080903117; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
import edu.hzuapps.androidlabs.R; | ||
|
||
public class Net1414080903117FeeActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_net1414080903117_fee); | ||
|
||
|
||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...java/edu/hzuapps/androidlabs/homeworks/net1414080903117/Net1414080903117MenuActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package edu.hzuapps.androidlabs.homeworks.net1414080903117; | ||
|
||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
|
||
import edu.hzuapps.androidlabs.R; | ||
|
||
public class Net1414080903117MenuActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_net1414080903117_menu); | ||
|
||
Button shuidianfei = (Button)findViewById(R.id.shuidianfei); | ||
Button kanjilu = (Button)findViewById(R.id.kanjilu); | ||
|
||
shuidianfei.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
} | ||
}); | ||
|
||
kanjilu.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
|
||
} | ||
}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...va/edu/hzuapps/androidlabs/homeworks/net1414080903117/Net1414080903117SubmitActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package edu.hzuapps.androidlabs.homeworks.net1414080903117; | ||
|
||
import android.support.v7.app.AppCompatActivity; | ||
import android.os.Bundle; | ||
|
||
import edu.hzuapps.androidlabs.R; | ||
|
||
public class Net1414080903117SubmitActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_net1414080903117_submit); | ||
} | ||
} |