Sfoglia il codice sorgente

完成附近的人,我的发布快讯,个人详情页

Junqin Wang 8 anni fa
parent
commit
5ce7a3ac2e
58 ha cambiato i file con 2449 aggiunte e 474 eliminazioni
  1. 7 1
      app/AndroidManifest.xml
  2. BIN
      app/res/drawable-hdpi/ic_action_search.png
  3. BIN
      app/res/drawable-hdpi/ico_trash.png
  4. BIN
      app/res/drawable-hdpi/mine_user_info_banner.png
  5. BIN
      app/res/drawable-mdpi/ic_action_search.png
  6. BIN
      app/res/drawable-mdpi/ico_trash.png
  7. BIN
      app/res/drawable-mdpi/mine_user_info_banner.png
  8. BIN
      app/res/drawable-xhdpi/ic_action_search.png
  9. BIN
      app/res/drawable-xhdpi/ico_trash.png
  10. BIN
      app/res/drawable-xhdpi/mine_user_info_banner.png
  11. BIN
      app/res/drawable-xxhdpi/ic_action_search.png
  12. BIN
      app/res/drawable-xxhdpi/ico_trash.png
  13. BIN
      app/res/drawable-xxhdpi/mine_user_info_banner.png
  14. BIN
      app/res/drawable-xxxhdpi/ic_action_search.png
  15. BIN
      app/res/drawable-xxxhdpi/ico_trash.png
  16. BIN
      app/res/drawable-xxxhdpi/mine_user_info_banner.png
  17. 17 0
      app/res/drawable/btn_rc_green.xml
  18. 18 0
      app/res/drawable/btn_rc_transparent.xml
  19. 6 3
      app/res/layout/base_toolbar.xml
  20. 50 0
      app/res/layout/item_mine_nearby_people.xml
  21. 1 1
      app/res/layout/mine_fragment.xml
  22. 27 0
      app/res/layout/mine_neaby_poeple.xml
  23. 333 20
      app/res/layout/mine_personal_settings.xml
  24. 193 0
      app/res/layout/mine_settings.xml
  25. 33 0
      app/res/layout/mine_trade.xml
  26. 257 0
      app/res/layout/mine_user_info_details.xml
  27. 2 1
      app/res/layout/team_message_activity.xml
  28. 21 0
      app/res/layout/team_settings_activity.xml
  29. 1 0
      app/res/layout/trade_list_item.xml
  30. 4 2
      app/res/menu/team_chat_menu.xml
  31. 4 0
      app/res/menu/trade_menu.xml
  32. 0 4
      app/res/values-v19/styles-activity.xml
  33. 3 2
      app/res/values/styles-activity.xml
  34. 19 0
      app/src/com/sheishuo/app/cache/MineSocialCache.java
  35. 32 0
      app/src/com/sheishuo/app/cache/SocialInfoCache.java
  36. 0 331
      app/src/com/sheishuo/app/common/beans/SocialBean.java
  37. 304 0
      app/src/com/sheishuo/app/common/beans/SocialInfoBean.java
  38. 72 0
      app/src/com/sheishuo/app/common/beans/SocialPhoto.java
  39. 3 0
      app/src/com/sheishuo/app/common/util/net/INet.java
  40. 126 3
      app/src/com/sheishuo/app/common/util/net/NetImpl.java
  41. 2 1
      app/src/com/sheishuo/app/common/util/net/NetInfo.java
  42. 1 4
      app/src/com/sheishuo/app/common/views/BaseToolbar.java
  43. 9 0
      app/src/com/sheishuo/app/core_module/mine/model/SocialBeanModel.java
  44. 137 0
      app/src/com/sheishuo/app/core_module/mine/view/adapter/NearbyPeopleAdapter.java
  45. 129 0
      app/src/com/sheishuo/app/core_module/mine/view/ui/activity/MineTradeActivity.java
  46. 98 0
      app/src/com/sheishuo/app/core_module/mine/view/ui/activity/NearbyPeopleActivity.java
  47. 153 0
      app/src/com/sheishuo/app/core_module/mine/view/ui/activity/PersonalSettingsActivity.java
  48. 238 0
      app/src/com/sheishuo/app/core_module/mine/view/ui/activity/UserInfoDetailActivity.java
  49. 0 10
      app/src/com/sheishuo/app/core_module/social_info/model/SocialBeanModel.java
  50. 0 39
      app/src/com/sheishuo/app/core_module/social_info/view/ui/activity/PersonalSettingsActivity.java
  51. 0 1
      app/src/com/sheishuo/app/core_module/trade/presenter/TradePresenter.java
  52. 29 17
      app/src/com/sheishuo/app/core_module/trade/view/adapter/TradeItemAdapter.java
  53. 2 1
      app/src/com/sheishuo/app/impl/SheishuoTeamMessageActivity.java
  54. 14 0
      app/src/com/sheishuo/app/impl/SheishuoUI.java
  55. 83 22
      app/src/com/sheishuo/app/main/fragment/MineFragment.java
  56. 7 3
      app/src/com/sheishuo/app/main/fragment/TradeListFragment.java
  57. 7 1
      app/src/com/sheishuo/app/session/SessionHelper.java
  58. 7 7
      uikit/uikit.iml

+ 7 - 1
app/AndroidManifest.xml

@@ -127,7 +127,13 @@
             android:theme="@style/AppTheme.NoActionBar"/>
 
         <!--我的 相关-->
-        <activity android:name=".core_module.social_info.view.ui.activity.PersonalSettingsActivity"
+        <activity android:name=".core_module.mine.view.ui.activity.PersonalSettingsActivity"
+            android:theme="@style/AppTheme.NoActionBar"/>
+        <activity android:name=".core_module.mine.view.ui.activity.NearbyPeopleActivity"
+            android:theme="@style/AppTheme.NoActionBar"/>
+        <activity android:name=".core_module.mine.view.ui.activity.UserInfoDetailActivity"
+            android:theme="@style/AppTheme.NoActionBar"/>
+        <activity android:name=".core_module.mine.view.ui.activity.MineTradeActivity"
             android:theme="@style/AppTheme.NoActionBar"/>
 
         <!--交易帖相关Activity-->

BIN
app/res/drawable-hdpi/ic_action_search.png


BIN
app/res/drawable-hdpi/ico_trash.png


BIN
app/res/drawable-hdpi/mine_user_info_banner.png


BIN
app/res/drawable-mdpi/ic_action_search.png


BIN
app/res/drawable-mdpi/ico_trash.png


BIN
app/res/drawable-mdpi/mine_user_info_banner.png


BIN
app/res/drawable-xhdpi/ic_action_search.png


BIN
app/res/drawable-xhdpi/ico_trash.png


BIN
app/res/drawable-xhdpi/mine_user_info_banner.png


BIN
app/res/drawable-xxhdpi/ic_action_search.png


BIN
app/res/drawable-xxhdpi/ico_trash.png


BIN
app/res/drawable-xxhdpi/mine_user_info_banner.png


BIN
app/res/drawable-xxxhdpi/ic_action_search.png


BIN
app/res/drawable-xxxhdpi/ico_trash.png


BIN
app/res/drawable-xxxhdpi/mine_user_info_banner.png


+ 17 - 0
app/res/drawable/btn_rc_green.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_pressed="false">
+        <shape android:shape="rectangle">
+            <corners android:radius="15dp"/>
+            <solid android:color="@color/green_4DC0A4" />
+        </shape>
+    </item>
+    <item android:state_pressed="true">
+        <shape>
+            <corners android:radius="15dp" />
+            <stroke android:width="1dp" />
+        </shape>
+    </item>
+
+</selector>

+ 18 - 0
app/res/drawable/btn_rc_transparent.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_pressed="false">
+        <shape android:shape="rectangle">
+            <corners android:radius="15dp"/>
+            <stroke android:width="1dp"/>
+        </shape>
+    </item>
+    <item android:state_pressed="true">
+        <shape>
+            <corners android:radius="15dp" />
+            <solid android:width="1dp"
+                android:color="@color/colorPrimary" />
+        </shape>
+    </item>
+
+</selector>

+ 6 - 3
app/res/layout/base_toolbar.xml

@@ -1,15 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content">
+    android:layout_height="wrap_content"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <android.support.v7.widget.Toolbar
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         style="@style/fullToolbarStyle"
-        android:background="@color/colorPrimary">
+        android:background="@color/colorPrimary"
+        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+        app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
         <ImageView
-            android:id="@+id/toolbar_index_ico"
+            android:id="@+id/toolbar_location_ico"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:src="@drawable/location"

+ 50 - 0
app/res/layout/item_mine_nearby_people.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:padding="16dp"
+    android:background="@color/white">
+
+    <com.netease.nim.uikit.common.ui.imageview.HeadImageView
+        android:id="@+id/item_mine_neaby_people_avatar"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        app:layout_constraintTop_toTopOf="parent"
+        android:layout_marginTop="8dp"
+        android:layout_marginLeft="8dp"
+        app:layout_constraintLeft_toLeftOf="parent"
+        android:src="@drawable/nim_avatar_default"/>
+
+    <TextView
+        android:id="@+id/item_mine_neaby_people_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="用户名"
+        app:layout_constraintTop_toTopOf="@+id/item_mine_neaby_people_avatar"
+        android:layout_marginTop="0dp"
+        app:layout_constraintLeft_toRightOf="@+id/item_mine_neaby_people_avatar"
+        android:layout_marginLeft="9dp" />
+
+    <TextView
+        android:id="@+id/item_mine_neaby_people_bio"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textColor="@color/grey_light_light"
+        android:layout_marginTop="8dp"
+        app:layout_constraintTop_toBottomOf="@+id/item_mine_neaby_people_name"
+        android:layout_marginLeft="0dp"
+        app:layout_constraintLeft_toLeftOf="@+id/item_mine_neaby_people_name" />
+
+    <TextView
+        android:id="@+id/item_mine_neaby_people_distance"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="距离"
+        android:textColor="@color/grey_light_light"
+        android:layout_marginRight="8dp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent"
+        android:layout_marginTop="8dp" />
+</android.support.constraint.ConstraintLayout>

+ 1 - 1
app/res/layout/mine_fragment.xml

@@ -175,7 +175,7 @@
                         android:layout_marginLeft="8dp"
                         android:layout_marginStart="8dp"
                         android:layout_weight="7"
-                        android:text="我的便民帖"
+                        android:text="我的快讯"
                         android:textStyle="bold" />
 
                     <ImageView

+ 27 - 0
app/res/layout/mine_neaby_poeple.xml

@@ -0,0 +1,27 @@
+<?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:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <android.support.design.widget.AppBarLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:background="@color/colorPrimary">
+        <com.sheishuo.app.common.views.BaseToolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/action_bar_height"
+            android:title="附近的人"
+            app:left_text="返回"
+            style="@style/fullToolbarStyle"/>
+    </android.support.design.widget.AppBarLayout>
+
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/nearby_people_recyclerview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+</LinearLayout>

+ 333 - 20
app/res/layout/mine_personal_settings.xml

@@ -1,36 +1,349 @@
 <?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:orientation="vertical"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
     <android.support.design.widget.AppBarLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+
         <com.sheishuo.app.common.views.BaseToolbar
+            android:id="@+id/toolbar"
+            style="@style/fullToolbarStyle"
             android:layout_width="match_parent"
             android:layout_height="@dimen/action_bar_height"
             android:title="设置"
-            app:left_text="返回"
-            style="@style/fullToolbarStyle"/>
+            app:left_text="返回" />
     </android.support.design.widget.AppBarLayout>
 
-    <LinearLayout
+
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:padding="16dp"
-        android:orientation="horizontal">
-        <TextView
-            android:layout_weight="9"
-            android:layout_width="0dp"
+        android:layout_height="wrap_content">
+
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:text="头像"
-            android:layout_gravity="center_vertical"/>
-
-        <!--官方给定长宽-->
-        <com.netease.nim.uikit.common.ui.widget.SwitchButton
-            android:layout_width="58dip"
-            android:layout_height="36.67dp"
-            android:layout_gravity="end"/>
-    </LinearLayout>
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:id="@+id/personal_settings_avatar_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="头像" />
+
+                <!--官方给定长宽-->
+                <!--<com.netease.nim.uikit.common.ui.widget.SwitchButton-->
+                <!--android:layout_width="58dip"-->
+                <!--android:layout_height="36.67dp"-->
+                <!--android:layout_gravity="end"/>-->
+                <com.netease.nim.uikit.common.ui.imageview.HeadImageView
+                    android:id="@+id/personal_settings_avatar_img"
+                    android:layout_width="48dp"
+                    android:layout_height="48dp"
+                    android:src="@drawable/nim_avatar_default" />
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
+                    android:src="@drawable/right_arrow" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+            <LinearLayout
+                android:id="@+id/personal_settings_nickname_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="昵称" />
+
+                <TextView
+                    android:id="@+id/personal_settings_nickname_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="昵称" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+            <LinearLayout
+                android:id="@+id/personal_settings_gender_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="性别" />
+
+                <TextView
+                    android:id="@+id/personal_settings_gender_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="性别" />
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
+                    android:src="@drawable/right_arrow" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+            <LinearLayout
+                android:id="@+id/personal_settings_location_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="地区" />
+
+                <TextView
+                    android:id="@+id/personal_settings_location_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="地区" />
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
+                    android:src="@drawable/right_arrow" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+            <LinearLayout
+                android:id="@+id/personal_settings_age_is_public_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="是否公开年龄" />
+
+                <com.netease.nim.uikit.common.ui.widget.SwitchButton
+                    android:id="@+id/personal_settings_age_is_public_switch"
+                    android:layout_width="58dp"
+                    android:layout_height="36.67dp"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+
+            <LinearLayout
+                android:id="@+id/personal_settings_age_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="年龄" />
+
+                <TextView
+                    android:id="@+id/personal_settings_age_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="年龄" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+
+            <LinearLayout
+                android:id="@+id/personal_settings_hobby_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="兴趣爱好" />
+
+                <TextView
+                    android:id="@+id/personal_settings_hobby_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="兴趣爱好" />
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
+                    android:src="@drawable/right_arrow" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/grey_light_light"
+                android:padding="8dp"
+                android:text="实名认证" />
+
+            <LinearLayout
+                android:id="@+id/personal_settings_real_name_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="姓名" />
+
+                <TextView
+                    android:id="@+id/personal_settings_real_name_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="姓名" />
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
+                    android:src="@drawable/right_arrow" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+
+            <LinearLayout
+                android:id="@+id/personal_settings_ID_num_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:padding="16dp">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_weight="9"
+                    android:text="身份证" />
+
+                <TextView
+                    android:id="@+id/personal_settings_ID_num_TV"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:src="@drawable/nim_avatar_default"
+                    android:text="身份证" />
+
+                <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginStart="4dp"
+                    android:src="@drawable/right_arrow" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light" />
+        </LinearLayout>
+
+    </ScrollView>
+
 </LinearLayout>

+ 193 - 0
app/res/layout/mine_settings.xml

@@ -0,0 +1,193 @@
+<?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:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/grey_light_light">
+
+    <android.support.design.widget.AppBarLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <com.sheishuo.app.common.views.BaseToolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/action_bar_height"
+            android:title="设置"
+            app:left_text="返回"/>
+    </android.support.design.widget.AppBarLayout>
+
+    <LinearLayout
+        android:id="@+id/personal_settings_security_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="16dp"
+        android:background="@color/white">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_weight="9"
+            android:text="账户与安全" />
+
+        <TextView
+            android:id="@+id/personal_settings_security_TV"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:src="@drawable/nim_avatar_default"
+            android:text="安全等级高" />
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
+            android:src="@drawable/right_arrow" />
+
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/grey_light_light" />
+    <LinearLayout
+        android:id="@+id/personal_settings_notify_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="16dp"
+        android:background="@color/white">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_weight="9"
+            android:text="消息通知" />
+
+        <TextView
+            android:id="@+id/personal_settings_notify_TV"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:src="@drawable/nim_avatar_default"
+            android:text="消息通知" />
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
+            android:src="@drawable/right_arrow" />
+
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/grey_light_light" />
+    <LinearLayout
+        android:id="@+id/personal_settings_privacy_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="16dp"
+        android:background="@color/white">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_weight="9"
+            android:text="隐私" />
+
+
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
+            android:src="@drawable/right_arrow" />
+
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/grey_light_light" />
+    <LinearLayout
+        android:id="@+id/personal_settings_feedback_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="16dp"
+        android:background="@color/white">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_weight="9"
+            android:text="帮助与反馈" />
+
+
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
+            android:src="@drawable/right_arrow" />
+
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/grey_light_light" />
+
+    <LinearLayout
+        android:id="@+id/personal_settings_about_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="16dp"
+        android:background="@color/white"
+        android:layout_marginTop="8dp">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_weight="9"
+            android:text="关于谁说" />
+
+
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_marginStart="4dp"
+            android:src="@drawable/right_arrow" />
+
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/grey_light_light" />
+
+    <Button
+        android:id="@+id/mine_settings_quit_btn"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="退出登录"
+        android:textColor="@color/white"
+        android:background="@drawable/btn1_selector"
+        android:layout_margin="8dp"/>
+</LinearLayout>

+ 33 - 0
app/res/layout/mine_trade.xml

@@ -0,0 +1,33 @@
+<?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"
+    xmlns:tab="http://schemas.android.com/tools"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <android.support.design.widget.AppBarLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <com.sheishuo.app.common.views.BaseToolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/action_bar_height"
+            style="@style/fullToolbarStyle"
+            app:title="我的快讯"/>
+    </android.support.design.widget.AppBarLayout>
+
+    <android.support.design.widget.TabLayout
+        android:id="@+id/mine_trade_tab_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        tab:tabTextColor="@color/colorPrimary"
+        tab:tabSelectedTextColor="@color/colorAccent"
+        tab:tabMode="fixed"/>
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/mine_trade_recyclerview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+</LinearLayout>

+ 257 - 0
app/res/layout/mine_user_info_details.xml

@@ -0,0 +1,257 @@
+<?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:fitsSystemWindows="true"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:id="@+id/user_info_details_banner_layout"
+                android:layout_width="match_parent"
+                android:layout_height="200dp"
+                android:background="@drawable/mine_user_info_banner"
+                android:orientation="vertical">
+
+                <android.support.design.widget.CoordinatorLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="24dp"
+                    android:paddingTop="24dp">
+
+                    <com.netease.nim.uikit.common.ui.imageview.HeadImageView
+                        android:id="@+id/user_info_details_avatar"
+                        android:layout_width="96dp"
+                        android:layout_height="96dp"
+                        android:layout_gravity="center"
+                        android:src="@drawable/nim_avatar_default" />
+
+                    <ImageView
+                        android:id="@+id/user_info_details_gender"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="8dp"
+                        android:src="@drawable/mine_gender_male"
+                        app:layout_anchor="@id/user_info_details_avatar"
+                        app:layout_anchorGravity="end|bottom" />
+
+                </android.support.design.widget.CoordinatorLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:id="@+id/user_info_details_name"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="用户昵称"
+                        android:textSize="18sp"
+                        android:textColor="@color/white"/>
+
+                    <TextView
+                        android:id="@+id/user_info_details_id"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="用户ID"
+                        android:textColor="@color/white"/>
+
+
+                </LinearLayout>
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_horizontal"
+                android:orientation="horizontal"
+                android:padding="8dp">
+
+                <Button
+                    android:id="@+id/user_info_details_follow_btn"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="8dp"
+                    android:layout_marginStart="8dp"
+                    android:background="@drawable/btn_rc_transparent"
+                    android:text="关注" />
+
+                <Button
+                    android:id="@+id/user_info_details_chat_btn"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="8dp"
+                    android:layout_marginStart="8dp"
+                    android:background="@drawable/btn_rc_transparent"
+                    android:text="发消息" />
+
+                <Button
+                    android:id="@+id/user_info_details_send_gift_btn"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="8dp"
+                    android:layout_marginStart="8dp"
+                    android:background="@drawable/btn_rc_green"
+                    android:text="送礼物"
+                    android:textColor="@color/white" />
+            </LinearLayout>
+
+            <GridLayout
+                android:id="@+id/user_info_details_personal_photos_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:columnCount="4"
+                android:visibility="gone">
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:src="@drawable/ico_add_grey" />
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:layout_rowWeight="1" />
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:layout_rowWeight="1" />
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:layout_rowWeight="1" />
+            </GridLayout>
+
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="8dp"
+                android:layout_marginStart="8dp"
+                android:text="动态"
+                android:textSize="16sp"
+                android:paddingTop="8dp"
+                android:paddingBottom="8dp"/>
+
+            <GridLayout
+                android:id="@+id/user_info_details_tweet_photos_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:columnCount="4"
+                android:visibility="gone">
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:src="@drawable/ico_add_grey" />
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:layout_rowWeight="1" />
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:layout_rowWeight="1" />
+
+                <ImageView
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_columnWeight="1"
+                    android:layout_rowWeight="1" />
+            </GridLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center_vertical"
+                android:padding="8dp"
+                android:background="@color/white">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="年龄: "
+                    android:textSize="16sp"/>
+                <TextView
+                    android:id="@+id/user_info_details_age"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/grey_light"
+                    android:textSize="16sp"
+                    android:text="年龄已保密"/>
+
+            </LinearLayout>
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light"/>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center_vertical"
+                android:padding="8dp"
+                android:background="@color/white">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="爱好: "
+                    android:textSize="16sp"/>
+                <TextView
+                    android:id="@+id/user_info_details_hobby"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/grey_light"
+                    android:textSize="16sp"
+                    android:text="暂无爱好"/>
+            </LinearLayout>
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/grey_light_light"/>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center_vertical"
+                android:padding="8dp"
+                android:background="@color/white">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="地址: "
+                    android:textSize="16sp"/>
+                <TextView
+                    android:id="@+id/user_info_details_location"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/grey_light"
+                    android:textSize="16sp"/>
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+</LinearLayout>

+ 2 - 1
app/res/layout/nim_team_message_activity.xml → app/res/layout/team_message_activity.xml

@@ -17,7 +17,8 @@
             android:layout_width="match_parent"
             android:layout_height="?attr/actionBarSize"
             android:background="?attr/colorPrimary"
-            app:titleTextAppearance="@style/Toolbar.TitleText" />
+            app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+            app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
     </android.support.design.widget.AppBarLayout>
 
     <RelativeLayout

+ 21 - 0
app/res/layout/team_settings_activity.xml

@@ -0,0 +1,21 @@
+<?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:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <android.support.design.widget.AppBarLayout
+        android:id="@+id/app_bar_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:theme="@style/AppTheme.AppBarOverlay"
+        app:elevation="0dp"
+        android:orientation="horizontal">
+        <com.sheishuo.app.common.views.BaseToolbar
+            android:id="@+id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"
+            android:background="?attr/colorPrimary"
+            app:titleTextAppearance="@style/Toolbar.TitleText" />
+    </android.support.design.widget.AppBarLayout>
+</LinearLayout>

+ 1 - 0
app/res/layout/trade_list_item.xml

@@ -36,6 +36,7 @@
             android:layout_marginTop="16dp"
             android:layout_marginRight="16dp"
             app:layout_constraintRight_toRightOf="parent" />
+
         <TextView
             android:id="@+id/trade_list_item_name"
             android:layout_width="wrap_content"

+ 4 - 2
app/res/menu/team_chat_menu.xml

@@ -3,8 +3,10 @@
     xmlns:app="http://schemas.android.com/apk/res-auto">
     <item android:id="@+id/team_chat_menu_search"
         android:title="搜索"
-        app:showAsAction="ifRoom"/>
+        app:showAsAction="always"
+        android:icon="@drawable/ic_action_search"/>
     <item android:id="@+id/team_chat_menu_clear_chat_history"
         android:title="清空聊天记录"
-        app:showAsAction="ifRoom"/>
+        app:showAsAction="always"
+        android:icon="@drawable/ico_trash"/>
 </menu>

+ 4 - 0
app/res/menu/trade_menu.xml

@@ -2,6 +2,10 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
+    <item android:id="@+id/trade_menu_search"
+        android:title="搜索"
+        android:icon="@drawable/ic_action_search"
+        app:showAsAction="ifRoom"/>
     <item android:title="筛选"
         android:id="@+id/trade_menu_filter"
         app:showAsAction="always">

+ 0 - 4
app/res/values-v19/styles-activity.xml

@@ -1,10 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <style name="AppTheme.NoActionBar">
-        <item name="windowActionBar">false</item>
-        <item name="windowNoTitle">true</item>
-    </style>
 
 
 

+ 3 - 2
app/res/values/styles-activity.xml

@@ -12,10 +12,11 @@
     </style>
 
     <!-- Global NoActionbar-->
-    <style name="AppTheme.NoActionBar">
+    <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar">
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
-        <item name="colorPrimary">@color/transparent</item>
+        <item name="colorPrimary">@color/colorPrimary</item>
+        <item name="android:colorPrimaryDark">@color/colorPrimary</item>
     </style>
 
 

+ 19 - 0
app/src/com/sheishuo/app/cache/MineSocialCache.java

@@ -0,0 +1,19 @@
+package com.sheishuo.app.cache;
+
+import com.sheishuo.app.common.beans.SocialInfoBean;
+
+/**
+ * Created by KN on 2017/8/20.
+ */
+
+public class MineSocialCache {
+    private static SocialInfoBean info;
+
+    public static SocialInfoBean getInfo() {
+        return info;
+    }
+
+    public static void setInfo(SocialInfoBean info) {
+        MineSocialCache.info = info;
+    }
+}

+ 32 - 0
app/src/com/sheishuo/app/cache/SocialInfoCache.java

@@ -0,0 +1,32 @@
+package com.sheishuo.app.cache;
+
+import com.sheishuo.app.common.beans.SocialInfoBean;
+import com.sheishuo.app.common.util.net.INet;
+import com.sheishuo.app.common.util.net.NetImpl;
+import com.sheishuo.app.common.util.net.ResponseCallback;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by KN on 2017/8/21.
+ */
+
+public class SocialInfoCache {
+    private static INet net = new NetImpl();
+    private static Map<String,SocialInfoBean> socialInfoMap = new HashMap<>();
+
+
+    public static void put(String id,SocialInfoBean info){
+        socialInfoMap.put(id,info);
+    }
+
+    public static SocialInfoBean get(String id){
+        if (socialInfoMap.containsKey(id)){
+            return socialInfoMap.get(id);
+        }
+        return null;
+    }
+
+}
+

+ 0 - 331
app/src/com/sheishuo/app/common/beans/SocialBean.java

@@ -1,331 +0,0 @@
-package com.sheishuo.app.common.beans;
-
-import java.util.List;
-
-/**
- * Created by KN on 2017/8/8.
- */
-
-public class SocialBean {
-
-
-    /**
-     * c : 0
-     * d : {"id":"200030","pwd":"e10adc3949ba59abbe56e057f20f883e","nick":"","mobile":"18523545395","coin":"1100","room_id":"0","latitude":"37.785834","longitude":"-122.406417","province":"重庆市","city":"重庆市","district":"北碚区","social_bg_aid":"0","create_time":"2017-07-13 17:11:53","user_id":"200030","age":"0","show_age":"1","real_name":"","id_number":"","social_banner":"","add_verify":"0","find_mobile":"0","find_id":"0","find_nick":"0","see_social":"0","effect":"0","hobby":"","address":"","follow":0,"photos":[]}
-     */
-
-    private int c;
-    private DBean d;
-
-    public int getC() {
-        return c;
-    }
-
-    public void setC(int c) {
-        this.c = c;
-    }
-
-    public DBean getD() {
-        return d;
-    }
-
-    public void setD(DBean d) {
-        this.d = d;
-    }
-
-    public static class DBean {
-        /**
-         * id : 200030
-         * pwd : e10adc3949ba59abbe56e057f20f883e
-         * nick :
-         * mobile : 18523545395
-         * coin : 1100
-         * room_id : 0
-         * latitude : 37.785834
-         * longitude : -122.406417
-         * province : 重庆市
-         * city : 重庆市
-         * district : 北碚区
-         * social_bg_aid : 0
-         * create_time : 2017-07-13 17:11:53
-         * user_id : 200030
-         * age : 0
-         * show_age : 1
-         * real_name :
-         * id_number :
-         * social_banner :
-         * add_verify : 0
-         * find_mobile : 0
-         * find_id : 0
-         * find_nick : 0
-         * see_social : 0
-         * effect : 0
-         * hobby :
-         * address :
-         * follow : 0
-         * photos : []
-         */
-
-        private String id;
-        private String pwd;
-        private String nick;
-        private String mobile;
-        private String coin;
-        private String room_id;
-        private String latitude;
-        private String longitude;
-        private String province;
-        private String city;
-        private String district;
-        private String social_bg_aid;
-        private String create_time;
-        private String user_id;
-        private String age;
-        private String show_age;
-        private String real_name;
-        private String id_number;
-        private String social_banner;
-        private String add_verify;
-        private String find_mobile;
-        private String find_id;
-        private String find_nick;
-        private String see_social;
-        private String effect;
-        private String hobby;
-        private String address;
-        private int follow;
-        private List<?> photos;
-
-        public String getId() {
-            return id;
-        }
-
-        public void setId(String id) {
-            this.id = id;
-        }
-
-        public String getPwd() {
-            return pwd;
-        }
-
-        public void setPwd(String pwd) {
-            this.pwd = pwd;
-        }
-
-        public String getNick() {
-            return nick;
-        }
-
-        public void setNick(String nick) {
-            this.nick = nick;
-        }
-
-        public String getMobile() {
-            return mobile;
-        }
-
-        public void setMobile(String mobile) {
-            this.mobile = mobile;
-        }
-
-        public String getCoin() {
-            return coin;
-        }
-
-        public void setCoin(String coin) {
-            this.coin = coin;
-        }
-
-        public String getRoom_id() {
-            return room_id;
-        }
-
-        public void setRoom_id(String room_id) {
-            this.room_id = room_id;
-        }
-
-        public String getLatitude() {
-            return latitude;
-        }
-
-        public void setLatitude(String latitude) {
-            this.latitude = latitude;
-        }
-
-        public String getLongitude() {
-            return longitude;
-        }
-
-        public void setLongitude(String longitude) {
-            this.longitude = longitude;
-        }
-
-        public String getProvince() {
-            return province;
-        }
-
-        public void setProvince(String province) {
-            this.province = province;
-        }
-
-        public String getCity() {
-            return city;
-        }
-
-        public void setCity(String city) {
-            this.city = city;
-        }
-
-        public String getDistrict() {
-            return district;
-        }
-
-        public void setDistrict(String district) {
-            this.district = district;
-        }
-
-        public String getSocial_bg_aid() {
-            return social_bg_aid;
-        }
-
-        public void setSocial_bg_aid(String social_bg_aid) {
-            this.social_bg_aid = social_bg_aid;
-        }
-
-        public String getCreate_time() {
-            return create_time;
-        }
-
-        public void setCreate_time(String create_time) {
-            this.create_time = create_time;
-        }
-
-        public String getUser_id() {
-            return user_id;
-        }
-
-        public void setUser_id(String user_id) {
-            this.user_id = user_id;
-        }
-
-        public String getAge() {
-            return age;
-        }
-
-        public void setAge(String age) {
-            this.age = age;
-        }
-
-        public String getShow_age() {
-            return show_age;
-        }
-
-        public void setShow_age(String show_age) {
-            this.show_age = show_age;
-        }
-
-        public String getReal_name() {
-            return real_name;
-        }
-
-        public void setReal_name(String real_name) {
-            this.real_name = real_name;
-        }
-
-        public String getId_number() {
-            return id_number;
-        }
-
-        public void setId_number(String id_number) {
-            this.id_number = id_number;
-        }
-
-        public String getSocial_banner() {
-            return social_banner;
-        }
-
-        public void setSocial_banner(String social_banner) {
-            this.social_banner = social_banner;
-        }
-
-        public String getAdd_verify() {
-            return add_verify;
-        }
-
-        public void setAdd_verify(String add_verify) {
-            this.add_verify = add_verify;
-        }
-
-        public String getFind_mobile() {
-            return find_mobile;
-        }
-
-        public void setFind_mobile(String find_mobile) {
-            this.find_mobile = find_mobile;
-        }
-
-        public String getFind_id() {
-            return find_id;
-        }
-
-        public void setFind_id(String find_id) {
-            this.find_id = find_id;
-        }
-
-        public String getFind_nick() {
-            return find_nick;
-        }
-
-        public void setFind_nick(String find_nick) {
-            this.find_nick = find_nick;
-        }
-
-        public String getSee_social() {
-            return see_social;
-        }
-
-        public void setSee_social(String see_social) {
-            this.see_social = see_social;
-        }
-
-        public String getEffect() {
-            return effect;
-        }
-
-        public void setEffect(String effect) {
-            this.effect = effect;
-        }
-
-        public String getHobby() {
-            return hobby;
-        }
-
-        public void setHobby(String hobby) {
-            this.hobby = hobby;
-        }
-
-        public String getAddress() {
-            return address;
-        }
-
-        public void setAddress(String address) {
-            this.address = address;
-        }
-
-        public int getFollow() {
-            return follow;
-        }
-
-        public void setFollow(int follow) {
-            this.follow = follow;
-        }
-
-        public List<?> getPhotos() {
-            return photos;
-        }
-
-        public void setPhotos(List<?> photos) {
-            this.photos = photos;
-        }
-    }
-}

+ 304 - 0
app/src/com/sheishuo/app/common/beans/SocialInfoBean.java

@@ -0,0 +1,304 @@
+package com.sheishuo.app.common.beans;
+
+import java.util.List;
+
+/**
+ * Created by KN on 2017/8/20.
+ */
+
+public class SocialInfoBean {
+
+    /**
+     * id : 200030
+     * pwd : e10adc3949ba59abbe56e057f20f883e
+     * nick :
+     * mobile : 18523545395
+     * coin : 940
+     * room_id : 0
+     * latitude : 37.421998333333335
+     * longitude : -122.08400000000002
+     * province : 山东省
+     * city : 威海市
+     * district : 环翠区
+     * social_bg_aid : 0
+     * create_time : 2017-07-13 17:11:53
+     * user_id : 200030
+     * age : 0
+     * show_age : 1
+     * real_name :
+     * id_number :
+     * social_banner :
+     * add_verify : 0
+     * find_mobile : 0
+     * find_id : 0
+     * find_nick : 0
+     * see_social : 0
+     * effect : 0
+     * hobby :
+     * address :
+     * follow : 0
+     * photos : []
+     */
+
+    private String id;
+    private String pwd;
+    private String nick;
+    private String mobile;
+    private String coin;
+    private String room_id;
+    private String latitude;
+    private String longitude;
+    private String province;
+    private String city;
+    private String district;
+    private String social_bg_aid;
+    private String create_time;
+    private String user_id;
+    private String age;
+    private String show_age;
+    private String real_name;
+    private String id_number;
+    private String social_banner;
+    private String add_verify;
+    private String find_mobile;
+    private String find_id;
+    private String find_nick;
+    private String see_social;
+    private String effect;
+    private String hobby;
+    private String address;
+    private int follow;
+    private List<SocialPhoto> photos;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getPwd() {
+        return pwd;
+    }
+
+    public void setPwd(String pwd) {
+        this.pwd = pwd;
+    }
+
+    public String getNick() {
+        return nick;
+    }
+
+    public void setNick(String nick) {
+        this.nick = nick;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getCoin() {
+        return coin;
+    }
+
+    public void setCoin(String coin) {
+        this.coin = coin;
+    }
+
+    public String getRoom_id() {
+        return room_id;
+    }
+
+    public void setRoom_id(String room_id) {
+        this.room_id = room_id;
+    }
+
+    public String getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(String latitude) {
+        this.latitude = latitude;
+    }
+
+    public String getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(String longitude) {
+        this.longitude = longitude;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getDistrict() {
+        return district;
+    }
+
+    public void setDistrict(String district) {
+        this.district = district;
+    }
+
+    public String getSocial_bg_aid() {
+        return social_bg_aid;
+    }
+
+    public void setSocial_bg_aid(String social_bg_aid) {
+        this.social_bg_aid = social_bg_aid;
+    }
+
+    public String getCreate_time() {
+        return create_time;
+    }
+
+    public void setCreate_time(String create_time) {
+        this.create_time = create_time;
+    }
+
+    public String getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(String user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getAge() {
+        return age;
+    }
+
+    public void setAge(String age) {
+        this.age = age;
+    }
+
+    public String getShow_age() {
+        return show_age;
+    }
+
+    public void setShow_age(String show_age) {
+        this.show_age = show_age;
+    }
+
+    public String getReal_name() {
+        return real_name;
+    }
+
+    public void setReal_name(String real_name) {
+        this.real_name = real_name;
+    }
+
+    public String getId_number() {
+        return id_number;
+    }
+
+    public void setId_number(String id_number) {
+        this.id_number = id_number;
+    }
+
+    public String getSocial_banner() {
+        return social_banner;
+    }
+
+    public void setSocial_banner(String social_banner) {
+        this.social_banner = social_banner;
+    }
+
+    public String getAdd_verify() {
+        return add_verify;
+    }
+
+    public void setAdd_verify(String add_verify) {
+        this.add_verify = add_verify;
+    }
+
+    public String getFind_mobile() {
+        return find_mobile;
+    }
+
+    public void setFind_mobile(String find_mobile) {
+        this.find_mobile = find_mobile;
+    }
+
+    public String getFind_id() {
+        return find_id;
+    }
+
+    public void setFind_id(String find_id) {
+        this.find_id = find_id;
+    }
+
+    public String getFind_nick() {
+        return find_nick;
+    }
+
+    public void setFind_nick(String find_nick) {
+        this.find_nick = find_nick;
+    }
+
+    public String getSee_social() {
+        return see_social;
+    }
+
+    public void setSee_social(String see_social) {
+        this.see_social = see_social;
+    }
+
+    public String getEffect() {
+        return effect;
+    }
+
+    public void setEffect(String effect) {
+        this.effect = effect;
+    }
+
+    public String getHobby() {
+        return hobby;
+    }
+
+    public void setHobby(String hobby) {
+        this.hobby = hobby;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public int getFollow() {
+        return follow;
+    }
+
+    public void setFollow(int follow) {
+        this.follow = follow;
+    }
+
+    public List<SocialPhoto> getPhotos() {
+        return photos;
+    }
+
+    public void setPhotos(List<SocialPhoto> photos) {
+        this.photos = photos;
+    }
+}

+ 72 - 0
app/src/com/sheishuo/app/common/beans/SocialPhoto.java

@@ -0,0 +1,72 @@
+package com.sheishuo.app.common.beans;
+
+/**
+ * Created by KN on 2017/8/21.
+ */
+
+public class SocialPhoto {
+
+    /**
+     * id : 42
+     * user_id : 200031
+     * aid : 415
+     * inputtime : 2017-08-11 19:59:56
+     * pic : http://whosay.dashgame.com/uploadfile/2017/0811/20170811075956884.jpg
+     * thumb : http://whosay.dashgame.com/uploadfile/2017/0811/thumb_128_128_20170811075956884.jpg
+     */
+
+    private String id;
+    private String user_id;
+    private String aid;
+    private String inputtime;
+    private String pic;
+    private String thumb;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(String user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getInputtime() {
+        return inputtime;
+    }
+
+    public void setInputtime(String inputtime) {
+        this.inputtime = inputtime;
+    }
+
+    public String getPic() {
+        return pic;
+    }
+
+    public void setPic(String pic) {
+        this.pic = pic;
+    }
+
+    public String getThumb() {
+        return thumb;
+    }
+
+    public void setThumb(String thumb) {
+        this.thumb = thumb;
+    }
+}

+ 3 - 0
app/src/com/sheishuo/app/common/util/net/INet.java

@@ -20,4 +20,7 @@ public interface INet {
     void uploadCircleImgs(String filePath, ResponseCallback callback);
     void getSocialInfo(String targetID,ResponseCallback callback);
     void getCityDataList(ResponseCallback callback);
+    void getNearbyPeople(String userId,String page,ResponseCallback callback);
+    void getCircleList(String targetId,String lastId,ResponseCallback callback);
+    void getTradeList(int type,int page,ResponseCallback callback);
 }

+ 126 - 3
app/src/com/sheishuo/app/common/util/net/NetImpl.java

@@ -3,10 +3,13 @@ package com.sheishuo.app.common.util.net;
 import android.util.Log;
 
 import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
 import com.sheishuo.app.cache.AccountCache;
+import com.sheishuo.app.cache.SocialInfoCache;
 import com.sheishuo.app.common.beans.CircleBean;
 import com.sheishuo.app.common.beans.GiftBean;
-import com.sheishuo.app.common.beans.SocialBean;
+import com.sheishuo.app.common.beans.SocialInfoBean;
+import com.sheishuo.app.common.beans.TradeBean;
 import com.sheishuo.app.common.util.location.LocationHelper;
 import com.sheishuo.app.login.beans.LoginBean;
 
@@ -306,8 +309,20 @@ public class NetImpl implements INet {
                     if (200 == response.code()) {
 
                         String result = response.body().string();
-                        SocialBean bean = new Gson().fromJson(result, SocialBean.class);
-                        callback.onSuccess(bean);
+                        try {
+                            String jsonStr = new JSONObject(result).getJSONObject("d").toString();
+                            Log.e("jsonStr",jsonStr);
+                            SocialInfoBean bean = new Gson().fromJson(jsonStr, SocialInfoBean.class);
+                            //更新缓存
+                            SocialInfoCache.put(bean.getId(),bean);
+
+                            callback.onSuccess(bean);
+
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                            callback.onFailed();
+                        }
+
 
 
                     } else {
@@ -349,5 +364,113 @@ public class NetImpl implements INet {
         }).start();
     }
 
+    @Override
+    public void getNearbyPeople(final String userId, final String page, final ResponseCallback callback) {
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                FormBody body = new FormBody.Builder()
+                        .add("user_id",userId)
+                        .add("page",page)
+                        .build();
+
+                Request request = new Request.Builder()
+                        .url(NetInfo.NEARBY_PEOPLE)
+                        .post(body)
+                        .build();
+
+                try{
+                    Response response = client.newCall(request).execute();
+                    if (200 == response.code()){
+                        String result = response.body().string();
+                        Log.e("result",result);
+                        callback.onSuccess(result);
+                    }else {
+                        callback.onFailed();
+                    }
+
+                }catch (Exception e){
+                    e.printStackTrace();
+                    callback.onFailed();
+                }
+
+            }
+        }).start();
+    }
+
+    @Override
+    public void getCircleList(final String targetId, final String lastId, final ResponseCallback callback) {
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+
+                FormBody body = new FormBody.Builder()
+                        .add("user_id",AccountCache.getAccount().getId())
+                        .add("last_id",lastId)
+                        .add("target_id",targetId)
+                        .build();
+
+                Request request = new Request.Builder()
+                        .url(NetInfo.CIRCLE_LIST)
+                        .post(body)
+                        .build();
+
+
+                try{
+                    Response response = client.newCall(request).execute();
+                    if (200 ==  response.code()){
+                        CircleBean bean = new Gson().fromJson(response.body().string(),CircleBean.class);
+                        callback.onSuccess(bean);
+                    }else {
+                        callback.onFailed();
+                    }
+                }catch (Exception e){
+                    e.printStackTrace();
+                    callback.onFailed();
+                }
+
+            }
+        }).start();
+    }
+
+    @Override
+    public void getTradeList(int type, int page, final ResponseCallback callback) {
+        final FormBody body = new FormBody.Builder()
+                .add("user_id", AccountCache.getAccount().getId())
+                .add("province", AccountCache.getAccount().getProvince())
+                .add("page", String.valueOf(page))
+                .add("sort", String.valueOf(type))
+                .build();
+
+        final Request request = new Request.Builder()
+                .url(NetInfo.TRADE_LIST)
+                .post(body)
+                .build();
+
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    Response response = client.newCall(request).execute();
+                    if (200 == response.code()){
+                        String json = response.body().string();
+                        TradeBean bean = new Gson().fromJson(json,TradeBean.class);
+                        if (0 != bean.getD().getList().size()){
+                            callback.onSuccess(bean);
+                        }else {
+                            callback.onFailed();
+                        }
+                    }else{
+                        callback.onFailed();
+                    }
+
+                }catch (Exception e){
+                    e.printStackTrace();
+                    callback.onFailed();
+                }
+            }
+        }).start();
+    }
+
 
 }

+ 2 - 1
app/src/com/sheishuo/app/common/util/net/NetInfo.java

@@ -18,8 +18,9 @@ public class NetInfo {
     public final static String TRADE_LIST = INDEX + "?m=who&c=trade&a=lists";
     public final static String FOLLOW_TRADE = INDEX + "?m=who&c=trade&a=follow";
     public final static String UNFOLLOW_TRADE = INDEX + "?m=who&c=trade&a=delete_follow";
-    public final static String GET_SOCIAL_INFO = INDEX + "?m=who&c=index&a=gift_list";
+    public final static String GET_SOCIAL_INFO = INDEX + "?m=who&c=social&a=get_user";
     public final static String GET_CITY_DATA = "https://junqin.wang/API/sheishuo/cityData.json";
     public final static String RESET_LOCATION_BY_DISTRICT= INDEX + "?m=who&c=index&a=reset_location";
     public final static String UPDATE_LATITUDE_AND_LONGITUDE = INDEX + "?m=who&c=index&a=coordinate_2_location";
+    public final static String NEARBY_PEOPLE = INDEX + "?m=who&c=index&a=near_user";
 }

+ 1 - 4
app/src/com/sheishuo/app/common/views/BaseToolbar.java

@@ -1,7 +1,6 @@
 package com.sheishuo.app.common.views;
 
 import android.content.Context;
-import android.support.annotation.ColorInt;
 import android.support.annotation.Nullable;
 import android.support.v7.widget.Toolbar;
 import android.util.AttributeSet;
@@ -20,8 +19,6 @@ import com.sheishuo.app.common.util.img.ImgUtil;
 import java.util.ArrayList;
 import java.util.List;
 
-import okhttp3.FormBody;
-
 /**
  * Created by KN on 2017/7/20.
  */
@@ -76,7 +73,7 @@ public class BaseToolbar extends Toolbar {
         rightTV = (TextView) view.findViewById(R.id.toolbar_right);
         icoLayout = (LinearLayout) view.findViewById(R.id.toolbar_ico_layout);
         toolbarLayout = (FrameLayout) view.findViewById(R.id.toolbar_layout);
-        indexIco = (ImageView) view.findViewById(R.id.toolbar_index_ico);
+        indexIco = (ImageView) view.findViewById(R.id.toolbar_location_ico);
     }
 
 

+ 9 - 0
app/src/com/sheishuo/app/core_module/mine/model/SocialBeanModel.java

@@ -0,0 +1,9 @@
+package com.sheishuo.app.core_module.mine.model;
+
+/**
+ * Created by KN on 2017/8/8.
+ */
+
+public class SocialBeanModel {
+
+}

+ 137 - 0
app/src/com/sheishuo/app/core_module/mine/view/adapter/NearbyPeopleAdapter.java

@@ -0,0 +1,137 @@
+package com.sheishuo.app.core_module.mine.view.adapter;
+
+import android.content.Context;
+import android.support.annotation.Nullable;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.netease.nim.uikit.NimUIKit;
+import com.netease.nim.uikit.common.ui.imageview.HeadImageView;
+import com.netease.nimlib.sdk.NIMClient;
+import com.netease.nimlib.sdk.RequestCallback;
+import com.netease.nimlib.sdk.uinfo.UserService;
+import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
+import com.sheishuo.app.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by KN on 2017/8/20.
+ */
+
+public class NearbyPeopleAdapter extends RecyclerView.Adapter<NearbyPeopleAdapter.NearbyPeopleViewHolder>{
+
+    List<NearbyPeople> data = new ArrayList<>();
+    Context context;
+
+    public NearbyPeopleAdapter(Context context){
+        this.context = context;
+    }
+
+    @Override
+    public NearbyPeopleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_mine_nearby_people,parent,false);
+        return new NearbyPeopleViewHolder(view);
+    }
+
+    @Override
+    public void onBindViewHolder(NearbyPeopleViewHolder holder, int position) {
+        NearbyPeople people = data.get(position);
+
+        if (NIMClient.getService(UserService.class).getUserInfo(people.getId()).getAvatar() != null) {
+            Glide.with(context)
+                    .load(NIMClient.getService(UserService.class).getUserInfo(people.getId()).getAvatar())
+                    .placeholder(R.drawable.nim_avatar_default)
+                    .into(holder.avatar);
+        }
+
+
+        holder.name.setText(getName(people.getId()));
+
+        holder.distance.setText("相距" + people.getDist() + "米");
+    }
+
+    @Override
+    public int getItemCount() {
+        return data.size();
+    }
+
+
+    public void addNearbyPeople(final List<NearbyPeople> list){
+
+        List<String> userIds = new ArrayList<>();
+        for (NearbyPeople nearbyPeople : list){
+            userIds.add(nearbyPeople.getId());
+        }
+        NIMClient.getService(UserService.class).fetchUserInfo(userIds).setCallback(new RequestCallback<List<NimUserInfo>>() {
+            @Override
+            public void onSuccess(List<NimUserInfo> nimUserInfos) {
+                data.addAll(list);
+                notifyDataSetChanged();
+            }
+
+            @Override
+            public void onFailed(int i) {
+
+            }
+
+            @Override
+            public void onException(Throwable throwable) {
+
+            }
+        });
+
+    }
+
+
+    private String getName(String id){
+        NimUserInfo user = NIMClient.getService(UserService.class).getUserInfo(id);
+        if (!user.getName().isEmpty()) return user.getName();
+
+        return id;
+    }
+
+
+
+
+
+    class NearbyPeopleViewHolder extends RecyclerView.ViewHolder{
+        private HeadImageView avatar;
+        private TextView name,bio,distance;
+        public NearbyPeopleViewHolder(View itemView) {
+            super(itemView);
+            avatar = (HeadImageView) itemView.findViewById(R.id.item_mine_neaby_people_avatar);
+            name = (TextView) itemView.findViewById(R.id.item_mine_neaby_people_name);
+            bio = (TextView) itemView.findViewById(R.id.item_mine_neaby_people_bio);
+            distance = (TextView) itemView.findViewById(R.id.item_mine_neaby_people_distance);
+
+        }
+    }
+
+
+    public class NearbyPeople{
+        private String id;
+        private String dist;
+
+        public String getId() {
+            return id;
+        }
+
+        public void setId(String id) {
+            this.id = id;
+        }
+
+        public String getDist() {
+            return dist;
+        }
+
+        public void setDist(String dist) {
+            this.dist = dist;
+        }
+    }
+}

+ 129 - 0
app/src/com/sheishuo/app/core_module/mine/view/ui/activity/MineTradeActivity.java

@@ -0,0 +1,129 @@
+package com.sheishuo.app.core_module.mine.view.ui.activity;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.design.widget.TabLayout;
+import android.support.v4.view.ViewPager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+
+import com.sheishuo.app.R;
+import com.sheishuo.app.common.beans.TradeBean;
+import com.sheishuo.app.common.util.net.INet;
+import com.sheishuo.app.common.util.net.NetImpl;
+import com.sheishuo.app.common.util.net.ResponseCallback;
+import com.sheishuo.app.common.views.BaseToolbar;
+import com.sheishuo.app.core_module.trade.model.TradeModel;
+import com.sheishuo.app.core_module.trade.view.adapter.TradeItemAdapter;
+import com.sheishuo.app.impl.SheishuoUI;
+
+/**
+ * Created by KN on 2017/8/21.
+ */
+
+public class MineTradeActivity extends SheishuoUI {
+
+    private String TAG = this.getClass().getSimpleName();
+    private Context context = this;
+
+    private BaseToolbar toolbar;
+
+    private TabLayout tabLayout;
+
+    private RecyclerView recyclerView;
+
+    private TradeItemAdapter adapter;
+
+    private LinearLayoutManager layoutManager = new LinearLayoutManager(context);
+
+    public int  PAGE_TO_LOAD = 1;
+
+    public int TYPE_TO_LOAD = TradeModel.TYPE_MINE;
+
+    private INet net = new NetImpl();
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.mine_trade);
+        findViews();
+        init();
+    }
+
+
+    void findViews(){
+        toolbar = findView(R.id.toolbar);
+        tabLayout = findView(R.id.mine_trade_tab_layout);
+        recyclerView = findView(R.id.mine_trade_recyclerview);
+    }
+
+    void init(){
+        tabLayout.addTab(tabLayout.newTab().setText("我的发布"));
+        tabLayout.addTab(tabLayout.newTab().setText("我的关注"));
+        recyclerView.setLayoutManager(layoutManager);
+
+
+        getTradeList(TYPE_TO_LOAD,PAGE_TO_LOAD);
+
+        tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
+            @Override
+            public void onTabSelected(TabLayout.Tab tab) {
+                int position = tab.getPosition();
+
+                switch (position){
+                    case 0:
+                        PAGE_TO_LOAD = 1;
+                        TYPE_TO_LOAD = TradeModel.TYPE_MINE;
+                        getTradeList(TYPE_TO_LOAD,PAGE_TO_LOAD);
+                        break;
+                    case 1:
+                        PAGE_TO_LOAD = 1;
+                        TYPE_TO_LOAD = TradeModel.TYPE_CONCERN;
+                        getTradeList(TYPE_TO_LOAD,PAGE_TO_LOAD);
+                        break;
+                }
+            }
+
+            @Override
+            public void onTabUnselected(TabLayout.Tab tab) {
+
+            }
+
+            @Override
+            public void onTabReselected(TabLayout.Tab tab) {
+
+            }
+        });
+    }
+
+
+
+    public void getTradeList(int type,int page){
+        net.getTradeList(type, page, new ResponseCallback() {
+            @Override
+            public void onSuccess(Object object) {
+                final TradeBean bean = (TradeBean) object;
+                getHandler().post(new Runnable() {
+                    @Override
+                    public void run() {
+                        if (adapter == null){
+                            adapter = new TradeItemAdapter(MineTradeActivity.this,bean);
+                            recyclerView.setAdapter(adapter);
+                        }else {
+                            adapter.addAll(bean);
+                        }
+
+                        PAGE_TO_LOAD++;
+                    }
+                });
+            }
+
+            @Override
+            public void onFailed() {
+                showToast(context,"已无更多内容加载");
+            }
+        });
+    }
+
+
+}

+ 98 - 0
app/src/com/sheishuo/app/core_module/mine/view/ui/activity/NearbyPeopleActivity.java

@@ -0,0 +1,98 @@
+package com.sheishuo.app.core_module.mine.view.ui.activity;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.View;
+import android.widget.LinearLayout;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.sheishuo.app.R;
+import com.sheishuo.app.cache.AccountCache;
+import com.sheishuo.app.common.util.net.INet;
+import com.sheishuo.app.common.util.net.NetImpl;
+import com.sheishuo.app.common.util.net.ResponseCallback;
+import com.sheishuo.app.common.views.BaseToolbar;
+import com.sheishuo.app.core_module.mine.view.adapter.NearbyPeopleAdapter;
+import com.sheishuo.app.impl.SheishuoUI;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.List;
+
+/**
+ * Created by KN on 2017/8/20.
+ */
+
+public class NearbyPeopleActivity extends SheishuoUI{
+
+    private String TAG = this.getClass().getSimpleName();
+    private Context context = this;
+
+    private BaseToolbar toolbar;
+    private RecyclerView recyclerView;
+    private LinearLayoutManager layoutManager = new LinearLayoutManager(context);
+    private NearbyPeopleAdapter adapter = new NearbyPeopleAdapter(context);
+
+
+    private INet net = new NetImpl();
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.mine_neaby_poeple);
+        findViews();
+        init();
+    }
+
+    void findViews(){
+        toolbar = findView(R.id.toolbar);
+        recyclerView = findView(R.id.nearby_people_recyclerview);
+    }
+
+    void init(){
+        toolbar.getLeftTV().setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                NearbyPeopleActivity.this.finish();
+            }
+        });
+
+        recyclerView.setLayoutManager(layoutManager);
+        recyclerView.setAdapter(adapter);
+
+        net.getNearbyPeople(AccountCache.getAccount().getId(), "1", new ResponseCallback() {
+            @Override
+            public void onSuccess(Object object) {
+                try {
+                    String jsonStr = new JSONObject((String) object).getJSONObject("d").getJSONArray("list").toString();
+                    Log.e(TAG,jsonStr);
+                    final List<NearbyPeopleAdapter.NearbyPeople> list
+                            = new Gson().fromJson(jsonStr, new TypeToken<List<NearbyPeopleAdapter.NearbyPeople>>(){}.getType());
+
+                    getHandler().post(new Runnable() {
+                        @Override
+                        public void run() {
+                            adapter.addNearbyPeople(list);
+                        }
+                    });
+
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                    showToast(context,"附近的人加载失败");
+                }
+            }
+
+            @Override
+            public void onFailed() {
+                showToast(context,"附近的人加载失败");
+            }
+        });
+    }
+
+
+
+}

+ 153 - 0
app/src/com/sheishuo/app/core_module/mine/view/ui/activity/PersonalSettingsActivity.java

@@ -0,0 +1,153 @@
+package com.sheishuo.app.core_module.mine.view.ui.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.netease.nim.uikit.common.ui.imageview.HeadImageView;
+import com.netease.nim.uikit.common.ui.widget.SwitchButton;
+import com.netease.nimlib.sdk.NIMClient;
+import com.netease.nimlib.sdk.uinfo.UserService;
+import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
+import com.sheishuo.app.R;
+import com.sheishuo.app.cache.AccountCache;
+import com.sheishuo.app.cache.MineSocialCache;
+import com.sheishuo.app.common.beans.SocialInfoBean;
+import com.sheishuo.app.common.views.BaseToolbar;
+import com.sheishuo.app.impl.SheishuoUI;
+
+/**
+ * Created by KN on 2017/8/10.
+ */
+
+public class PersonalSettingsActivity extends SheishuoUI {
+
+
+    private String TAG = this.getClass().getSimpleName();
+    private Context context = this;
+
+
+    private BaseToolbar toolbar;
+
+    private LinearLayout avatarLayout
+            ,nicknameLayout
+            ,genderLayout
+            ,locationLayout
+            ,ageLayout
+            ,hobbyLayout
+            ,realNameLayout
+            ,idNumLayout;
+
+    private TextView nicknameTV
+            ,genderTV
+            ,locationTV
+            ,ageTV
+            ,hobbyTV
+            ,realNameTV
+            ,idNumTV;
+
+    private HeadImageView avatarImg;
+
+    private SwitchButton ageIsPublicSwitch;
+
+
+
+    public static void start(Context context){
+        start(context,null);
+    }
+
+    public static void start(Context context , Intent data){
+        Intent intent = new Intent();
+        intent.setClass(context, PersonalSettingsActivity.class);
+        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        if (data != null) {
+            intent.putExtras(data);
+        }
+        context.startActivity(intent);
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.mine_personal_settings);
+        findViews();
+        init();
+
+    }
+
+
+
+    void findViews(){
+        toolbar = findView(R.id.toolbar);
+
+        avatarLayout = findView(R.id.personal_settings_avatar_layout);
+        nicknameLayout = findView(R.id.personal_settings_nickname_layout);
+        genderLayout = findView(R.id.personal_settings_gender_layout);
+        locationLayout = findView(R.id.personal_settings_location_layout);
+        ageLayout = findView(R.id.personal_settings_age_layout);
+        hobbyLayout = findView(R.id.personal_settings_hobby_layout);
+        realNameLayout = findView(R.id.personal_settings_real_name_layout);
+        idNumLayout = findView(R.id.personal_settings_ID_num_layout);
+
+        nicknameTV = findView(R.id.personal_settings_nickname_TV);
+        genderTV = findView(R.id.personal_settings_gender_TV);
+        locationTV = findView(R.id.personal_settings_location_TV);
+        ageTV = findView(R.id.personal_settings_age_TV);
+        hobbyTV = findView(R.id.personal_settings_hobby_TV);
+        realNameTV = findView(R.id.personal_settings_real_name_TV);
+        idNumTV = findView(R.id.personal_settings_ID_num_TV);
+
+        avatarImg = findView(R.id.personal_settings_avatar_img);
+
+        ageIsPublicSwitch = findView(R.id.personal_settings_age_is_public_switch);
+    }
+
+    void init(){
+
+        toolbar.getLeftTV().setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                PersonalSettingsActivity.this.finish();
+            }
+        });
+
+        SocialInfoBean me = MineSocialCache.getInfo();
+        NimUserInfo userInfo = NIMClient.getService(UserService.class)
+                .getUserInfo(AccountCache.getAccount().getId());
+
+        if (!userInfo.getAvatar().isEmpty()){
+            Glide.with(context)
+                    .load(userInfo.getAvatar())
+                    .into(avatarImg);
+        }
+
+        nicknameTV.setText(getName(AccountCache.getAccount().getId()));
+
+        //暂无性别
+
+        locationTV.setText(me.getCity() + " " + me.getDistrict());
+
+        if (me.getShow_age().equals("1")){
+            ageIsPublicSwitch.setCheck(true);
+        }
+
+        if (!me.getAge().isEmpty()) ageTV.setText(me.getAge());
+
+        if (!me.getHobby().isEmpty()) hobbyTV.setText(me.getHobby().substring(0,6));
+
+        if (!me.getReal_name().isEmpty()) realNameTV.setText(me.getReal_name());
+
+        if (!me.getId_number().isEmpty()) idNumTV.setText(me.getId_number());
+    }
+
+
+
+
+
+}

+ 238 - 0
app/src/com/sheishuo/app/core_module/mine/view/ui/activity/UserInfoDetailActivity.java

@@ -0,0 +1,238 @@
+package com.sheishuo.app.core_module.mine.view.ui.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+import android.widget.GridLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.netease.nim.uikit.common.ui.imageview.HeadImageView;
+import com.netease.nimlib.sdk.NIMClient;
+import com.netease.nimlib.sdk.RequestCallback;
+import com.netease.nimlib.sdk.uinfo.UserService;
+import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
+import com.sheishuo.app.R;
+import com.sheishuo.app.cache.SocialInfoCache;
+import com.sheishuo.app.common.beans.CircleBean;
+import com.sheishuo.app.common.beans.SocialInfoBean;
+import com.sheishuo.app.common.util.net.INet;
+import com.sheishuo.app.common.util.net.NetImpl;
+import com.sheishuo.app.common.util.net.ResponseCallback;
+import com.sheishuo.app.impl.SheishuoUI;
+import com.sheishuo.app.session.SessionHelper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by KN on 2017/8/21.
+ */
+
+public class UserInfoDetailActivity extends SheishuoUI {
+
+    public final static String USER_ID = "5005";
+
+    private String TAG = this.getClass().getSimpleName();
+    private Context context = this;
+
+    private HeadImageView avatar;
+
+    private TextView nameTV, idTV, ageTV, hobbyTV, locationTV;
+
+    private Button followBtn, chatBtn, sendGiftBtn;
+
+    private GridLayout personalPhotosLayout, tweetPhotosLayout;
+
+    private INet net = new NetImpl();
+
+    private String userId = "";
+
+    public static void start(Context context, String account) {
+        Intent intent = new Intent();
+        intent.setClass(context, UserInfoDetailActivity.class);
+        intent.putExtra(UserInfoDetailActivity.USER_ID, account);
+        intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        context.startActivity(intent);
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.mine_user_info_details);
+        userId = getIntent().getStringExtra(USER_ID);
+        findViews();
+        init();
+    }
+
+
+    void findViews() {
+        avatar = findView(R.id.user_info_details_avatar);
+
+        nameTV = findView(R.id.user_info_details_name);
+        idTV = findView(R.id.user_info_details_id);
+        ageTV = findView(R.id.user_info_details_age);
+        hobbyTV = findView(R.id.user_info_details_hobby);
+        locationTV = findView(R.id.user_info_details_location);
+
+        followBtn = findView(R.id.user_info_details_follow_btn);
+        chatBtn = findView(R.id.user_info_details_chat_btn);
+        sendGiftBtn = findView(R.id.user_info_details_send_gift_btn);
+
+
+        personalPhotosLayout = findView(R.id.user_info_details_personal_photos_layout);
+        tweetPhotosLayout = findView(R.id.user_info_details_tweet_photos_layout);
+    }
+
+    void init() {
+        if (SocialInfoCache.get(userId) == null) {
+            net.getSocialInfo(userId, new ResponseCallback() {
+                @Override
+                public void onSuccess(Object object) {
+                    getHandler().post(new Runnable() {
+                        @Override
+                        public void run() {
+                            showInfo(userId);
+                        }
+                    });
+                }
+
+                @Override
+                public void onFailed() {
+
+                }
+            });
+        } else {
+            showInfo(userId);
+        }
+
+
+        //关注用户
+        followBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+            }
+        });
+
+        //发送消息
+        chatBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                SessionHelper.startP2PSession(context, userId);
+            }
+        });
+
+
+        //NIMClient.getService(UserService.class).fetchUserInfo()
+    }
+
+
+    public void showInfo(String id) {
+        //展示年龄
+        SocialInfoBean info = SocialInfoCache.get(id);
+        if (info.getShow_age().equals("1")) {
+            ageTV.setText(info.getAge());
+        }
+
+        //展示爱好
+        if (!info.getHobby().isEmpty()) {
+            hobbyTV.setText(info.getHobby());
+        }
+
+        //展示地址
+        locationTV.setText(info.getProvince() + info.getCity() + info.getDistrict());
+
+
+        //展示个性照片墙
+
+        personalPhotosLayout.setVisibility(View.VISIBLE);
+        if (info.getPhotos().size() > 0)
+            Glide.with(context)
+                    .load(info.getPhotos().get(0).getThumb())
+                    .placeholder(R.drawable.nim_avatar_default)
+                    .into((ImageView) personalPhotosLayout.getChildAt(0));
+
+        if (info.getPhotos().size() > 1)
+        Glide.with(context)
+                .load(info.getPhotos().get(1).getThumb())
+                .placeholder(R.drawable.nim_avatar_default)
+                .into((ImageView) personalPhotosLayout.getChildAt(1));
+
+        if (info.getPhotos().size() > 2)
+        Glide.with(context)
+                .load(info.getPhotos().get(2).getThumb())
+                .placeholder(R.drawable.nim_avatar_default)
+                .into((ImageView) personalPhotosLayout.getChildAt(2));
+
+        if (info.getPhotos().size() > 3)
+        Glide.with(context)
+                .load(info.getPhotos().get(3).getThumb())
+                .placeholder(R.drawable.nim_avatar_default)
+                .into((ImageView) personalPhotosLayout.getChildAt(3));
+
+
+        //展示动态照片
+        net.getCircleList(userId, "", new ResponseCallback() {
+            @Override
+            public void onSuccess(Object object) {
+                CircleBean bean = (CircleBean) object;
+                final List<String> circlePhotos = new ArrayList<>();
+                for (CircleBean.DBean.ListBean listItem : bean.getD().getList()) {
+                    circlePhotos.addAll(listItem.getThumbs());
+                }
+
+                getHandler().post(new Runnable() {
+                    @Override
+                    public void run() {
+                        tweetPhotosLayout.setVisibility(View.VISIBLE);
+                        if (circlePhotos.size() > 0) {
+                            for (int i = 0; i < tweetPhotosLayout.getChildCount() && i < circlePhotos.size(); i++) {
+                                Glide.with(context)
+                                        .load(circlePhotos.get(i))
+                                        .into((ImageView) tweetPhotosLayout.getChildAt(0));
+                            }
+                        }
+                    }
+                });
+
+            }
+
+            @Override
+            public void onFailed() {
+                showToast(context, "加载动态失败");
+            }
+        });
+
+
+        //加载头像,昵称,ID
+        List<String> ids = new ArrayList<>();
+        ids.add(userId);
+        NIMClient.getService(UserService.class).fetchUserInfo(ids).setCallback(new RequestCallback<List<NimUserInfo>>() {
+            @Override
+            public void onSuccess(List<NimUserInfo> nimUserInfos) {
+                nameTV.setText(getName(userId));
+                idTV.setText("ID:" + userId);
+
+                if (nimUserInfos.get(0).getAvatar() != null)
+                    Glide.with(context)
+                            .load(nimUserInfos.get(0).getAvatar())
+                            .into(avatar);
+
+            }
+
+            @Override
+            public void onFailed(int i) {
+
+            }
+
+            @Override
+            public void onException(Throwable throwable) {
+
+            }
+        });
+    }
+}

+ 0 - 10
app/src/com/sheishuo/app/core_module/social_info/model/SocialBeanModel.java

@@ -1,10 +0,0 @@
-package com.sheishuo.app.core_module.social_info.model;
-
-import com.sheishuo.app.common.beans.SocialBean;
-
-/**
- * Created by KN on 2017/8/8.
- */
-
-public class SocialBeanModel {
-}

+ 0 - 39
app/src/com/sheishuo/app/core_module/social_info/view/ui/activity/PersonalSettingsActivity.java

@@ -1,39 +0,0 @@
-package com.sheishuo.app.core_module.social_info.view.ui.activity;
-
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-
-import com.sheishuo.app.R;
-import com.sheishuo.app.impl.SheishuoUI;
-
-/**
- * Created by KN on 2017/8/10.
- */
-
-public class PersonalSettingsActivity extends SheishuoUI {
-
-
-    public static void start(Context context){
-        start(context,null);
-    }
-
-    public static void start(Context context , Intent data){
-        Intent intent = new Intent();
-        intent.setClass(context, PersonalSettingsActivity.class);
-        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
-        if (data != null) {
-            intent.putExtras(data);
-        }
-        context.startActivity(intent);
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.mine_personal_settings);
-    }
-
-
-
-}

+ 0 - 1
app/src/com/sheishuo/app/core_module/trade/presenter/TradePresenter.java

@@ -15,7 +15,6 @@ public class TradePresenter {
     public TradePresenter(TradeListFragment fragment){
         this.fragment = fragment;
         model = new TradeModel(this);
-
     }
 
 

+ 29 - 17
app/src/com/sheishuo/app/core_module/trade/view/adapter/TradeItemAdapter.java

@@ -25,6 +25,7 @@ import com.sheishuo.app.common.util.img.ImgUtil;
 import com.sheishuo.app.common.views.GridViewAdapter;
 import com.sheishuo.app.common.views.ImgGridView;
 import com.sheishuo.app.common.views.PartlyHighLightTextView;
+import com.sheishuo.app.core_module.mine.view.ui.activity.MineTradeActivity;
 import com.sheishuo.app.core_module.trade.model.TradeModel;
 import com.sheishuo.app.core_module.trade.view.ui.activity.TradeChangePriorityActivity;
 import com.sheishuo.app.login.beans.LoginBean;
@@ -46,11 +47,16 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
             ,PRIORITY_PROVINCE = "1"
             ,PRIORITY_COUNTRY = "0";
 
+    private boolean IS_IN_MINE_INFO = false;
+
     private List<TradeBean.DBean.ListBean> data;
     private Context context;
     private TradeListFragment fragment;
+    private MineTradeActivity activity;
     private OnTradeItemClickListener listener;
 
+
+
     public TradeItemAdapter(TradeListFragment fragment,TradeBean bean){
         data = new ArrayList<>();
         this.fragment = fragment;
@@ -58,6 +64,15 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
         addAll(bean);
     }
 
+
+    public TradeItemAdapter(MineTradeActivity activity, TradeBean bean){
+        data = new ArrayList<>();
+        this.activity = activity;
+        this.context = activity;
+        addAll(bean);
+        IS_IN_MINE_INFO =true;
+    }
+
     @Override
     public TradeItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
         View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.trade_list_item,parent,false);
@@ -72,6 +87,9 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
         holder.layout.setTag(bean);
         holder.layout.setOnClickListener(this);
 
+        //如果是在我的关注里面打开的,则隐藏添加关注
+        if (IS_IN_MINE_INFO) holder.followImg.setVisibility(View.GONE);
+
         //加载用户头像
         String avatarUrl = NIMClient.getService(UserService.class).getUserInfo(bean.getUser_id()).getAvatar();
         if (avatarUrl != null)
@@ -102,21 +120,8 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
         holder.userName.setText(getUserName(bean.getUser_id()));
         holder.date.setText(bean.getInputtime());
 
-        //判断有无置顶加权
-//        switch (bean.getPriority_type()){
-//            case PRIORITY_DISTRICT:
-//                holder.priority.setText("地区x" + bean.getPriority());
-//                break;
-//            case PRIORITY_CITY:
-//                holder.priority.setText("城市x" + bean.getPriority());
-//                break;
-//            case PRIORITY_PROVINCE:
-//                holder.priority.setText("省份x" + bean.getPriority());
-//                break;
-//            case PRIORITY_COUNTRY:
-//                holder.priority.setText("国家x" + bean.getPriority());
-//                break;
-//        }
+
+        //设置置顶权限
         if (Integer.valueOf(bean.getPriority()) > 0){
             holder.priority.setText("置顶x" + bean.getPriority());
         }
@@ -157,9 +162,16 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
 
 
         //预加载
-        if (position >= data.size() - 1){
-            fragment.loadTradeList(fragment.TYPE_TO_LOAD,fragment.PAGE_TO_LOAD);
+        if (IS_IN_MINE_INFO){
+            if (position >= data.size() - 1){
+                activity.getTradeList(activity.TYPE_TO_LOAD,activity.PAGE_TO_LOAD);
+            }
+        }else {
+            if (position >= data.size() - 1){
+                fragment.loadTradeList(fragment.TYPE_TO_LOAD,fragment.PAGE_TO_LOAD);
+            }
         }
+
     }
 
     @Override

+ 2 - 1
app/src/com/sheishuo/app/impl/SheishuoTeamMessageActivity.java

@@ -142,6 +142,7 @@ public class SheishuoTeamMessageActivity extends TeamMessageActivity {
                     //通知消息更新
                     MessageListPanelHelper.getInstance().notifyClearMessages(team.getId());
 
+
                     showToast("清除消息成功");
                 }
 
@@ -293,7 +294,7 @@ public class SheishuoTeamMessageActivity extends TeamMessageActivity {
 
     @Override
     protected int getContentViewId() {
-        return R.layout.nim_team_message_activity;
+        return R.layout.team_message_activity;
     }
 
 

+ 14 - 0
app/src/com/sheishuo/app/impl/SheishuoUI.java

@@ -12,6 +12,9 @@ import android.widget.FrameLayout;
 import android.widget.Toast;
 
 import com.netease.nim.uikit.common.activity.UI;
+import com.netease.nimlib.sdk.NIMClient;
+import com.netease.nimlib.sdk.uinfo.UserService;
+import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
 import com.sheishuo.app.R;
 
 import static com.netease.nim.uikit.common.util.sys.ScreenUtil.getStatusBarHeight;
@@ -76,5 +79,16 @@ public class SheishuoUI extends UI {
     }
 
 
+    public String getName(String id){
+        NimUserInfo user = NIMClient.getService(UserService.class)
+                .getUserInfo(id);
+        if (!user.getName().isEmpty()){
+            return user.getName();
+        }
+
+        return id;
+    }
+
+
 
 }

+ 83 - 22
app/src/com/sheishuo/app/main/fragment/MineFragment.java

@@ -2,19 +2,17 @@ package com.sheishuo.app.main.fragment;
 
 import android.app.Activity;
 import android.content.Intent;
-import android.graphics.Color;
-import android.os.Build;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.ScrollView;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.bumptech.glide.Glide;
+import com.google.gson.Gson;
 import com.netease.nim.uikit.common.media.picker.PickImageHelper;
 import com.netease.nim.uikit.common.media.picker.model.PhotoInfo;
 import com.netease.nimlib.sdk.NIMClient;
@@ -22,8 +20,16 @@ import com.netease.nimlib.sdk.uinfo.UserInfoProvider;
 import com.netease.nimlib.sdk.uinfo.UserService;
 import com.sheishuo.app.R;
 import com.sheishuo.app.cache.AccountCache;
+import com.sheishuo.app.cache.MineSocialCache;
+import com.sheishuo.app.common.beans.SocialInfoBean;
+import com.sheishuo.app.common.util.net.INet;
+import com.sheishuo.app.common.util.net.NetImpl;
+import com.sheishuo.app.common.util.net.ResponseCallback;
 import com.sheishuo.app.common.views.BaseToolbar;
-import com.sheishuo.app.core_module.social_info.view.ui.activity.PersonalSettingsActivity;
+import com.sheishuo.app.core_module.mine.view.ui.activity.MineTradeActivity;
+import com.sheishuo.app.core_module.mine.view.ui.activity.NearbyPeopleActivity;
+import com.sheishuo.app.core_module.mine.view.ui.activity.PersonalSettingsActivity;
+import com.sheishuo.app.core_module.mine.view.ui.activity.UserInfoDetailActivity;
 import com.sheishuo.app.main.activity.MainActivity;
 
 import java.util.List;
@@ -41,12 +47,12 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
     private ImageView avatarImg,settingsImg,bannerImg,editPhotoImg;
     private TextView usernameTV,userIdTV;
     private LinearLayout neabyPeopleOption,mineTradeOption,settingsOptions;
-
-
+    private Toast toast = null;
+    private INet net = new NetImpl();
 
     //FLAGS
-    public final static int AVATAR_SELECTED = 2000;
-    public final static int BANNER_SELECTED = 2001;
+    public final static int AVATAR_SELECTED = 5000;
+    public final static int BANNER_SELECTED = 5001;
     @Override
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
@@ -87,15 +93,9 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
 
     private void init(){
         initToolbar();
-//        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
-//            Window window = parent.getWindow();
-//            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
-//                    | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
-//            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
-//                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
-//            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
-//            window.setStatusBarColor(Color.TRANSPARENT);
-//        }
+        fetchSocialInfo();
+
+
 
 
         UserInfoProvider.UserInfo user = NIMClient.getService(UserService.class).getUserInfo(AccountCache.getAccount().getId());
@@ -105,6 +105,8 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
         usernameTV.setText(getName(AccountCache.getAccount().getId()));
         userIdTV.setText("ID:" + AccountCache.getAccount().getId());
 
+
+
     }
 
 
@@ -124,13 +126,14 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
     public void setUserVisibleHint(boolean isVisibleToUser) {
         super.setUserVisibleHint(isVisibleToUser);
 
+        if (isVisibleToUser){
+            fetchSocialInfo();
+        }
 
         if (isVisibleToUser && toolbar != null && parent != null){
             initToolbar();
-
-        }else if (parent != null){
-            Log.e(TAG,"setFitsSystemWindows False");
         }
+
     }
 
     @Override
@@ -143,15 +146,22 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
                 pickImage(MineFragment.BANNER_SELECTED);
                 break;
             case R.id.mine_fragment_personal_settings:
-                PersonalSettingsActivity.start(getActivity().getApplicationContext());
+                PersonalSettingsActivity.start(getActivity());
                 break;
             case R.id.mine_fragment_edit_photos_img:
+
                 break;
             case R.id.mine_fragment_nearby_people:
+                startActivity(new Intent(getActivity(), NearbyPeopleActivity.class));
                 break;
             case R.id.mine_fragment_trade:
+                startActivity(new Intent(getActivity(), MineTradeActivity.class));
                 break;
             case R.id.mine_fragment_setting:
+                Intent intent = new Intent(getActivity(), UserInfoDetailActivity.class);
+                intent.putExtra(UserInfoDetailActivity.USER_ID,"200031");
+                startActivity(intent);
+
                 break;
         }
     }
@@ -193,6 +203,21 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
         }
     }
 
+    private void showToast(final String str){
+        getHandler().post(new Runnable() {
+            @Override
+            public void run() {
+                if (toast == null){
+                    toast = Toast.makeText(getActivity(),str,Toast.LENGTH_SHORT);
+                }else {
+                    toast.setText(str);
+                }
+
+                toast.show();
+            }
+        });
+    }
+
     private void pickImage(int requestCode){
         PickImageHelper.PickImageOption option = new PickImageHelper.PickImageOption();
         option.multiSelectMaxCount = 1;
@@ -200,4 +225,40 @@ public class MineFragment extends MainTabFragment implements View.OnClickListene
     }
 
 
+    private void fetchSocialInfo(){
+        net.getSocialInfo(AccountCache.getAccount().getId(), new ResponseCallback() {
+            @Override
+            public void onSuccess(Object object) {
+                updateSocialInfo((SocialInfoBean) object);
+            }
+
+            @Override
+            public void onFailed() {
+                showToast("个人社交资料加载失败");
+            }
+        });
+    }
+
+    //更新个人社交资料
+    private void updateSocialInfo(final SocialInfoBean bean){
+
+        getHandler().post(new Runnable() {
+            @Override
+            public void run() {
+                MineSocialCache.setInfo(bean);
+
+                Log.e(TAG,MineSocialCache.getInfo().getUser_id());
+                //设置banner
+                if (!MineSocialCache.getInfo().getSocial_banner().isEmpty()){
+                    Glide.with(getActivity())
+                            .load(MineSocialCache.getInfo().getSocial_banner())
+                            .into(bannerImg);
+                }
+
+
+            }
+        });
+    }
+
+
 }

+ 7 - 3
app/src/com/sheishuo/app/main/fragment/TradeListFragment.java

@@ -1,5 +1,6 @@
 package com.sheishuo.app.main.fragment;
 
+import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
@@ -12,6 +13,7 @@ import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
+import android.widget.GridLayout;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -46,6 +48,7 @@ public class TradeListFragment extends MainTabFragment {
     private Toast toast;
 
 
+
     //Views
     private LinearLayout notificationLayout;
     private RecyclerView recyclerview;
@@ -74,8 +77,8 @@ public class TradeListFragment extends MainTabFragment {
         super.onCreateOptionsMenu(menu, inflater);
         this.menu = menu;
         inflater.inflate(R.menu.trade_menu,menu);
-        for (int i = 0 ; i < menu.getItem(0).getSubMenu().size() ; i++){
-            menuItems.add(menu.getItem(0).getSubMenu().getItem(i));
+        for (int i = 0 ; i < menu.getItem(1).getSubMenu().size() ; i++){
+            menuItems.add(menu.getItem(1).getSubMenu().getItem(i));
         }
     }
 
@@ -151,7 +154,8 @@ public class TradeListFragment extends MainTabFragment {
 
     private void initToolbar(){
         toolbar.init();
-        toolbar.setTitle(R.string.main_tab_trade);
+        toolbar.setTitle("");
+
         toolbar.getIndexIco().setVisibility(View.VISIBLE);
         toolbar.setLeftText(AccountCache.getAccount().getCity() + AccountCache.getAccount().getDistrict());
         toolbar.getRightTV().setVisibility(View.GONE);

+ 7 - 1
app/src/com/sheishuo/app/session/SessionHelper.java

@@ -11,6 +11,7 @@ import android.widget.Toast;
 import com.netease.nim.uikit.session.extension.GiftAttachment;
 import com.sheishuo.app.SheishuoCache;
 import com.sheishuo.app.contact.activity.UserProfileActivity;
+import com.sheishuo.app.core_module.mine.view.ui.activity.UserInfoDetailActivity;
 import com.sheishuo.app.session.action.AVChatAction;
 import com.sheishuo.app.session.action.FileAction;
 import com.sheishuo.app.session.action.GuessAction;
@@ -413,7 +414,12 @@ public class SessionHelper {
                         return;
                     }
                 }
-                UserProfileActivity.start(context, message.getFromAccount());
+
+                //UserProfileActivity.start(context, message.getFromAccount());
+
+                //Intent intent = new Intent(context, UserInfoDetailActivity.class);
+
+                UserInfoDetailActivity.start(context,message.getFromAccount());
             }
 
             @Override

+ 7 - 7
uikit/uikit.iml

@@ -59,13 +59,6 @@
       <sourceFolder url="file://$MODULE_DIR$/assets" type="java-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
@@ -73,6 +66,13 @@
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
       <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
       <excludeFolder url="file://$MODULE_DIR$/build/.DS_Store" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/.DS_Store" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />