Bladeren bron

个人页

xiongzhu 7 jaren geleden
bovenliggende
commit
828dcf5f4b
49 gewijzigde bestanden met toevoegingen van 910 en 25 verwijderingen
  1. 1 0
      app/build.gradle
  2. 6 0
      app/src/main/AndroidManifest.xml
  3. 2 2
      app/src/main/java/com/android/chmo/http/HttpApi.java
  4. 13 15
      app/src/main/java/com/android/chmo/ui/activity/MainActivity.java
  5. 201 0
      app/src/main/java/com/android/chmo/ui/activity/me/SettingsActivity.java
  6. 129 0
      app/src/main/java/com/android/chmo/ui/fragment/MineFragment.java
  7. 5 0
      app/src/main/res/drawable/bg_avatar.xml
  8. 5 0
      app/src/main/res/drawable/bg_btn_logout.xml
  9. 9 0
      app/src/main/res/drawable/bg_mine.xml
  10. 5 0
      app/src/main/res/drawable/bg_mine_list.xml
  11. 5 0
      app/src/main/res/drawable/bg_order_menu.xml
  12. 5 0
      app/src/main/res/drawable/bg_settings_cell.xml
  13. 3 2
      app/src/main/res/layout/activity_my_sign.xml
  14. 188 0
      app/src/main/res/layout/activity_settings.xml
  15. 3 3
      app/src/main/res/layout/page_me.xml
  16. 327 0
      app/src/main/res/layout/page_mine.xml
  17. BIN
      app/src/main/res/mipmap-xhdpi/icon_inter.png
  18. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_daifukuan.png
  19. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_jinxingzhong.png
  20. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_lianxikefu.png
  21. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_qianbao.png
  22. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_quanbu.png
  23. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_shezhi_baise.png
  24. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_shipin.png
  25. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_yaoqing.png
  26. BIN
      app/src/main/res/mipmap-xhdpi/into_icon_yiwancheng.png
  27. BIN
      app/src/main/res/mipmap-xxhdpi/icon_inter.png
  28. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_daifukuan.png
  29. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_jinxingzhong.png
  30. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_lianxikefu.png
  31. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_qianbao.png
  32. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_quanbu.png
  33. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_shezhi_baise.png
  34. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_shipin.png
  35. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_yaoqing.png
  36. BIN
      app/src/main/res/mipmap-xxhdpi/into_icon_yiwancheng.png
  37. BIN
      app/src/main/res/mipmap-xxxhdpi/icon_inter.png
  38. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_daifukuan.png
  39. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_jinxingzhong.png
  40. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_lianxikefu.png
  41. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_qianbao.png
  42. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_quanbu.png
  43. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_shezhi_baise.png
  44. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_shipin.png
  45. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_yaoqing.png
  46. BIN
      app/src/main/res/mipmap-xxxhdpi/into_icon_yiwancheng.png
  47. 1 1
      app/src/main/res/values/colors.xml
  48. 2 2
      build.gradle
  49. 0 0
      gradlew

+ 1 - 0
app/build.gradle

@@ -83,4 +83,5 @@ dependencies {
     implementation 'com.netease.nimlib:rts:5.4.0'
     implementation 'com.netease.nimlib:avchat:5.4.0'
     implementation project(':avchatkit')
+    implementation 'com.github.dmytrodanylyk.shadow-layout:library:1.0.3'
 }

+ 6 - 0
app/src/main/AndroidManifest.xml

@@ -259,6 +259,12 @@
             android:theme="@style/ThemeScreen"
             android:windowSoftInputMode="adjustPan|stateHidden"></activity>
 
+        <activity
+            android:name=".ui.activity.me.SettingsActivity"
+            android:screenOrientation="portrait"
+            android:theme="@style/ThemeScreen"
+            android:windowSoftInputMode="adjustPan|stateHidden"></activity>
+
         <!--<receiver android:name=".receiver.VChatReceiver">-->
             <!--<intent-filter>-->
                 <!--<action android:name="android.chmo.action.CALL"/>-->

+ 2 - 2
app/src/main/java/com/android/chmo/http/HttpApi.java

@@ -14,9 +14,9 @@ import org.xutils.x;
 
 public class HttpApi {
     //    public static final String BASE_URL = "http://118.190.49.85/thmodel/";
-    public static final String BASE_URL = "http://192.168.50.132:8081/";
+//    public static final String BASE_URL = "http://192.168.50.132:8081/";
 //    public static final String BASE_URL = "http://118.190.49.85/thmodeltest/";
-
+    public static final String BASE_URL = "http://118.190.49.85:8080/thmodeltest/";
 
     public static String getImgUrl(String path) {
         if (TextUtils.isEmpty(path) || path.startsWith("http://")) {

+ 13 - 15
app/src/main/java/com/android/chmo/ui/activity/MainActivity.java

@@ -17,6 +17,7 @@ import com.android.chmo.ui.fragment.FindFragment;
 import com.android.chmo.ui.fragment.HomeFragment;
 import com.android.chmo.ui.fragment.MeFragment;
 import com.android.chmo.ui.fragment.MessageFragment;
+import com.android.chmo.ui.fragment.MineFragment;
 import com.android.chmo.ui.view.NoSlideViewPager;
 import com.netease.nimlib.sdk.NIMClient;
 import com.netease.nimlib.sdk.msg.MsgService;
@@ -114,11 +115,11 @@ public class MainActivity extends BaseActivity {
     }
 
     private void fillUnreadView() {
-        int count =  NIMClient.getService(MsgService.class).getTotalUnreadCount();
+        int count = NIMClient.getService(MsgService.class).getTotalUnreadCount();
         if (count == 0) {
             unreadView.setText("0");
             unreadView.setVisibility(View.GONE);
-        }else {
+        } else {
             unreadView.setVisibility(View.VISIBLE);
             unreadView.setText(count > 9 ? "9+" : String.valueOf(count));
         }
@@ -126,8 +127,8 @@ public class MainActivity extends BaseActivity {
 
     private void registerObserver(boolean register) {
         if (register) {
-            registerReceiver(msgCountReceiver,new IntentFilter("com.android.chmo.REFRESH_MSG"));
-        }else {
+            registerReceiver(msgCountReceiver, new IntentFilter("com.android.chmo.REFRESH_MSG"));
+        } else {
             unregisterReceiver(msgCountReceiver);
         }
     }
@@ -149,20 +150,16 @@ public class MainActivity extends BaseActivity {
         public Fragment getItem(int position) {
             switch (position) {
                 case FRAGMENT_HOME:
-                    return Fragment.instantiate(getApplicationContext(),
-                            HomeFragment.class.getName());
+                    return Fragment.instantiate(getApplicationContext(), HomeFragment.class.getName());
                 case FRAGMENT_BROKER:
-                    return Fragment.instantiate(getApplicationContext(),
-                            BrokerFragment.class.getName());
+                    return Fragment.instantiate(getApplicationContext(), BrokerFragment.class.getName());
                 case FRAGMENT_FIND:
-                    return Fragment.instantiate(getApplicationContext(),
-                            FindFragment.class.getName());
+                    return Fragment.instantiate(getApplicationContext(), FindFragment.class.getName());
                 case FRAGMENT_MESSAGE:
-                    return Fragment.instantiate(getApplicationContext(),
-                            MessageFragment.class.getName());
+                    return Fragment.instantiate(getApplicationContext(), MessageFragment.class.getName());
                 case FRAGMENT_ME:
-                    return Fragment.instantiate(getApplicationContext(),
-                            MeFragment.class.getName());
+//                    return Fragment.instantiate(getApplicationContext(), MeFragment.class.getName());
+                    return Fragment.instantiate(getApplicationContext(), MineFragment.class.getName());
             }
 
             throw new RuntimeException("undefine position:" + position);
@@ -176,10 +173,11 @@ public class MainActivity extends BaseActivity {
 
 
     private long backPressTime = 0;
+
     @Override
     public void onBackPressed() {
         long time = System.currentTimeMillis();
-        if((time-backPressTime) > 2000) {
+        if ((time - backPressTime) > 2000) {
             backPressTime = time;
             showToast("再按一次退出应用");
             return;

+ 201 - 0
app/src/main/java/com/android/chmo/ui/activity/me/SettingsActivity.java

@@ -0,0 +1,201 @@
+package com.android.chmo.ui.activity.me;
+
+import android.Manifest;
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Intent;
+import android.net.Uri;
+import android.support.annotation.NonNull;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.android.chmo.R;
+import com.android.chmo.base.BaseActivity;
+import com.android.chmo.http.HttpApi;
+import com.android.chmo.http.RequestCallback;
+import com.android.chmo.http.response.LoginRes;
+import com.android.chmo.http.response.PhotoRes;
+import com.android.chmo.http.service.UserService;
+import com.android.chmo.im.IMManager;
+import com.android.chmo.model.LoginUser;
+import com.android.chmo.ui.activity.LoginActivity;
+import com.android.chmo.ui.dialog.ConfirmDialog;
+import com.android.chmo.ui.dialog.SelectDialog;
+import com.android.chmo.utils.CommonUtils;
+import com.android.chmo.utils.FileInfoUtils;
+import com.android.chmo.utils.LoginUtils;
+import com.android.chmo.utils.XUtilsImage;
+import com.google.gson.Gson;
+import com.netease.nim.uikit.common.media.picker.activity.PickImageActivity;
+import com.netease.nim.uikit.support.permission.MPermission;
+import com.netease.nim.uikit.support.permission.annotation.OnMPermissionDenied;
+import com.netease.nim.uikit.support.permission.annotation.OnMPermissionGranted;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+/**
+ * Created by Administrator on 2018/8/20.
+ */
+
+public class SettingsActivity extends BaseActivity {
+    private final int RESULT_MODNAME = 1;
+    private final int RESULT_CAMERA = 2;
+    private final int RESULT_PHOTO = 3;
+
+    @BindView(R.id.iv_avatar)
+    ImageView ivAvatar;
+    @BindView(R.id.tv_name)
+    TextView tvName;
+    @BindView(R.id.tv_phone)
+    TextView tvPhone;
+
+    @Override
+    protected int getContentResId() {
+        return R.layout.activity_settings;
+    }
+
+    @Override
+    public void initView() {
+        LoginUser user = LoginUtils.getLoginUser();
+        fillView(user);
+    }
+
+    private void fillView(LoginUser user) {
+        tvName.setText(user.getPet());
+        tvPhone.setText(user.getPhone());
+        XUtilsImage.displayCircluar(ivAvatar, HttpApi.getImgUrl(user.getHphoto()), R.mipmap.def_head);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        getUserInfo();
+    }
+
+    private void getUserInfo() {
+        UserService.getUser(new RequestCallback() {
+            @Override
+            public void onSuccess(String result) {
+                LoginRes res = new Gson().fromJson(result, LoginRes.class);
+                if (res.data != null) {
+                    LoginUser user = new LoginUser();
+                    user.setUser(res.data);
+                    LoginUtils.saveLoginUser(user);
+                    IMManager.updateUser();
+                    initView();
+                }
+            }
+
+            @Override
+            public void onFailure(String error) {
+            }
+        });
+    }
+
+    @OnClick({R.id.ll_avatar, R.id.ll_name, R.id.btn_logout})
+    void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.ll_avatar:
+                String[] strs = new String[]{"拍照", "选择相册照片"};
+                new SelectDialog(getContext())
+                        .setItems(strs)
+                        .setItemListener(new SelectDialog.ItemListener() {
+                            @Override
+                            public void onSelect(int pos) {
+                                if (pos == 0) {
+                                    pickFromCamera();
+                                } else {
+                                    pickFromPhoto();
+                                }
+
+                            }
+                        }).show();
+                break;
+            case R.id.ll_name:
+                Intent intent = new Intent(getContext(), ModifyNameActivity.class);
+                openPageForResult(intent, RESULT_MODNAME);
+                break;
+            case R.id.btn_logout:
+                new ConfirmDialog(this)
+                        .setMsg("是否确定退出?")
+                        .setDialogListener(new ConfirmDialog.DialogListener() {
+                            @Override
+                            public void onOk(Dialog dialog) {
+                                dialog.dismiss();
+                                LoginUtils.clearLoginUser();
+                                CommonUtils.clearAllNotification(getContext());
+                                IMManager.logout();
+                                openPage(LoginActivity.class);
+                                close();
+                            }
+
+                            @Override
+                            public void onCancel(Dialog dialog) {
+                                dialog.dismiss();
+                            }
+                        }).show();
+                break;
+        }
+    }
+
+    private void pickFromCamera() {
+        startActivityForResult(PickImageActivity.getStartIntent(this, PickImageActivity.FROM_CAMERA, getOutputPath(), false, 1,
+                false, true, 150, 150), RESULT_CAMERA);
+
+    }
+
+    private void pickFromPhoto() {
+        startActivityForResult(PickImageActivity.getStartIntent(this, PickImageActivity.FROM_LOCAL, getOutputPath(), false, 1,
+                false, true, 150, 150), RESULT_PHOTO);
+    }
+
+    private String getOutputPath() {
+        String path = FileInfoUtils.getPhotoPath(getContext());
+        return path;
+    }
+
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+        switch (requestCode) {
+            case RESULT_MODNAME:
+                getUserInfo();
+                break;
+            case RESULT_CAMERA:
+            case RESULT_PHOTO:
+                String path = data.getStringExtra("file_path");
+                updateHead(path);
+                break;
+        }
+    }
+
+    private void updateHead(String path) {
+        showLoading("上传头像...");
+        UserService.updateHead(path, new RequestCallback() {
+            @Override
+            public void onSuccess(String result) {
+                hideLoading();
+                PhotoRes res = new Gson().fromJson(result, PhotoRes.class);
+                if (res.msg.equals("success")) {
+                    XUtilsImage.displayCircluar(ivAvatar, HttpApi.getImgUrl(res.img), R.mipmap.def_head);
+                    getUserInfo();
+                } else {
+                    showToast("上传失败");
+                }
+            }
+
+            @Override
+            public void onFailure(String error) {
+                hideLoading();
+                showToast("上传失败");
+            }
+        });
+    }
+}

+ 129 - 0
app/src/main/java/com/android/chmo/ui/fragment/MineFragment.java

@@ -0,0 +1,129 @@
+package com.android.chmo.ui.fragment;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Intent;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.chmo.R;
+import com.android.chmo.base.BaseFragment;
+import com.android.chmo.http.HttpApi;
+import com.android.chmo.http.RequestCallback;
+import com.android.chmo.http.response.LoginRes;
+import com.android.chmo.http.response.PhotoRes;
+import com.android.chmo.http.service.UserService;
+import com.android.chmo.im.IMManager;
+import com.android.chmo.model.LoginUser;
+import com.android.chmo.ui.activity.LoginActivity;
+import com.android.chmo.ui.activity.me.AboutActivity;
+import com.android.chmo.ui.activity.me.ModifyNameActivity;
+import com.android.chmo.ui.activity.me.MySignActivity;
+import com.android.chmo.ui.activity.me.RechargeActivity;
+import com.android.chmo.ui.activity.me.SettingsActivity;
+import com.android.chmo.ui.activity.order.MyOrderActivity;
+import com.android.chmo.ui.activity.order.VideoOrderActivity;
+import com.android.chmo.ui.dialog.ConfirmDialog;
+import com.android.chmo.ui.dialog.SelectDialog;
+import com.android.chmo.utils.CommonUtils;
+import com.android.chmo.utils.FileInfoUtils;
+import com.android.chmo.utils.LoginUtils;
+import com.android.chmo.utils.XUtilsImage;
+import com.google.gson.Gson;
+import com.netease.nim.uikit.common.media.picker.activity.PickImageActivity;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+/**
+ * Created by Administrator on 2018/7/31.
+ */
+
+public class MineFragment extends BaseFragment {
+    @BindView(R.id.iv_avatar)
+    ImageView ivAvatar;
+    @BindView(R.id.tv_name)
+    TextView tvName;
+
+    @Override
+    public int getLayoutRes() {
+        return R.layout.page_mine;
+    }
+
+    @Override
+    public void initView() {
+        LoginUser user = LoginUtils.getLoginUser();
+        tvName.setText(user.getPet());
+        XUtilsImage.displayCircluar(ivAvatar, HttpApi.getImgUrl(user.getHphoto()), R.mipmap.def_head);
+    }
+
+    @Override
+    public void onVisible() {
+        getUserInfo();
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        getUserInfo();
+    }
+
+    private void getUserInfo() {
+        UserService.getUser(new RequestCallback() {
+            @Override
+            public void onSuccess(String result) {
+                LoginRes res = new Gson().fromJson(result, LoginRes.class);
+                if (res.data != null) {
+                    LoginUser user = new LoginUser();
+                    user.setUser(res.data);
+                    LoginUtils.saveLoginUser(user);
+                    IMManager.updateUser();
+                    initView();
+                }
+            }
+
+            @Override
+            public void onFailure(String error) {
+            }
+        });
+    }
+
+    @OnClick({R.id.ll_no_pay, R.id.ll_doing, R.id.ll_done, R.id.ll_all,
+            R.id.ll_wallet, R.id.ll_video_order, R.id.ll_share, R.id.ll_about,
+            R.id.iv_settings, R.id.iv_avatar})
+    void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.ll_no_pay:
+                openPage(MyOrderActivity.class);
+                break;
+            case R.id.ll_doing:
+                openPage(MyOrderActivity.class);
+                break;
+            case R.id.ll_done:
+                openPage(MyOrderActivity.class);
+                break;
+            case R.id.ll_all:
+                openPage(MyOrderActivity.class);
+                break;
+            case R.id.ll_wallet:
+                openPage(RechargeActivity.class);
+                break;
+            case R.id.ll_video_order:
+                openPage(VideoOrderActivity.class);
+                break;
+            case R.id.ll_share:
+                openPage(MyOrderActivity.class);
+                break;
+            case R.id.ll_about:
+                openPage(AboutActivity.class);
+                break;
+            case R.id.iv_settings:
+            case R.id.iv_avatar:
+                openPage(SettingsActivity.class);
+                break;
+        }
+    }
+
+
+}

+ 5 - 0
app/src/main/res/drawable/bg_avatar.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#ffffffff" />
+    <corners android:radius="43dp" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/bg_btn_logout.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#FF4095" />
+    <corners android:radius="22dp" />
+</shape>

+ 9 - 0
app/src/main/res/drawable/bg_mine.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <gradient
+        android:angle="90"
+        android:endColor="#fffb5ca3"
+        android:startColor="#fffd7f8d"
+        android:type="linear"
+        android:useLevel="true" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/bg_mine_list.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#ffffffff" />
+    <corners android:topLeftRadius="30dp" android:topRightRadius="30dp" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/bg_order_menu.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="12dp" />
+    <solid android:color="#ffffff" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/bg_settings_cell.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <corners android:radius="8dp" />
+    <solid android:color="#ffffff" />
+</shape>

+ 3 - 2
app/src/main/res/layout/activity_my_sign.xml

@@ -13,15 +13,16 @@
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent">
+
         <com.android.chmo.ui.view.EmptyView
             android:id="@+id/empty"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            app:empty="暂无报名活动"/>
+            app:empty="暂无报名活动" />
 
         <com.android.chmo.ui.view.RefreshListView
             android:id="@id/refreshList"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"/>
+            android:layout_height="match_parent" />
     </FrameLayout>
 </LinearLayout>

+ 188 - 0
app/src/main/res/layout/activity_settings.xml

@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#F2F4F5"
+    android:orientation="vertical">
+
+    <com.android.chmo.ui.view.TopBar
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:topTitle="系统设置" />
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:fillViewport="true">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:padding="10dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="20dp"
+                android:layout_marginTop="20dp"
+                android:layout_marginRight="20dp"
+                android:background="@drawable/bg_settings_cell"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:id="@+id/ll_avatar"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:gravity="left|center"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:layout_weight="1"
+                        android:text="头像"
+                        android:textColor="#ff000000"
+                        android:textSize="14sp"
+                        android:textStyle="bold" />
+
+                    <ImageView
+                        android:id="@+id/iv_avatar"
+                        android:layout_width="36dp"
+                        android:layout_height="36dp"
+                        android:layout_marginRight="6dp"
+                        android:scaleType="centerCrop"
+                        android:src="@mipmap/def_head" />
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_marginRight="10dp"
+                        android:src="@mipmap/icon_inter" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="1dp"
+                    android:layout_marginLeft="15dp"
+                    android:layout_marginRight="15dp"
+                    android:background="#F2F4F5" />
+
+                <LinearLayout
+                    android:id="@+id/ll_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:gravity="left|center"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:layout_weight="1"
+                        android:text="昵称"
+                        android:textColor="#ff000000"
+                        android:textSize="14sp"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/tv_name"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text=" "
+                        android:textColor="#ff121c26"
+                        android:textSize="16sp" />
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_marginRight="10dp"
+                        android:src="@mipmap/icon_inter" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="60dp"
+                android:layout_marginLeft="20dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginRight="20dp"
+                android:background="@drawable/bg_settings_cell"
+                android:gravity="left|center"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="15dp"
+                    android:layout_weight="1"
+                    android:text="手机"
+                    android:textColor="#ff000000"
+                    android:textSize="14sp"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/tv_phone"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=" "
+                    android:textColor="#ff121c26"
+                    android:textSize="16sp" />
+
+                <ImageView
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginRight="10dp"
+                    android:src="@mipmap/icon_inter" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="60dp"
+                android:layout_marginLeft="20dp"
+                android:layout_marginTop="15dp"
+                android:layout_marginRight="20dp"
+                android:background="@drawable/bg_settings_cell"
+                android:gravity="left|center"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="15dp"
+                    android:layout_weight="1"
+                    android:text="是否接受消息提示"
+                    android:textColor="#ff000000"
+                    android:textSize="14sp"
+                    android:textStyle="bold" />
+
+                <Switch
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginRight="15dp"
+                    android:checked="true" />
+
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+
+
+    <Button
+        android:id="@+id/btn_logout"
+        android:layout_width="match_parent"
+        android:layout_height="44dp"
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="20dp"
+        android:layout_marginBottom="15dp"
+        android:background="@drawable/bg_btn_logout"
+        android:elevation="10dp"
+        android:text="退出登录"
+        android:textColor="@color/white"
+        android:textSize="16sp" />
+
+
+</LinearLayout>

+ 3 - 3
app/src/main/res/layout/page_me.xml

@@ -27,10 +27,10 @@
                 android:id="@+id/myHead"
                 style="@style/HContainer"
                 android:background="@drawable/item_selector"
-                android:paddingBottom="10dp"
                 android:paddingLeft="15dp"
+                android:paddingTop="10dp"
                 android:paddingRight="15dp"
-                android:paddingTop="10dp">
+                android:paddingBottom="10dp">
 
                 <TextView
                     android:layout_width="0dp"
@@ -227,8 +227,8 @@
             <LinearLayout
                 android:id="@+id/logout"
                 style="@style/HContainer"
-                android:layout_marginBottom="20dp"
                 android:layout_marginTop="10dp"
+                android:layout_marginBottom="20dp"
                 android:background="@drawable/item_selector"
                 android:gravity="center"
                 android:padding="15dp">

+ 327 - 0
app/src/main/res/layout/page_mine.xml

@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="123dp"
+        android:layout_alignParentTop="true"
+        android:background="@drawable/bg_mine" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_marginTop="93dp"
+        android:background="@drawable/bg_mine_list"
+        android:gravity="top|center"
+        android:orientation="vertical">
+
+        <TextView
+            android:id="@+id/tv_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="55dp"
+            android:text="夏秋雨"
+            android:textColor="#ff343434"
+            android:textSize="22sp"
+            android:textStyle="bold" />
+
+        <com.dd.ShadowLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="3dp"
+            android:background="#ffffff"
+            app:sl_cornerRadius="12dp"
+            app:sl_dx="0dp"
+            app:sl_dy="6dp"
+            app:sl_shadowColor="#14000000"
+            app:sl_shadowRadius="12dp">
+
+            <LinearLayout
+                android:layout_width="335dp"
+                android:layout_height="80dp"
+                android:background="@drawable/bg_order_menu"
+                android:gravity="center"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:id="@+id/ll_no_pay"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:src="@mipmap/into_icon_daifukuan" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="6dp"
+                        android:text="未付款"
+                        android:textColor="#ff000000"
+                        android:textSize="12sp" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:id="@+id/ll_doing"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:src="@mipmap/into_icon_jinxingzhong" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="6dp"
+                        android:text="进行中"
+                        android:textColor="#ff000000"
+                        android:textSize="12sp" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:id="@+id/ll_done"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:src="@mipmap/into_icon_yiwancheng" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="6dp"
+                        android:text="已完成"
+                        android:textColor="#ff000000"
+                        android:textSize="12sp" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="1dp"
+                    android:layout_height="30dp"
+                    android:layout_marginLeft="6dp"
+                    android:layout_marginRight="6dp"
+                    android:background="#F2F4F5" />
+
+                <LinearLayout
+                    android:id="@+id/ll_all"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:src="@mipmap/into_icon_quanbu" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="6dp"
+                        android:text="全部订单"
+                        android:textColor="#ff000000"
+                        android:textSize="12sp" />
+                </LinearLayout>
+            </LinearLayout>
+
+        </com.dd.ShadowLayout>
+
+        <ScrollView
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_marginTop="8dp"
+            android:layout_weight="1">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:id="@+id/ll_wallet"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:gravity="left|center"
+                    android:orientation="horizontal">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:layout_marginLeft="20dp"
+                        android:src="@mipmap/into_icon_qianbao" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:layout_weight="1"
+                        android:text="我的钱包"
+                        android:textColor="#000000"
+                        android:textSize="15sp" />
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_marginRight="20dp"
+                        android:src="@mipmap/icon_inter" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="1dp"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:background="#F2F4F5" />
+
+                <LinearLayout
+                    android:id="@+id/ll_video_order"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:gravity="left|center"
+                    android:orientation="horizontal">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:layout_marginLeft="20dp"
+                        android:src="@mipmap/into_icon_shipin" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:layout_weight="1"
+                        android:text="视频订单"
+                        android:textColor="#000000"
+                        android:textSize="15sp" />
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_marginRight="20dp"
+                        android:src="@mipmap/icon_inter" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="1dp"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:background="#F2F4F5" />
+
+                <LinearLayout
+                    android:id="@+id/ll_share"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:gravity="left|center"
+                    android:orientation="horizontal">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:layout_marginLeft="20dp"
+                        android:src="@mipmap/into_icon_yaoqing" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:layout_weight="1"
+                        android:text="推广奖励"
+                        android:textColor="#000000"
+                        android:textSize="15sp" />
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_marginRight="20dp"
+                        android:src="@mipmap/icon_inter" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="1dp"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:background="#F2F4F5" />
+
+                <LinearLayout
+                    android:id="@+id/ll_about"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:gravity="left|center"
+                    android:orientation="horizontal">
+
+                    <ImageView
+                        android:layout_width="30dp"
+                        android:layout_height="30dp"
+                        android:layout_marginLeft="20dp"
+                        android:src="@mipmap/into_icon_lianxikefu" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="15dp"
+                        android:layout_weight="1"
+                        android:text="联系我们"
+                        android:textColor="#000000"
+                        android:textSize="15sp" />
+
+                    <ImageView
+                        android:layout_width="20dp"
+                        android:layout_height="20dp"
+                        android:layout_marginRight="20dp"
+                        android:src="@mipmap/icon_inter" />
+                </LinearLayout>
+
+            </LinearLayout>
+        </ScrollView>
+    </LinearLayout>
+
+    <RelativeLayout
+        android:layout_width="86dp"
+        android:layout_height="86dp"
+        android:layout_alignParentTop="true"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="50dp"
+        android:background="@drawable/bg_avatar">
+
+        <ImageView
+            android:id="@+id/iv_avatar"
+            android:layout_width="70dp"
+            android:scaleType="centerCrop"
+            android:layout_height="70dp"
+            android:layout_centerInParent="true"
+            android:src="@mipmap/def_head" />
+    </RelativeLayout>
+
+    <ImageView
+        android:id="@+id/iv_settings"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentRight="true"
+        android:layout_marginTop="35dp"
+        android:layout_marginRight="10dp"
+        android:padding="10dp"
+        android:src="@mipmap/into_icon_shezhi_baise" />
+</RelativeLayout>

BIN
app/src/main/res/mipmap-xhdpi/icon_inter.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_daifukuan.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_jinxingzhong.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_lianxikefu.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_qianbao.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_quanbu.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_shezhi_baise.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_shipin.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_yaoqing.png


BIN
app/src/main/res/mipmap-xhdpi/into_icon_yiwancheng.png


BIN
app/src/main/res/mipmap-xxhdpi/icon_inter.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_daifukuan.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_jinxingzhong.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_lianxikefu.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_qianbao.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_quanbu.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_shezhi_baise.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_shipin.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_yaoqing.png


BIN
app/src/main/res/mipmap-xxhdpi/into_icon_yiwancheng.png


BIN
app/src/main/res/mipmap-xxxhdpi/icon_inter.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_daifukuan.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_jinxingzhong.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_lianxikefu.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_qianbao.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_quanbu.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_shezhi_baise.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_shipin.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_yaoqing.png


BIN
app/src/main/res/mipmap-xxxhdpi/into_icon_yiwancheng.png


+ 1 - 1
app/src/main/res/values/colors.xml

@@ -2,7 +2,7 @@
 <resources>
     <color name="colorPrimary">#00000000</color>
     <color name="colorPrimaryDark">#00000000</color>
-    <color name="colorAccent">#00000000</color>
+    <color name="colorAccent">#FF4081</color>
 
 
     <color name="transparent">#00000000</color>

+ 2 - 2
build.gradle

@@ -2,8 +2,8 @@
 
 buildscript {
     repositories {
-        jcenter()
         google()
+        jcenter()
         mavenCentral()
         maven { url "https://jitpack.io" }
     }
@@ -17,8 +17,8 @@ buildscript {
 
 allprojects {
     repositories {
-        jcenter()
         google()
+        jcenter()
         mavenCentral()
         maven { url "https://jitpack.io" }
     }

+ 0 - 0
gradlew