commit
48a80f4903
@ -0,0 +1,19 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
public class ContactusActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.help_contact);
|
||||
}
|
||||
|
||||
public void back(View view){
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, HelpActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
public class DataActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.my_changedata);
|
||||
}
|
||||
|
||||
public void back(View view){
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, IndexActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
public class DiaryActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.index_diary);
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
public class HelpActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.my_help);
|
||||
|
||||
initUI();
|
||||
}
|
||||
|
||||
private void initUI() {
|
||||
findViewById(R.id.aboutfunction).setOnClickListener(this);
|
||||
findViewById(R.id.aboutapp).setOnClickListener(this);
|
||||
findViewById(R.id.subissue).setOnClickListener(this);
|
||||
findViewById(R.id.contactus).setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent();
|
||||
switch (v.getId()){
|
||||
case R.id.aboutfunction:
|
||||
intent.setClass(getApplicationContext(),FunctionActivity.class);
|
||||
break;
|
||||
case R.id.aboutapp:
|
||||
intent.setClass(getApplicationContext(),AboutappActivity.class);
|
||||
break;
|
||||
case R.id.subissue:
|
||||
intent.setClass(getApplicationContext(),IssueActivity.class);
|
||||
break;
|
||||
case R.id.contactus:
|
||||
intent.setClass(getApplicationContext(),ContactusActivity.class);
|
||||
break;
|
||||
case R.id.passwordchange:
|
||||
intent.setClass(getApplicationContext(),PasswordActivity.class);
|
||||
break;
|
||||
case R.id.help:
|
||||
intent.setClass(getApplicationContext(),HelpActivity.class);
|
||||
break;
|
||||
|
||||
}
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void back(View view){
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, IndexActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
@ -1,20 +1,97 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.TextView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Observable;
|
||||
|
||||
public class IndexActivity extends AppCompatActivity{
|
||||
public class IndexActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
|
||||
private DrawerLayout mDrawerLayout;
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_index);
|
||||
|
||||
Toolbar toolbar=(Toolbar) findViewById(R.id.toolbar) ;
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
mDrawerLayout=(DrawerLayout) findViewById(R.id.drawer_layout);
|
||||
ActionBar actionBar=getSupportActionBar();
|
||||
//if (actionBar!=null){
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setHomeAsUpIndicator(R.mipmap.indexmy);
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
// }
|
||||
|
||||
//初始化方法
|
||||
initUI();
|
||||
}
|
||||
|
||||
private void initUI() {
|
||||
findViewById(R.id.indexmemopng).setOnClickListener(this);
|
||||
findViewById(R.id.indexdiarypng).setOnClickListener(this);
|
||||
// findViewById(R.id.indexsharepng).setOnClickListener(this);
|
||||
findViewById(R.id.accountchange).setOnClickListener(this);
|
||||
findViewById(R.id.datachange).setOnClickListener(this);
|
||||
findViewById(R.id.passwordchange).setOnClickListener(this);
|
||||
findViewById(R.id.help).setOnClickListener(this);
|
||||
// findViewById(R.id.leaveapp).setOnClickListener(this);
|
||||
}
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem item){
|
||||
switch (item.getItemId()){
|
||||
case android.R.id.home:
|
||||
mDrawerLayout.openDrawer(GravityCompat.START);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent();
|
||||
switch (v.getId()){
|
||||
case R.id.indexmemopng:
|
||||
//跳转到备忘录界面
|
||||
intent.setClass(getApplicationContext(),MemoActivity.class);
|
||||
break;
|
||||
case R.id.indexdiarypng:
|
||||
intent.setClass(getApplicationContext(),DiaryActivity.class);
|
||||
break;
|
||||
//进入朋友圈
|
||||
// case R.id.indexsharepng:
|
||||
// break;
|
||||
case R.id.accountchange:
|
||||
intent.setClass(getApplicationContext(),LoginActivity.class);
|
||||
break;
|
||||
case R.id.datachange:
|
||||
intent.setClass(getApplicationContext(),DataActivity.class);
|
||||
break;
|
||||
case R.id.passwordchange:
|
||||
intent.setClass(getApplicationContext(),PasswordActivity.class);
|
||||
break;
|
||||
case R.id.help:
|
||||
intent.setClass(getApplicationContext(),HelpActivity.class);
|
||||
break;
|
||||
//退出APP
|
||||
// case R.id.leaveapp:
|
||||
// intent.setClass(getApplicationContext(),HelpActivity.class);
|
||||
// break;
|
||||
|
||||
}
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
public class IssueActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.help_issue);
|
||||
}
|
||||
|
||||
public void back(View view){
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, HelpActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
public class LoginActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_login);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.administrator.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
|
||||
public class PasswordActivity extends AppCompatActivity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.res_password);
|
||||
}
|
||||
|
||||
public void back(View view){
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, IndexActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="这是日记哈哈哈"
|
||||
android:textSize="40dp"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in new issue