diff --git a/students/soft1714080902133/app/src/main/AndroidManifest.xml b/students/soft1714080902133/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000..9b8cbefb8 --- /dev/null +++ b/students/soft1714080902133/app/src/main/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133HomeActivity.java b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133HomeActivity.java index f07a0c01c..39f122d3e 100644 --- a/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133HomeActivity.java +++ b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133HomeActivity.java @@ -1,4 +1,4 @@ -package edu.hzuapps.androidlabs.soft1714080902133; +package edu.hzuapps.androidlabs.soft1714080902133; import android.content.Intent; import android.support.v7.app.AppCompatActivity; @@ -16,9 +16,9 @@ public class Soft1714080902133HomeActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.soft_1714080902133_homeactivity); - Button b1 = findViewById(R.id.home_button4); + Button b4 = findViewById(R.id.home_button4);//个人中心 //点击事件 - b1.setOnClickListener(new View.OnClickListener() { + b4.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //意图实现跳转Activity @@ -26,5 +26,32 @@ public void onClick(View v) { startActivity(intent); } }); + + Button b1 = findViewById(R.id.home_button1);//充值 + b1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Soft1714080902133HomeActivity.this, Soft1714080902133RechargeActivity.class); + startActivity(intent); + } + }); + + /*Button b2 = findViewById(R.id.home_button2);//查询 + b2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Soft1714080902133HomeActivity.this, Soft1714080902133RechargeActivity); + startActivity(intent); + } + });*/ + + Button b3 = findViewById(R.id.home_button3);//缴费 + b3.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent intent = new Intent(Soft1714080902133HomeActivity.this,Soft1714080902133PaymentActivity.class); + startActivity(intent); + } + }); } } diff --git a/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133PaymentActivity.java b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133PaymentActivity.java new file mode 100644 index 000000000..79a930ca0 --- /dev/null +++ b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133PaymentActivity.java @@ -0,0 +1,37 @@ +package edu.hzuapps.androidlabs.soft1714080902133; + +import android.content.Intent; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.support.v7.widget.Toolbar; +import android.view.MenuItem; + +public class Soft1714080902133PaymentActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.soft_1714080902133_paymentactivity); + + //界面标题bar + Toolbar toolbar = (Toolbar) findViewById(R.id.payment_toolbar); + setSupportActionBar(toolbar);//获得ToolBar实例 + ActionBar actionBar = getSupportActionBar(); + if (actionBar!=null){ + actionBar.setDisplayHomeAsUpEnabled(true);//菜单,默认图片返回图片 + } + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()){ + case android.R.id.home://点击了返回,结束该活动,返回上一个活动 + Intent intent = new Intent(Soft1714080902133PaymentActivity.this, Soft1714080902133HomeActivity.class); + startActivity(intent); + finish(); + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133RechargeActivity.java b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133RechargeActivity.java new file mode 100644 index 000000000..f9da3c408 --- /dev/null +++ b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133RechargeActivity.java @@ -0,0 +1,37 @@ +package edu.hzuapps.androidlabs.soft1714080902133; + +import android.content.Intent; +import android.support.v7.app.ActionBar; +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.support.v7.widget.Toolbar; +import android.view.MenuItem; + +public class Soft1714080902133RechargeActivity extends AppCompatActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.soft_1714080902133_rechargeactivity); + //界面标题bar + Toolbar toolbar = (Toolbar) findViewById(R.id.re_toolbar); + setSupportActionBar(toolbar);//获得ToolBar实例 + ActionBar actionBar = getSupportActionBar(); + if (actionBar!=null){ + actionBar.setDisplayHomeAsUpEnabled(true);//菜单,默认图片返回图片 + } + + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()){ + case android.R.id.home://点击了返回,结束该活动,返回上一个活动 + Intent intent = new Intent(Soft1714080902133RechargeActivity.this, Soft1714080902133HomeActivity.class); + startActivity(intent); + finish(); + return true; + } + return super.onOptionsItemSelected(item); + } +} diff --git a/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133UserActivity.java b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133UserActivity.java index e667493c4..005577fb5 100644 --- a/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133UserActivity.java +++ b/students/soft1714080902133/app/src/main/java/edu/hzuapps/androidlabs/soft1714080902133/Soft1714080902133UserActivity.java @@ -1,11 +1,15 @@ -package edu.hzuapps.androidlabs.soft1714080902133; +package edu.hzuapps.androidlabs.soft1714080902133; import android.content.Intent; +import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; +import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.view.View; +import edu.hzuapps.androidlabs.soft1714080902133.javabean.Soft1714080902133User; + //惠大宿舍缴电费app //个人中心,用户信息,先实现点击事件,后期把首页,个人中心,用tab连接起来,实现滑动 public class Soft1714080902133UserActivity extends AppCompatActivity { @@ -14,6 +18,13 @@ public class Soft1714080902133UserActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.soft_1714080902133_useractivity); + + Toolbar toolbar = (Toolbar) findViewById(R.id.users_toolbar); + setSupportActionBar(toolbar);//获得ToolBar实例 + ActionBar actionBar = getSupportActionBar(); + if (actionBar!=null){ + actionBar.setDisplayHomeAsUpEnabled(true);//菜单,默认图片返回图片 + } } //跳转登录界面 @@ -23,10 +34,19 @@ public void go_login(View view) { finish(); } + //完善信息 + public void user_account_management(View view){ + Intent intent = new Intent(Soft1714080902133UserActivity.this, Soft1714080902133PerfectInformationActivity.class); + startActivity(intent); + finish(); + } + @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()){ - case android.R.id.home://点击了返回,结束该活动,返回上一个活动 + case android.R.id.home://点击了返回,结束该活动,返回上一个活动 + Intent intent = new Intent(Soft1714080902133UserActivity.this, Soft1714080902133HomeActivity.class); + startActivity(intent); finish(); return true; } diff --git a/students/soft1714080902133/app/src/main/res/drawable/backgound.jpg b/students/soft1714080902133/app/src/main/res/drawable/backgound.jpg index 67a641b47..1ac1f4f6e 100644 Binary files a/students/soft1714080902133/app/src/main/res/drawable/backgound.jpg and b/students/soft1714080902133/app/src/main/res/drawable/backgound.jpg differ diff --git a/students/soft1714080902133/app/src/main/res/layout/recharge_context.xml b/students/soft1714080902133/app/src/main/res/layout/recharge_context.xml new file mode 100644 index 000000000..cd8dd14c1 --- /dev/null +++ b/students/soft1714080902133/app/src/main/res/layout/recharge_context.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_homeactivity.xml b/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_homeactivity.xml index d20165cd2..b5390d5e7 100644 --- a/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_homeactivity.xml +++ b/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_homeactivity.xml @@ -6,7 +6,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto" - tools:context=".Soft1714080902133HomeActivity"> + tools:context=".Soft1714080902133HomeActivity" + android:background="@drawable/backgound"> - - + diff --git a/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_paymentactivity.xml b/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_paymentactivity.xml new file mode 100644 index 000000000..ae24ecfe1 --- /dev/null +++ b/students/soft1714080902133/app/src/main/res/layout/soft_1714080902133_paymentactivity.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +