└── biye
├── .gitignore
├── .idea
├── codeStyles
│ └── Project.xml
├── gradle.xml
├── misc.xml
└── runConfigurations.xml
├── android
└── widget
│ └── annotations.xml
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── example
│ │ └── biye
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── biye
│ │ │ ├── ChatmsgActivity.java
│ │ │ ├── ContactAapter.java
│ │ │ ├── Msg.java
│ │ │ ├── MsgAdapter.java
│ │ │ ├── ZhichuFragment.java
│ │ │ ├── contacts.java
│ │ │ ├── loginActivity.java
│ │ │ ├── shouruFragment.java
│ │ │ ├── ui
│ │ │ ├── dashboard
│ │ │ │ └── DashboardFragment.java
│ │ │ ├── home
│ │ │ │ └── HomeFragment.java
│ │ │ └── notifications
│ │ │ │ └── NotificationsFragment.java
│ │ │ └── zhuyeActivity.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable-xhdpi
│ │ ├── add.png
│ │ ├── close.png
│ │ ├── fanhui.png
│ │ ├── flower1.png
│ │ ├── flower2.png
│ │ ├── flower3.png
│ │ ├── flower4.png
│ │ ├── flower5.png
│ │ ├── flower6.png
│ │ ├── flower7.png
│ │ ├── jiantou.png
│ │ ├── jiantou1.png
│ │ ├── jiantou2.png
│ │ ├── jiantou3.png
│ │ ├── one.png
│ │ ├── open.png
│ │ ├── three.png
│ │ ├── two.png
│ │ └── xingfen.png
│ │ ├── drawable
│ │ ├── button_circle_shape.xml
│ │ ├── ic_dashboard_black_24dp.xml
│ │ ├── ic_home_black_24dp.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_notifications_black_24dp.xml
│ │ ├── stayedit.xml
│ │ └── yuan.xml
│ │ ├── layout
│ │ ├── activity_chatmsg.xml
│ │ ├── activity_jizhang.xml
│ │ ├── activity_zhuye.xml
│ │ ├── contact_title.xml
│ │ ├── contacts_item.xml
│ │ ├── fragment_dashboard.xml
│ │ ├── fragment_home.xml
│ │ ├── fragment_notifications.xml
│ │ ├── item.xml
│ │ ├── login.xml
│ │ ├── shouru_frament.xml
│ │ └── zhichu_frament.xml
│ │ ├── menu
│ │ └── bottom_nav_menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── close.png
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_round.png
│ │ └── open.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── navigation
│ │ └── mobile_navigation.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── root_preferences.xml
│ └── test
│ └── java
│ └── com
│ └── example
│ └── biye
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/biye/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/biye/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/biye/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
--------------------------------------------------------------------------------
/biye/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/biye/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/biye/android/widget/annotations.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 |
--------------------------------------------------------------------------------
/biye/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/biye/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.2"
6 | defaultConfig {
7 | applicationId "com.example.biye"
8 | minSdkVersion 25
9 | targetSdkVersion 29
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | implementation fileTree(dir: 'libs', include: ['*.jar'])
24 | implementation 'androidx.appcompat:appcompat:1.0.2'
25 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
26 | implementation 'com.google.android.material:material:1.0.0'
27 | implementation 'androidx.annotation:annotation:1.0.2'
28 | implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
29 | implementation 'androidx.navigation:navigation-fragment:2.0.0'
30 | implementation 'androidx.navigation:navigation-ui:2.0.0'
31 | implementation 'androidx.preference:preference:1.1.0-alpha05'
32 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
33 | testImplementation 'junit:junit:4.12'
34 | androidTestImplementation 'androidx.test.ext:junit:1.1.0'
35 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
36 | implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
37 | implementation 'com.android.support:design:28.0.0'
38 | }
39 |
--------------------------------------------------------------------------------
/biye/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/biye/app/src/androidTest/java/com/example/biye/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.example.biye", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/biye/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/ChatmsgActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import androidx.appcompat.app.ActionBar;
4 | import androidx.appcompat.app.AppCompatActivity;
5 | import androidx.recyclerview.widget.LinearLayoutManager;
6 | import androidx.recyclerview.widget.RecyclerView;
7 |
8 | import android.os.Bundle;
9 | import android.view.View;
10 | import android.widget.Button;
11 | import android.widget.EditText;
12 |
13 | import java.util.ArrayList;
14 | import java.util.List;
15 |
16 | public class ChatmsgActivity extends AppCompatActivity {
17 |
18 | private List msgList = new ArrayList<>();
19 | private EditText inputText;
20 | private Button send;
21 | private Button back;
22 | private RecyclerView msgRecyclerView;
23 | private MsgAdapter adapter;
24 |
25 | @Override
26 | protected void onCreate(Bundle savedInstanceState) {
27 | super.onCreate(savedInstanceState);
28 | setContentView(R.layout.activity_chatmsg);
29 | ActionBar actionBar = getSupportActionBar();
30 | if (actionBar != null){
31 | if (actionBar != null){
32 | actionBar.hide();
33 | }
34 | }
35 |
36 | back = (Button) findViewById(R.id.title_back);
37 | back.setOnClickListener(new View.OnClickListener() {
38 | @Override
39 | public void onClick(View view) {
40 | ChatmsgActivity.this.finish();
41 | }
42 | });
43 |
44 | initMsgs();
45 | inputText = (EditText) findViewById(R.id.input_text);
46 | send = (Button) findViewById(R.id.send);
47 | msgRecyclerView = (RecyclerView) findViewById(R.id.msg_recycler_view);
48 | LinearLayoutManager layoutManager = new LinearLayoutManager(this);
49 | msgRecyclerView.setLayoutManager(layoutManager);
50 | adapter = new MsgAdapter(msgList);
51 | msgRecyclerView.setAdapter(adapter);
52 | send.setOnClickListener(new View.OnClickListener() {
53 | @Override
54 | public void onClick(View v) {
55 | String content = inputText.getText().toString();
56 | if (!"".equals(content)) {
57 | Msg msg = new Msg(content,Msg.TYPE_SEND);
58 | msgList.add(msg);
59 | adapter.notifyItemInserted(msgList.size()-1);
60 | msgRecyclerView.scrollToPosition(msgList.size()-1);
61 | inputText.setText("");
62 | }
63 | }
64 | });
65 | }
66 |
67 | private void initMsgs() {
68 | Msg msg1 = new Msg("Hello",Msg.TYPE_RECEIVED);
69 | msgList.add(msg1);
70 | Msg msg2 = new Msg("I'm ",Msg.TYPE_RECEIVED);
71 | msgList.add(msg2);
72 | Msg msg3 = new Msg("Hello",Msg.TYPE_SEND);
73 | msgList.add(msg3);
74 | }
75 | }
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/ContactAapter.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import android.content.Context;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ArrayAdapter;
8 | import android.widget.ImageView;
9 | import android.widget.TextView;
10 |
11 | import androidx.recyclerview.widget.RecyclerView;
12 |
13 | import java.util.List;
14 |
15 | public class ContactAapter extends ArrayAdapter {
16 |
17 | private int resourceId;
18 |
19 | public ContactAapter(Context context, int textViewResourceId,
20 | Listobjects){
21 | super(context,textViewResourceId,objects);
22 | resourceId = textViewResourceId;
23 | }
24 |
25 | public View getView(int position, View converView, ViewGroup parent){
26 | contacts contacts = getItem(position);//获取当前实例
27 | View view;
28 |
29 | if (converView == null){
30 | view = LayoutInflater.from(getContext()).inflate(resourceId,parent,false);
31 |
32 |
33 | }else {
34 | view = converView;
35 | }
36 |
37 | ImageView contact_image = (ImageView) view.findViewById(R.id.contact_image);
38 | TextView contact_text = (TextView) view.findViewById(R.id.contact_name);
39 | contact_image.setImageResource(contacts.getImageId());
40 | contact_text.setText(contacts.getNames());
41 |
42 | return view;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/Msg.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | public class Msg {
4 |
5 | public static final int TYPE_RECEIVED = 0;
6 | public static final int TYPE_SEND = 1;
7 | private String content;
8 | private int type;
9 |
10 | public Msg(String content,int type) {
11 | this.content = content;
12 | this.type = type;
13 | }
14 |
15 | public String getContent() {
16 | return content;
17 | }
18 | public int getType() {
19 | return type;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/MsgAdapter.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 | import android.view.LayoutInflater;
3 | import android.view.View;
4 | import android.view.ViewGroup;
5 | import android.widget.LinearLayout;
6 | import android.widget.TextView;
7 |
8 | import androidx.recyclerview.widget.RecyclerView;
9 |
10 | import java.util.List;
11 |
12 | public class MsgAdapter extends RecyclerView.Adapter {
13 | private List mMsgList;
14 |
15 | static class ViewHolder extends RecyclerView.ViewHolder {
16 | LinearLayout leftLayout;
17 | LinearLayout rightLayout;
18 | TextView leftMsg;
19 | TextView rihgtMsg;
20 |
21 | public ViewHolder(View view) {
22 | super(view);
23 | leftLayout = (LinearLayout) view.findViewById(R.id.left_layout);
24 | rightLayout = (LinearLayout) view.findViewById(R.id.right_layout);
25 | leftMsg = (TextView) view.findViewById(R.id.left_msg);
26 | rihgtMsg = (TextView) view.findViewById(R.id.right_msg);
27 | }
28 | }
29 |
30 | public MsgAdapter(List msgList) {
31 | mMsgList = msgList;
32 | }
33 |
34 | @Override
35 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
36 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item, parent, false);
37 | return new ViewHolder(view);
38 | }
39 |
40 | @Override
41 | public void onBindViewHolder(ViewHolder holder, int position) {
42 | Msg msg = mMsgList.get(position);
43 | if (msg.getType() == Msg.TYPE_RECEIVED) {
44 | holder.leftLayout.setVisibility(View.VISIBLE);
45 | holder.rightLayout.setVisibility(View.GONE);
46 | holder.leftMsg.setText(msg.getContent());
47 | } else if (msg.getType() == Msg.TYPE_SEND) {
48 | holder.rightLayout.setVisibility(View.VISIBLE);
49 | holder.leftLayout.setVisibility(View.GONE);
50 | holder.rihgtMsg.setText(msg.getContent());
51 | }
52 | }
53 |
54 | @Override
55 | public int getItemCount() {
56 | return mMsgList.size();
57 | }
58 | }
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/ZhichuFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import android.os.Bundle;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.TextView;
8 |
9 | import androidx.annotation.Nullable;
10 | import androidx.fragment.app.Fragment;
11 |
12 | import com.example.biye.R;
13 |
14 | public class ZhichuFragment extends Fragment {
15 | @Override
16 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
17 | Bundle savedInstanceState) {
18 | // Inflate the layout for this fragment
19 | View view = inflater.inflate(R.layout.zhichu_frament, container, false);
20 | return view;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/contacts.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | public class contacts {
4 |
5 | private String names;
6 | private int imageId;
7 |
8 | public contacts(String names,int imageId)
9 | {
10 | this.names = names;
11 | this.imageId = imageId;
12 | }
13 |
14 | public String getNames(){
15 | return names;
16 | }
17 | public int getImageId(){
18 | return imageId;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/loginActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 |
5 | import android.content.Intent;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.widget.Button;
9 | import android.widget.Toast;
10 |
11 | public class loginActivity extends AppCompatActivity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.login);
17 | Button button1=(Button) findViewById(R.id.denglu);
18 | button1.setOnClickListener(new View.OnClickListener() {
19 | @Override
20 | public void onClick(View view) {
21 | Toast.makeText(loginActivity.this,"登录成功",Toast.LENGTH_LONG).show();
22 | Intent intent = new Intent();
23 | intent.setClass(loginActivity.this, zhuyeActivity.class);//this前面为当前activty名称,class前面为要跳转到得activity名称
24 | startActivity(intent);
25 | }
26 | });
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/shouruFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import android.content.Context;
4 | import android.net.Uri;
5 | import android.os.Bundle;
6 |
7 | import androidx.fragment.app.Fragment;
8 |
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 |
13 | public class shouruFragment extends Fragment {
14 |
15 |
16 | @Override
17 | public View onCreateView(LayoutInflater inflater, ViewGroup container,
18 | Bundle savedInstanceState) {
19 | // Inflate the layout for this fragment
20 | return inflater.inflate(R.layout.shouru_frament, container, false);
21 | }
22 | }
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/ui/dashboard/DashboardFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.biye.ui.dashboard;
2 |
3 | import android.content.Context;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.Button;
9 |
10 |
11 | import androidx.fragment.app.Fragment;
12 | import androidx.fragment.app.FragmentManager;
13 | import androidx.fragment.app.FragmentTransaction;
14 |
15 | import com.example.biye.R;
16 | import com.example.biye.ZhichuFragment;
17 | import com.example.biye.shouruFragment;
18 | import com.google.android.material.bottomnavigation.BottomNavigationView;
19 |
20 | public class DashboardFragment extends Fragment implements View.OnClickListener {
21 |
22 | private LayoutInflater inflater;
23 | private View rootView;// 缓存Fragment view
24 | private Context zhuyeActivity;
25 | private ZhichuFragment twoToOne;
26 | private shouruFragment twoToTwo;
27 | /**
28 | * one、two RadioGroup 控件
29 | */
30 | protected Button twoOne, twoTwo;
31 |
32 |
33 | @Override
34 | public void onActivityCreated(Bundle savedInstanceState) {
35 | super.onActivityCreated(savedInstanceState);
36 | zhuyeActivity = getActivity();
37 | inflater = LayoutInflater.from(getActivity());
38 | // 初始化控件和声明事件
39 | // rootView = inflater.inflate(R.layout.two, null);
40 | twoOne = (Button) getActivity().findViewById(R.id.zhichu);
41 | twoOne.setOnClickListener(this);
42 | twoTwo = (Button) getActivity().findViewById(R.id.shouru);
43 | twoTwo.setOnClickListener(this);
44 | //控件颜色
45 | twoOne.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
46 | twoTwo.setTextColor(getResources().getColor(R.color.black));
47 |
48 | setDefaultFragment();
49 | }
50 |
51 |
52 | private void setDefaultFragment()
53 | {
54 | FragmentManager fm = getChildFragmentManager();
55 | FragmentTransaction transaction = fm.beginTransaction();
56 | twoToOne = new ZhichuFragment();
57 | transaction.add(R.id.xia_fragment, twoToOne).commit();//??
58 | }
59 |
60 |
61 | @Override
62 | public void onClick(View v) {
63 | FragmentManager fm = getChildFragmentManager();
64 | // 开启Fragment事务
65 | FragmentTransaction transaction = fm.beginTransaction();
66 |
67 | switch (v.getId())
68 | {
69 | case R.id.zhichu:
70 | if (twoToOne == null)
71 | {
72 | twoToOne = new ZhichuFragment();
73 | }
74 | // 使用当前Fragment的布局替代id_content的控件
75 | transaction.replace(R.id.xia_fragment, twoToOne);
76 | transaction.addToBackStack(null);//添加fragment到返回栈
77 | transaction.commit();
78 | //控件颜色
79 | twoOne.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
80 | twoTwo.setTextColor(getResources().getColor(R.color.black));
81 | break;
82 | case R.id.shouru:
83 | if (twoToTwo == null)
84 | {
85 | twoToTwo = new shouruFragment();
86 | }
87 | transaction.replace(R.id.xia_fragment, twoToTwo);
88 | transaction.addToBackStack(null);//添加fragment到返回栈
89 | transaction.commit();
90 | //控件颜色
91 | twoOne.setTextColor(getResources().getColor(R.color.black));
92 | twoTwo.setTextColor(getResources().getColor(R.color.colorPrimaryDark));
93 | break;
94 | }
95 | // transaction.addToBackStack();
96 | // 事务提交
97 | //transaction.commit();
98 | }
99 | @Override
100 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
101 | {
102 | return inflater.inflate(R.layout.fragment_dashboard, null);
103 |
104 | }
105 |
106 | }
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/ui/home/HomeFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.biye.ui.home;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.LayoutInflater;
6 | import android.view.View;
7 | import android.view.ViewGroup;
8 | import android.widget.AdapterView;
9 | import android.widget.ListView;
10 |
11 | import androidx.annotation.Nullable;
12 | import androidx.annotation.NonNull;
13 | import androidx.fragment.app.Fragment;
14 |
15 | import com.example.biye.ChatmsgActivity;
16 | import com.example.biye.ContactAapter;
17 |
18 | import com.example.biye.R;
19 | import com.example.biye.contacts;
20 |
21 | import java.util.ArrayList;
22 | import java.util.List;
23 |
24 | public class HomeFragment extends Fragment {
25 |
26 | private List contactsList = new ArrayList<>();
27 | private ListView listView;
28 | private ContactAapter adapter;
29 |
30 | public View onCreateView(@NonNull LayoutInflater inflater,
31 | ViewGroup container, Bundle savedInstanceState) {
32 | View root = inflater.inflate(R.layout.fragment_home, container, false);
33 | return root;
34 | }
35 |
36 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState){
37 |
38 | listView = (ListView)view.findViewById(R.id.contact_item);
39 | adapter = new ContactAapter(getActivity(), R.layout.contacts_item,contactsList);
40 | listView.setAdapter(adapter);
41 | initcontats();
42 |
43 | listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
44 | @Override
45 | public void onItemClick(AdapterView> parent, View view, int position, long id) {
46 | contacts contacts = contactsList.get(position);
47 | String name = contacts.getNames();
48 | ListView listView1 = (ListView)parent;
49 |
50 | Intent intent = new Intent(getActivity(), ChatmsgActivity.class);
51 |
52 | // Bundle bundle = new Bundle();
53 | // bundle.putString("name", name);
54 | // intent.putExtras(bundle);
55 | startActivity(intent);
56 | }
57 | });
58 |
59 |
60 |
61 | }
62 |
63 | private void initcontats(){
64 | for(int i = 0;i < 2; i++){
65 | contacts flower1 = new contacts("王源",R.drawable.flower1);
66 | contactsList.add(flower1);
67 | contacts flower2 = new contacts("易烊千玺",R.drawable.flower2);
68 | contactsList.add(flower2);
69 | contacts flower3 = new contacts("王俊凯",R.drawable.flower3);
70 | contactsList.add(flower3);
71 | contacts flower4 = new contacts("胡歌",R.drawable.flower4);
72 | contactsList.add(flower4);
73 | contacts flower5 = new contacts("刘诗诗",R.drawable.flower5);
74 | contactsList.add(flower5);
75 | contacts flower6 = new contacts("刘亦菲",R.drawable.flower6);
76 | contactsList.add(flower6);
77 | contacts flower7 = new contacts("华晨宇",R.drawable.flower7);
78 | contactsList.add(flower7);
79 | }
80 | }
81 |
82 | }
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/ui/notifications/NotificationsFragment.java:
--------------------------------------------------------------------------------
1 | package com.example.biye.ui.notifications;
2 |
3 | import android.os.Bundle;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.ArrayAdapter;
8 | import android.widget.ListView;
9 | import android.widget.TextView;
10 |
11 | import androidx.annotation.NonNull;
12 | import androidx.annotation.Nullable;
13 | import androidx.fragment.app.Fragment;
14 |
15 | import com.example.biye.R;
16 |
17 | import android.os.Handler;
18 | import android.os.Message;
19 |
20 | import java.util.Calendar;
21 | import java.util.TimeZone;
22 |
23 | public class NotificationsFragment extends Fragment {
24 | private static final int msgKey1 = 1;
25 | private TextView time;
26 | private ListView clock_item;
27 | private ArrayAdapter adapter;
28 |
29 |
30 | public View onCreateView(@NonNull LayoutInflater inflater,
31 | ViewGroup container, Bundle savedInstanceState) {
32 | View root = inflater.inflate(R.layout.fragment_notifications, container, false);
33 | time = root.findViewById(R.id.time);
34 | new TimeThread().start();
35 | return root;
36 | }
37 |
38 | @Override
39 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
40 |
41 | clock_item =(ListView)view.findViewById(R.id.clock_item);
42 | String[] data={"18:00","17:00","07:00","06:00","18:00","17:00","07:00","06:00","18:00","17:00","07:00","06:00","18:00","17:00","07:00","06:00"};
43 | adapter = new ArrayAdapter
44 | (getActivity(),android.R.layout.simple_list_item_1,data);
45 | clock_item.setAdapter(adapter);
46 |
47 |
48 | }
49 |
50 | public class TimeThread extends Thread {
51 | @Override
52 | public void run () {
53 | do {
54 | try {
55 | Thread.sleep(1000);
56 | Message msg = new Message();
57 | msg.what = msgKey1;
58 | mHandler.sendMessage(msg);
59 | }
60 | catch (InterruptedException e) {
61 | e.printStackTrace();
62 | }
63 | } while(true);
64 | }
65 | }
66 | private Handler mHandler = new Handler() {
67 | @Override
68 | public void handleMessage (Message msg) {
69 | super.handleMessage(msg);
70 | switch (msg.what) {
71 | case msgKey1:
72 | time.setText(getTime());
73 | break;
74 | default:
75 | break;
76 | }
77 | }
78 | };
79 | //获得当前年月日时分秒星期
80 | public String getTime(){
81 | final Calendar c = Calendar.getInstance();
82 | c.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
83 |
84 | String mHour = String.valueOf(c.get(Calendar.HOUR_OF_DAY));//时
85 | String mMinute = String.valueOf(c.get(Calendar.MINUTE));//分
86 | String mSecond = String.valueOf(c.get(Calendar.SECOND));//秒
87 |
88 | return mHour+":"+mMinute+":"+mSecond;
89 | }
90 | }
--------------------------------------------------------------------------------
/biye/app/src/main/java/com/example/biye/zhuyeActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 | import android.os.Bundle;
3 | import com.google.android.material.bottomnavigation.BottomNavigationView;
4 |
5 | import androidx.appcompat.app.AppCompatActivity;
6 | import androidx.navigation.NavController;
7 | import androidx.navigation.Navigation;
8 | import androidx.navigation.ui.AppBarConfiguration;
9 | import androidx.navigation.ui.NavigationUI;
10 |
11 | public class zhuyeActivity extends AppCompatActivity {
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_zhuye);
17 | BottomNavigationView navView = findViewById(R.id.nav_view);
18 | // Passing each menu ID as a set of Ids because each
19 | // menu should be considered as top level destinations.
20 | AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
21 | R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)
22 | .build();
23 | NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
24 | NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
25 | NavigationUI.setupWithNavController(navView, navController);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/add.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/close.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/fanhui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/fanhui.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower1.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower2.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower3.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower4.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower5.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower6.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/flower7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/flower7.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/jiantou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/jiantou.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/jiantou1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/jiantou1.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/jiantou2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/jiantou2.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/jiantou3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/jiantou3.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/one.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/one.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/open.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/three.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/three.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/two.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/two.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable-xhdpi/xingfen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/drawable-xhdpi/xingfen.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/button_circle_shape.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | **设置文字padding**
19 |
20 |
26 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/ic_dashboard_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/ic_home_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/stayedit.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/drawable/yuan.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/activity_chatmsg.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
18 |
19 |
27 |
28 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/activity_jizhang.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
23 |
24 |
29 |
30 |
31 |
36 |
37 |
44 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/activity_zhuye.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
19 |
20 |
21 |
34 |
35 |
36 |
37 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/contact_title.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/contacts_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
11 |
12 |
13 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/fragment_dashboard.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
15 |
16 |
23 |
24 |
31 |
32 |
33 |
39 |
40 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/fragment_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/fragment_notifications.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
24 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
22 |
23 |
24 |
30 |
31 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/login.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
17 |
24 |
25 |
26 |
33 |
34 |
44 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/shouru_frament.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/layout/zhichu_frament.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
15 |
16 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/menu/bottom_nav_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xhdpi/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xhdpi/close.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xhdpi/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xhdpi/open.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/biye/app/src/main/res/navigation/mobile_navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
25 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Reply
5 | - Reply to all
6 |
7 |
8 |
9 | - reply
10 | - reply_all
11 |
12 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F38584
4 | #FC4B49
5 | #D81B60
6 | #000000
7 |
8 |
9 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 | 16dp
7 | 8dp
8 |
9 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | biye
3 | Sign in
4 | Email
5 | Password
6 | Sign in or register
7 | Sign in
8 | "Welcome !"
9 | Not a valid username
10 | Password must be >5 characters
11 | "Login failed"
12 | zhuyeActivity
13 | 互动
14 | 记账
15 | 闹钟
16 | Settings
17 |
18 |
19 | Messages
20 | Sync
21 |
22 |
23 | Your signature
24 | Default reply action
25 |
26 |
27 | Sync email periodically
28 | Download incoming attachments
29 | Automatically download attachments for incoming emails
30 |
31 | Only download attachments when manually requested
32 | jizhangActivity
33 | Tab 1
34 | Tab 2
35 |
36 |
37 | Hello blank fragment
38 |
39 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/biye/app/src/main/res/xml/root_preferences.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
26 |
33 |
34 |
35 |
36 |
37 |
38 |
41 |
42 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/biye/app/src/test/java/com/example/biye/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.example.biye;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/biye/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.5.3'
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 |
22 | }
23 | }
24 |
25 | task clean(type: Delete) {
26 | delete rootProject.buildDir
27 | }
28 |
--------------------------------------------------------------------------------
/biye/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/biye/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xinjiushidaxinya/xinjiujiu/f0c1df60348303d30b8332138921627bfbb1c423/biye/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/biye/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jan 11 09:37:46 CST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/biye/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/biye/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/biye/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name='biye'
3 |
--------------------------------------------------------------------------------