3 Commits 6e53a83b38 ... 90535c903d

Author SHA1 Message Date
  Junqin Wang 90535c903d Merge branch 'master' of http://git.dashgame.com/fenix/sheishuoAPP 8 years ago
  Junqin Wang 330882aee7 sync 8 years ago
  Junqin Wang 3930d25753 bug fix 8 years ago
88 changed files with 1478 additions and 195 deletions
  1. 6 0
      app/AndroidManifest.xml
  2. 7 7
      app/app.iml
  3. BIN
      app/res/drawable-hdpi/mine_edit_photos.png
  4. BIN
      app/res/drawable-hdpi/mine_gender_female.png
  5. BIN
      app/res/drawable-hdpi/mine_gender_male.png
  6. BIN
      app/res/drawable-hdpi/mine_nearby_people.png
  7. BIN
      app/res/drawable-hdpi/mine_settings.png
  8. BIN
      app/res/drawable-hdpi/mine_settings_white.png
  9. BIN
      app/res/drawable-hdpi/mine_trade.png
  10. BIN
      app/res/drawable-hdpi/right_arrow.png
  11. BIN
      app/res/drawable-hdpi/text_shaixuan.png
  12. BIN
      app/res/drawable-mdpi/mine_edit_photos.png
  13. BIN
      app/res/drawable-mdpi/mine_gender_female.png
  14. BIN
      app/res/drawable-mdpi/mine_gender_male.png
  15. BIN
      app/res/drawable-mdpi/mine_nearby_people.png
  16. BIN
      app/res/drawable-mdpi/mine_settings.png
  17. BIN
      app/res/drawable-mdpi/mine_settings_white.png
  18. BIN
      app/res/drawable-mdpi/mine_trade.png
  19. BIN
      app/res/drawable-mdpi/right_arrow.png
  20. BIN
      app/res/drawable-mdpi/text_shaixuan.png
  21. BIN
      app/res/drawable-xhdpi/mine_edit_photos.png
  22. BIN
      app/res/drawable-xhdpi/mine_gender_female.png
  23. BIN
      app/res/drawable-xhdpi/mine_gender_male.png
  24. BIN
      app/res/drawable-xhdpi/mine_nearby_people.png
  25. BIN
      app/res/drawable-xhdpi/mine_settings.png
  26. BIN
      app/res/drawable-xhdpi/mine_settings_white.png
  27. BIN
      app/res/drawable-xhdpi/mine_trade.png
  28. BIN
      app/res/drawable-xhdpi/right_arrow.png
  29. BIN
      app/res/drawable-xhdpi/text_shaixuan.png
  30. BIN
      app/res/drawable-xxhdpi/mine_edit_photos.png
  31. BIN
      app/res/drawable-xxhdpi/mine_gender_female.png
  32. BIN
      app/res/drawable-xxhdpi/mine_gender_male.png
  33. BIN
      app/res/drawable-xxhdpi/mine_nearby_people.png
  34. BIN
      app/res/drawable-xxhdpi/mine_settings.png
  35. BIN
      app/res/drawable-xxhdpi/mine_settings_white.png
  36. BIN
      app/res/drawable-xxhdpi/mine_trade.png
  37. BIN
      app/res/drawable-xxhdpi/right_arrow.png
  38. BIN
      app/res/drawable-xxhdpi/text_shaixuan.png
  39. BIN
      app/res/drawable-xxxhdpi/mine_edit_photos.png
  40. BIN
      app/res/drawable-xxxhdpi/mine_gender_female.png
  41. BIN
      app/res/drawable-xxxhdpi/mine_gender_male.png
  42. BIN
      app/res/drawable-xxxhdpi/mine_nearby_people.png
  43. BIN
      app/res/drawable-xxxhdpi/mine_settings.png
  44. BIN
      app/res/drawable-xxxhdpi/mine_settings_white.png
  45. BIN
      app/res/drawable-xxxhdpi/mine_trade.png
  46. BIN
      app/res/drawable-xxxhdpi/right_arrow.png
  47. BIN
      app/res/drawable-xxxhdpi/text_shaixuan.png
  48. 1 1
      app/res/layout/area_group_item.xml
  49. 2 1
      app/res/layout/area_groups_list_fragment.xml
  50. 9 4
      app/res/layout/base_toolbar.xml
  51. 43 30
      app/res/layout/circle_new_tweeting.xml
  52. 4 4
      app/res/layout/circle_of_friends_fragment.xml
  53. 1 2
      app/res/layout/main.xml
  54. 233 0
      app/res/layout/mine_fragment.xml
  55. 36 0
      app/res/layout/mine_personal_settings.xml
  56. 2 1
      app/res/layout/session_list.xml
  57. 1 1
      app/res/layout/setting_item_base.xml
  58. 0 22
      app/res/layout/toolbar_base.xml
  59. 122 0
      app/res/layout/trade_detail_activity.xml
  60. 2 1
      app/res/layout/trade_list_fragment.xml
  61. 40 0
      app/res/menu/trade_menu.xml
  62. 0 4
      app/res/values-v11/styles-activity.xml
  63. 0 3
      app/res/values-v14/styles-activity.xml
  64. 4 0
      app/res/values-v19/style.xml
  65. 3 0
      app/res/values-v19/styles-activity.xml
  66. 1 0
      app/res/values/strings.xml
  67. 20 0
      app/res/values/style.xml
  68. 6 0
      app/res/values/styles-activity.xml
  69. 14 0
      app/src/com/sheishuo/app/common/beans/CityDataBean.java
  70. 331 0
      app/src/com/sheishuo/app/common/beans/SocialBean.java
  71. 9 0
      app/src/com/sheishuo/app/common/util/location/CityDataHelper.java
  72. 1 1
      app/src/com/sheishuo/app/common/util/net/INet.java
  73. 78 51
      app/src/com/sheishuo/app/common/util/net/NetImpl.java
  74. 1 0
      app/src/com/sheishuo/app/common/util/net/NetInfo.java
  75. 8 0
      app/src/com/sheishuo/app/common/views/BaseToolbar.java
  76. 10 0
      app/src/com/sheishuo/app/core_module/social_info/model/SocialBeanModel.java
  77. 39 0
      app/src/com/sheishuo/app/core_module/social_info/view/ui/activity/PersonalSettingsActivity.java
  78. 3 3
      app/src/com/sheishuo/app/core_module/trade/model/TradeModel.java
  79. 4 0
      app/src/com/sheishuo/app/core_module/trade/view/adapter/TradeItemAdapter.java
  80. 61 0
      app/src/com/sheishuo/app/core_module/trade/view/ui/activity/TradeDetailActivity.java
  81. 5 1
      app/src/com/sheishuo/app/main/activity/MainActivity.java
  82. 7 3
      app/src/com/sheishuo/app/main/adapter/AreaGroupsAdapter.java
  83. 5 1
      app/src/com/sheishuo/app/main/fragment/CircleOfFriendsFragment.java
  84. 53 45
      app/src/com/sheishuo/app/main/fragment/HomeFragment.java
  85. 206 0
      app/src/com/sheishuo/app/main/fragment/MineFragment.java
  86. 91 1
      app/src/com/sheishuo/app/main/fragment/TradeListFragment.java
  87. 2 1
      app/src/com/sheishuo/app/main/model/MainTab.java
  88. 7 7
      uikit/uikit.iml

+ 6 - 0
app/AndroidManifest.xml

@@ -118,7 +118,13 @@
         <activity android:name=".core_module.circle.activity.NewTweetingActivity"
             android:theme="@style/AppTheme.NoActionBar"/>
 
+        <!--我的 相关-->
+        <activity android:name=".core_module.social_info.view.ui.activity.PersonalSettingsActivity"
+            android:theme="@style/AppTheme.NoActionBar"/>
 
+        <!--交易帖详情-->
+        <activity android:name=".core_module.trade.view.ui.activity.TradeDetailActivity"
+            android:theme="@style/AppTheme.NoActionBar"/>
         <!--联系人界面-->
         <activity android:name=".core_module.recent_contacts.activity.ContactsListActivity"
             android:theme="@style/AppTheme.NoActionBar"/>

+ 7 - 7
app/app.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/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" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <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" />
@@ -73,6 +66,13 @@
       <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" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+      <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" />
       <excludeFolder url="file://$MODULE_DIR$/build/.DS_Store" />
       <excludeFolder url="file://$MODULE_DIR$/build/freeline" />
       <excludeFolder url="file://$MODULE_DIR$/build/intermediates/.DS_Store" />

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

@@ -15,7 +15,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:padding="10dp">
-        <ImageView
+        <com.netease.nim.uikit.common.ui.imageview.HeadImageView
             android:id="@+id/area_groups_item_avatar"
             android:layout_width="48dp"
             android:layout_height="48dp"

+ 2 - 1
app/res/layout/area_groups_list_fragment.xml

@@ -3,7 +3,8 @@
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_height="match_parent"
     android:layout_width="wrap_content"
-    xmlns:app="http://schemas.android.com/apk/res-auto">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:fitsSystemWindows="false">
 
     <LinearLayout
         android:layout_width="match_parent"

+ 9 - 4
app/res/layout/base_toolbar.xml

@@ -1,10 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    style="@style/fullToolbarStyle">
+    android:layout_height="wrap_content">
 
+    <android.support.v7.widget.Toolbar
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        style="@style/fullToolbarStyle">
         <LinearLayout
+            android:id="@+id/toolbar_layout"
             android:layout_width="match_parent"
             android:layout_height="?attr/actionBarSize"
             android:background="@color/colorPrimary"
@@ -47,4 +51,5 @@
                 android:visibility="gone"
                 android:gravity="center"/>
         </LinearLayout>
-</android.support.v7.widget.Toolbar>
+    </android.support.v7.widget.Toolbar>
+</LinearLayout>

+ 43 - 30
app/res/layout/circle_new_tweeting.xml

@@ -1,47 +1,58 @@
 <?xml version="1.0" encoding="utf-8"?>
 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:orientation="vertical"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
-    <com.sheishuo.app.common.views.BaseToolbar
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <android.support.design.widget.AppBarLayout
+        android:id="@+id/new_tweet_appbar"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        style="@style/fullToolbarStyle"
-        app:title="发布"
-        app:left_text="返回"
-        app:right_text="确定"
-        app:layout_constraintRight_toRightOf="parent"
+        tools:layout_editor_absoluteX="0dp"
+        tools:layout_editor_absoluteY="0dp"
         app:layout_constraintLeft_toLeftOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        android:id="@+id/new_tweet_toolbar" />
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <com.sheishuo.app.common.views.BaseToolbar
+            android:id="@+id/new_tweet_toolbar"
+            style="@style/fullToolbarStyle"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            app:left_text="返回"
+            app:right_text="确定"
+            app:title="发布" />
+    </android.support.design.widget.AppBarLayout>
+
 
     <EditText
         android:id="@+id/new_tweet_content"
         android:layout_width="0dp"
         android:layout_height="256dp"
-        android:ems="10"
-        android:inputType="textPersonName"
-        android:layout_marginRight="8dp"
-        app:layout_constraintRight_toRightOf="@+id/new_tweet_toolbar"
+        android:layout_marginEnd="8dp"
         android:layout_marginLeft="8dp"
-        app:layout_constraintLeft_toLeftOf="@+id/new_tweet_toolbar"
+        android:layout_marginRight="8dp"
+        android:layout_marginStart="8dp"
         android:layout_marginTop="20dp"
-        app:layout_constraintTop_toBottomOf="@+id/new_tweet_toolbar"
+        android:ems="10"
         android:gravity="start"
         android:hint="您想说点什么..."
+        android:inputType="textPersonName"
         app:layout_constraintHorizontal_bias="0.0"
-        android:layout_marginStart="8dp"
-        android:layout_marginEnd="8dp" />
+        app:layout_constraintLeft_toLeftOf="@+id/new_tweet_appbar"
+        app:layout_constraintRight_toRightOf="@+id/new_tweet_appbar"
+        app:layout_constraintTop_toBottomOf="@+id/new_tweet_appbar" />
+
     <HorizontalScrollView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:orientation="horizontal"
         android:layout_marginTop="8dp"
-        app:layout_constraintTop_toBottomOf="@+id/linearLayout2"
+        android:orientation="horizontal"
+        android:scrollbarAlwaysDrawHorizontalTrack="true"
         app:layout_constraintLeft_toLeftOf="@+id/new_tweet_content"
-        android:scrollbarAlwaysDrawHorizontalTrack="true">
+        app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
 
         <LinearLayout
             android:id="@+id/new_tweet_img_layout"
@@ -53,31 +64,33 @@
                 android:id="@+id/new_tweet_add_imgs"
                 android:layout_width="128dp"
                 android:layout_height="128dp"
-                android:src="@drawable/circle_new_tweet_img"/>
+                android:src="@drawable/circle_new_tweet_img" />
         </LinearLayout>
     </HorizontalScrollView>
 
 
     <LinearLayout
+        android:id="@+id/linearLayout2"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_marginLeft="8dp"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
         android:background="@color/grey_light_light"
         android:padding="4dp"
-        android:layout_marginLeft="8dp"
         app:layout_constraintLeft_toLeftOf="@+id/new_tweet_content"
-        android:layout_marginTop="8dp"
-        app:layout_constraintTop_toBottomOf="@+id/new_tweet_content"
-        android:id="@+id/linearLayout2"
-        android:layout_marginStart="8dp">
+        app:layout_constraintTop_toBottomOf="@+id/new_tweet_content">
+
         <ImageView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:src="@drawable/location"/>
+            android:src="@drawable/location" />
+
         <TextView
             android:id="@+id/new_tweet_location_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="未定位"
-            android:textColor="@color/grey_light"/>
+            android:textColor="@color/grey_light" />
     </LinearLayout>
 </android.support.constraint.ConstraintLayout>

+ 4 - 4
app/res/layout/circle_of_friends_fragment.xml

@@ -9,8 +9,8 @@
     <android.support.design.widget.AppBarLayout
         android:id="@+id/appbar"
         android:layout_width="match_parent"
-        android:layout_height="256dp"
-        android:fitsSystemWindows="true">
+        android:layout_height="256dp">
+        <!--android:fitsSystemWindows="true">-->
 
         <android.support.design.widget.CollapsingToolbarLayout
             android:id="@+id/collapsing_toolbar"
@@ -29,8 +29,8 @@
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
                 android:orientation="vertical"
-                app:layout_collapseMode="parallax"
-                android:fitsSystemWindows="true"   >
+                app:layout_collapseMode="parallax">
+                <!--android:fitsSystemWindows="true"   >-->
                 <ImageView
                     android:id="@+id/circle_background"
                     android:layout_width="match_parent"

+ 1 - 2
app/res/layout/main.xml

@@ -17,9 +17,8 @@
             android:layout_width="match_parent"
             android:layout_height="?attr/actionBarSize"
             android:background="?attr/colorPrimary"
-            app:titleTextAppearance="@style/Toolbar.TitleText"
             android:visibility="visible"
-            style="@style/fullToolbarStyle"/>
+            app:theme="@style/fullToolbarStyle"/>
     </android.support.design.widget.AppBarLayout>
 
     <com.sheishuo.app.common.ui.viewpager.PagerSlidingTabStrip

+ 233 - 0
app/res/layout/mine_fragment.xml

@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/mine_layout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+        <android.support.design.widget.CoordinatorLayout
+            android:layout_width="match_parent"
+            android:layout_height="240dp">
+
+
+
+            <ImageView
+                android:id="@+id/mine_fragment_banner"
+                android:layout_width="match_parent"
+                android:layout_height="192dp"
+                android:scaleType="center"
+                android:src="@drawable/avchat_call_bg" />
+
+            <ImageView
+                android:id="@+id/mine_fragment_personal_settings"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@drawable/mine_settings_white"
+                app:layout_anchor="@id/mine_fragment_banner"
+                app:layout_anchorGravity="top|end"
+                android:layout_margin="16dp"/>
+
+            <com.netease.nim.uikit.common.ui.imageview.HeadImageView
+                android:id="@+id/mine_fragment_avatar"
+                android:layout_width="96dp"
+                android:layout_height="96dp"
+                android:src="@drawable/nim_avatar_group"
+                app:layout_anchor="@id/mine_fragment_banner"
+                app:layout_anchorGravity="bottom|center" />
+
+            <ImageView
+                android:id="@+id/mine_fragment_gender"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@drawable/mine_gender_male"
+                app:layout_anchor="@id/mine_fragment_avatar"
+                app:layout_anchorGravity="right|bottom"
+                android:layout_margin="16dp"
+                android:layout_marginEnd="10dp"
+                android:layout_marginRight="10dp"/>
+
+
+        </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/mine_fragment_username_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:layout_marginTop="16dp"
+                android:text="用户昵称"
+                android:textSize="16sp"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/mine_fragment_id_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:text="id:000000000" />
+
+            <GridLayout
+                android:id="@+id/mine_fragment_photos_layout"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:columnCount="4">
+
+                <LinearLayout
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:gravity="center"
+                    android:orientation="vertical">
+
+                    <ImageView
+                        android:id="@+id/mine_fragment_edit_photos_img"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:src="@drawable/mine_edit_photos" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="添加照片" />
+                </LinearLayout>
+
+            </GridLayout>
+
+            <LinearLayout
+                android:id="@+id/mine_fragment_options_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/color_background"
+                android:orientation="vertical"
+                android:paddingBottom="4dp"
+                android:paddingTop="4dp">
+
+                <!--附近的人-->
+                <LinearLayout
+                    android:id="@+id/mine_fragment_nearby_people"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@color/white"
+                    android:clickable="true"
+                    android:orientation="horizontal"
+                    android:padding="8dp">
+
+                    <ImageView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="2"
+                        android:src="@drawable/mine_nearby_people" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginLeft="8dp"
+                        android:layout_marginStart="8dp"
+                        android:layout_weight="7"
+                        android:text="附近的人"
+                        android:textStyle="bold" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginEnd="8dp"
+                        android:layout_marginRight="8dp"
+                        android:layout_weight="1"
+                        android:src="@drawable/right_arrow" />
+                </LinearLayout>
+
+
+                <!--我的便民帖-->
+                <LinearLayout
+                    android:id="@+id/mine_fragment_trade"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@color/white"
+                    android:clickable="true"
+                    android:orientation="horizontal"
+                    android:padding="8dp">
+
+                    <ImageView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="2"
+                        android:src="@drawable/mine_trade" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginLeft="8dp"
+                        android:layout_marginStart="8dp"
+                        android:layout_weight="7"
+                        android:text="我的便民帖"
+                        android:textStyle="bold" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginEnd="8dp"
+                        android:layout_marginRight="8dp"
+                        android:layout_weight="1"
+                        android:src="@drawable/right_arrow" />
+                </LinearLayout>
+
+                <!--设置-->
+                <LinearLayout
+                    android:id="@+id/mine_fragment_setting"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@color/white"
+                    android:clickable="true"
+                    android:orientation="horizontal"
+                    android:padding="8dp">
+
+                    <ImageView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="2"
+                        android:src="@drawable/mine_settings" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginLeft="8dp"
+                        android:layout_marginStart="8dp"
+                        android:layout_weight="8"
+                        android:text="设置"
+                        android:textStyle="bold" />
+
+                    <ImageView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginEnd="8dp"
+                        android:layout_marginRight="8dp"
+                        android:layout_weight="1"
+                        android:src="@drawable/right_arrow" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+        </LinearLayout>
+
+
+    </LinearLayout>
+</ScrollView>

+ 36 - 0
app/res/layout/mine_personal_settings.xml

@@ -0,0 +1,36 @@
+<?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">
+        <com.sheishuo.app.common.views.BaseToolbar
+            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>
+
+    <LinearLayout
+        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"
+            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>
+</LinearLayout>

+ 2 - 1
app/res/layout/session_list.xml

@@ -4,7 +4,8 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:background="@drawable/skin_global_bg"
-    android:orientation="vertical" >
+    android:orientation="vertical"
+    android:fitsSystemWindows="false">
 
     <include layout="@layout/network_status_bar" />
     <include layout="@layout/multiport_status_bar" />

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

@@ -82,7 +82,7 @@
         android:layout_toRightOf="@+id/title_label"
         android:ellipsize="end"
         android:gravity="right"
-        android:singleLine="true"
+        android:maxLines="1"
         android:textColor="@color/color_black_ff666666"
         android:textSize="16sp"
         android:visibility="gone" />

+ 0 - 22
app/res/layout/toolbar_base.xml

@@ -1,22 +0,0 @@
-<?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.support.v7.widget.Toolbar
-            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.v7.widget.Toolbar>
-    </android.support.design.widget.AppBarLayout>
-</LinearLayout>

+ 122 - 0
app/res/layout/trade_detail_activity.xml

@@ -0,0 +1,122 @@
+<?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:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <com.sheishuo.app.common.views.BaseToolbar
+        android:id="@+id/toolbar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/colorPrimary"
+        android:title="详情" />
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="8dp">
+
+            <com.netease.nim.uikit.common.ui.imageview.HeadImageView
+                android:id="@+id/trade_detail_avatar"
+                android:layout_width="48dp"
+                android:layout_height="48dp"
+                android:layout_marginLeft="8dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:src="@drawable/ic_add_friends"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <TextView
+                android:id="@+id/trade_detail_username"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="15dp"
+                android:layout_marginStart="15dp"
+                android:layout_marginTop="0dp"
+                android:text="用户名"
+                android:textSize="16sp"
+                app:layout_constraintLeft_toRightOf="@+id/trade_detail_avatar"
+                app:layout_constraintTop_toTopOf="@+id/trade_detail_avatar" />
+
+            <TextView
+                android:id="@+id/trade_detail_location"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="8dp"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="12dp"
+                android:text="地理位置"
+                android:textColor="@color/grey_light"
+                android:textSize="14dp"
+                app:layout_constraintLeft_toLeftOf="@+id/trade_detail_username"
+                app:layout_constraintRight_toRightOf="@+id/trade_detail_username"
+                app:layout_constraintTop_toBottomOf="@+id/trade_detail_username" />
+
+            <TextView
+                android:id="@+id/trade_detail_date"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="8dp"
+                android:layout_marginLeft="135dp"
+                android:layout_marginRight="8dp"
+                android:layout_marginStart="135dp"
+                android:text="2017.08.04"
+                app:layout_constraintHorizontal_bias="0.171"
+                app:layout_constraintLeft_toRightOf="@+id/trade_detail_username"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toTopOf="@+id/trade_detail_username" />
+
+            <TextView
+                android:id="@+id/trade_detail_priority"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="8dp"
+                android:layout_marginRight="8dp"
+                android:text="置顶1314"
+                app:layout_constraintBottom_toBottomOf="@+id/trade_detail_location"
+                app:layout_constraintRight_toLeftOf="@+id/trade_detail_views" />
+
+            <TextView
+                android:id="@+id/trade_detail_views"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="阅读101"
+                app:layout_constraintBottom_toBottomOf="@+id/trade_detail_priority"
+                app:layout_constraintRight_toRightOf="@+id/trade_detail_date" />
+
+            <TextView
+                android:id="@+id/trade_detail_content"
+                android:layout_width="336dp"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="8dp"
+                android:layout_marginRight="8dp"
+                android:layout_marginTop="8dp"
+                android:text="这里是内容这里是内容这里
+            是内容这里是内容这里是内容这
+            里是内容这里是内容这里是内容"
+                app:layout_constraintLeft_toLeftOf="parent"
+                app:layout_constraintRight_toRightOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/trade_detail_priority"
+                android:layout_marginStart="8dp"
+                android:layout_marginEnd="8dp" />
+
+            <LinearLayout
+                android:id="@+id/trade_detail_imgs_layout"
+                android:layout_width="352dp"
+                android:layout_height="300dp"
+                android:layout_marginTop="27dp"
+                app:layout_constraintTop_toBottomOf="@+id/trade_detail_content"
+                android:layout_marginLeft="8dp"
+                app:layout_constraintLeft_toLeftOf="parent"
+                android:layout_marginRight="8dp"
+                app:layout_constraintRight_toRightOf="parent"
+                android:orientation="vertical"/>
+        </android.support.constraint.ConstraintLayout>
+    </ScrollView>
+</LinearLayout>

+ 2 - 1
app/res/layout/trade_list_fragment.xml

@@ -3,7 +3,8 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:orientation="vertical" android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/color_background">
+    android:background="@color/color_background"
+    android:fitsSystemWindows="false">
     <LinearLayout
         android:id="@+id/trade_list_notifications_layout"
         android:layout_width="match_parent"

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

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <item android:title="筛选"
+        android:id="@+id/trade_menu_filter"
+        app:showAsAction="always">
+        <menu>
+            <item android:id="@+id/trade_menu_all"
+                android:title="全部"
+                android:checkable="true"
+                android:checked="true" />
+            <item android:id="@+id/trade_menu_sell"
+                android:title="出售"
+                android:checkable="true"
+                android:checked="false"/>
+            <item android:id="@+id/trade_menu_buy"
+                android:title="求购"
+                android:checkable="true"
+                android:checked="false"/>
+            <item android:id="@+id/trade_menu_recent"
+                android:title="最近的"
+                android:checkable="true"
+                android:checked="false"/>
+            <item android:id="@+id/trade_menu_concern"
+                android:title="我关注的"
+                android:checkable="true"
+                android:checked="false"
+                android:visible="false"/>
+            <item android:id="@+id/trade_menu_mine"
+                android:title="我发布的"
+                android:checkable="true"
+                android:checked="false"
+                android:visible="false"/>
+        </menu>
+    </item>
+
+
+
+</menu>

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

@@ -1,4 +0,0 @@
-<resources>
-
-
-</resources>

+ 0 - 3
app/res/values-v14/styles-activity.xml

@@ -1,3 +0,0 @@
-<resources>
-
-</resources>

+ 4 - 0
app/res/values-v19/style.xml

@@ -8,4 +8,8 @@
         <!--<item name="android:windowTranslucentNavigation">true</item>-->
         <!--<item name="android:windowTranslucentStatus">true</item>-->
     </style>
+
+    <style name="transparentStatusBar">
+        <item name="android:windowTranslucentStatus">true</item>
+    </style>
 </resources>

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

@@ -5,4 +5,7 @@
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
     </style>
+
+
+
 </resources>

+ 1 - 0
app/res/values/strings.xml

@@ -7,6 +7,7 @@
     <string name="main_tab_groups">聊天室</string>
     <string name="main_tab_trade">便民帖</string>
     <string name="main_tab_circleoffriends">朋友圈</string>
+    <string name="main_tab_mine">我的</string>
     <string name="main_tab_session">会话</string>
     <string name="main_tab_contact">通讯录</string>
     <string name="user_profile">个人名片</string>

+ 20 - 0
app/res/values/style.xml

@@ -18,6 +18,26 @@
 
     <style name="fullToolbarStyle" parent="Widget.AppCompat.Toolbar">
         <item name="contentInsetStart">0dp</item><!-- 设置该属性解决空白部分-->
+        <item name="actionMenuTextColor">@color/white</item> <!--  敲定颜色-->
+        <item name="android:textSize">16sp</item> <!--  搞掂字体大小-->
+        <item name="android:actionMenuTextAppearance">@style/toolbarTextApperanceStyle</item>
+    </style>
+
+    <style name="toolbarTextApperanceStyle" parent="AppTheme.AppBarOverlay">
+        <item name="android:textSize">16sp</item>
+        <item name="actionMenuTextColor">@color/black</item>
+        <item name="android:gravity">center</item>
+    </style>
+
+    <style name="ToolbarOverflow" parent="@android:style/Widget.ActionButton.Overflow">
+        <item name="android:src">@drawable/text_shaixuan</item>
+    </style>
+
+
+
+    <!-- 透明状态栏 -->
+    <style name="transparentStatusBar">
+        <item name="android:windowTranslucentStatus"> true </item>
     </style>
 
 </resources>

+ 6 - 0
app/res/values/styles-activity.xml

@@ -11,15 +11,21 @@
         <item name="toolbarNavigationButtonStyle">@style/myToolbarNavigationButtonStyle</item>
     </style>
 
+    <!-- Global NoActionbar-->
     <style name="AppTheme.NoActionBar">
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
+        <item name="colorPrimary">@color/transparent</item>
     </style>
 
+
     <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.ActionBar">
         <item name="android:itemTextAppearance">?android:attr/actionMenuTextAppearance</item>
         <item name="actionMenuTextAppearance">@style/ActionMenuTheme</item>
     </style>
+    
+
+
 
     <!-- navigation style -->
     <style name="myToolbarNavigationButtonStyle" parent="@style/Widget.AppCompat.Toolbar.Button.Navigation">

File diff suppressed because it is too large
+ 14 - 0
app/src/com/sheishuo/app/common/beans/CityDataBean.java


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

@@ -0,0 +1,331 @@
+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;
+        }
+    }
+}

+ 9 - 0
app/src/com/sheishuo/app/common/util/location/CityDataHelper.java

@@ -0,0 +1,9 @@
+package com.sheishuo.app.common.util.location;
+
+/**
+ * Created by KN on 2017/8/14.
+ */
+
+public class CityDataHelper {
+    
+}

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

@@ -16,5 +16,5 @@ public interface INet {
     void loginQuery(String mobile,String pwd,ResponseCallback callback);
     void getGiftList(ResponseCallback callback);
     void uploadCircleImgs(String filePath, ResponseCallback callback);
-
+    void getSocialInfo(String targetID,ResponseCallback callback);
 }

+ 78 - 51
app/src/com/sheishuo/app/common/util/net/NetImpl.java

@@ -1,12 +1,9 @@
 package com.sheishuo.app.common.util.net;
 
-import android.util.Log;
-
 import com.google.gson.Gson;
-import com.google.gson.JsonObject;
 import com.sheishuo.app.cache.AccountCache;
-import com.sheishuo.app.cache.GiftCache;
 import com.sheishuo.app.common.beans.GiftBean;
+import com.sheishuo.app.common.beans.SocialBean;
 import com.sheishuo.app.login.beans.LoginBean;
 
 import org.json.JSONException;
@@ -14,12 +11,10 @@ import org.json.JSONObject;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.List;
 
 import okhttp3.Call;
 import okhttp3.Callback;
 import okhttp3.FormBody;
-import okhttp3.MediaType;
 import okhttp3.MultipartBody;
 import okhttp3.OkHttpClient;
 import okhttp3.Request;
@@ -30,7 +25,7 @@ import okhttp3.Response;
  * Created by KN on 2017/7/14.
  */
 
-public class  NetImpl implements INet {
+public class NetImpl implements INet {
 
 
     private static OkHttpClient client = new OkHttpClient.Builder().build();
@@ -42,7 +37,7 @@ public class  NetImpl implements INet {
     }
 
     @Override
-    public void post(String url, FormBody body,ResponseCallback callback) {
+    public void post(String url, FormBody body, ResponseCallback callback) {
         Request request = new Request.Builder()
                 .url(url)
                 .post(body)
@@ -51,9 +46,9 @@ public class  NetImpl implements INet {
         try {
             Response response = client.newCall(request).execute();
 
-            if (200 == response.code()){
+            if (200 == response.code()) {
                 callback.onSuccess(response.body().string());
-            }else {
+            } else {
                 callback.onFailed();
             }
 
@@ -73,9 +68,9 @@ public class  NetImpl implements INet {
         try {
             Response response = client.newCall(request).execute();
 
-            if (200 == response.code()){
+            if (200 == response.code()) {
                 callback.onSuccess(response.body().string());
-            }else {
+            } else {
                 callback.onFailed();
             }
 
@@ -88,51 +83,50 @@ public class  NetImpl implements INet {
     @Override
     public void loginQuery(String mobile, String pwd, final ResponseCallback callback) {
         final FormBody body = new FormBody.Builder()
-                .add("mobile",mobile)
-                .add("pwd",pwd)
+                .add("mobile", mobile)
+                .add("pwd", pwd)
                 .build();
 
         new Thread(new Runnable() {
-                    @Override
-                    public void run() {
-
-                        //创建FormBody
-                        Request request = new Request.Builder()
-                                .post(body)
-                                .url(NetInfo.INDEX + NetInfo.LOGIN_URL)
-                                .build();
-
-
-                        //发起请求并完成回调
-                        try {
-                            Response response = client.newCall(request).execute();
-
-                            if (200 == response.code()){
-                                LoginBean bean = gson.fromJson(response.body().string(),LoginBean.class);
-                                switch (bean.getC()){
-                                    case 0:
-                                        callback.onSuccess(bean);
-                                        break;
-                                    default:
-                                        callback.onFailed();
-                                        break;
-                                }
-                            }else {
-                                callback.onFailed();
-                            }
+            @Override
+            public void run() {
+
+                //创建FormBody
+                Request request = new Request.Builder()
+                        .post(body)
+                        .url(NetInfo.INDEX + NetInfo.LOGIN_URL)
+                        .build();
 
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                            callback.onFailed();
+
+                //发起请求并完成回调
+                try {
+                    Response response = client.newCall(request).execute();
+
+                    if (200 == response.code()) {
+                        LoginBean bean = gson.fromJson(response.body().string(), LoginBean.class);
+                        switch (bean.getC()) {
+                            case 0:
+                                callback.onSuccess(bean);
+                                break;
+                            default:
+                                callback.onFailed();
+                                break;
                         }
+                    } else {
+                        callback.onFailed();
                     }
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    callback.onFailed();
                 }
+            }
+        }
         ).start();
 
     }
 
 
-
     @Override
     public void getGiftList(final ResponseCallback callback) {
 
@@ -146,11 +140,11 @@ public class  NetImpl implements INet {
                             .build();
                     Response response = client.newCall(request).execute();
 
-                    if (200 == response.code()){
+                    if (200 == response.code()) {
                         String result = response.body().string();
-                        GiftBean.DBean gift = (new Gson().fromJson(result,GiftBean.class)).getD();
+                        GiftBean.DBean gift = (new Gson().fromJson(result, GiftBean.class)).getD();
                         callback.onSuccess(gift);
-                    }else {
+                    } else {
                         callback.onFailed();
                     }
 
@@ -170,7 +164,7 @@ public class  NetImpl implements INet {
         builder.setType(MultipartBody.FORM);
 
         builder.addFormDataPart("user_id", AccountCache.getAccount().getId());
-        builder.addFormDataPart("upload",file.getName(), RequestBody.create(null,file));
+        builder.addFormDataPart("upload", file.getName(), RequestBody.create(null, file));
 
 
         RequestBody body = builder.build();
@@ -191,10 +185,10 @@ public class  NetImpl implements INet {
             public void onResponse(Call call, Response response) throws IOException {
                 try {
                     JSONObject jsonObject = new JSONObject(response.body().string());
-                    if (jsonObject.getInt("c") == 0){
+                    if (jsonObject.getInt("c") == 0) {
                         int imgCode = jsonObject.getJSONObject("d").getInt("aid");
                         callback.onSuccess(imgCode);
-                    }else {
+                    } else {
                         callback.onFailed();
                     }
                 } catch (JSONException e) {
@@ -205,5 +199,38 @@ public class  NetImpl implements INet {
         });
     }
 
+    @Override
+    public void getSocialInfo(final String targetID, final ResponseCallback callback) {
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                FormBody body = new FormBody.Builder()
+                        .add("user_id", AccountCache.getAccount().getId())
+                        .add("target_id", targetID)
+                        .build();
+                Request request = new Request.Builder()
+                        .url(NetInfo.GET_SOCIAL_INFO)
+                        .post(body)
+                        .build();
+                try {
+                    Response response = client.newCall(request).execute();
+                    if (200 == response.code()) {
+
+                        String result = response.body().string();
+                        SocialBean bean = new Gson().fromJson(result, SocialBean.class);
+                        callback.onSuccess(bean);
+
+
+                    } else {
+                        callback.onFailed();
+                    }
+                } catch (IOException e) {
+                    e.printStackTrace();
+                    callback.onFailed();
+                }
+            }
+        }).start();
+    }
+
 
 }

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

@@ -18,4 +18,5 @@ 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";
 }

+ 8 - 0
app/src/com/sheishuo/app/common/views/BaseToolbar.java

@@ -28,10 +28,12 @@ public class BaseToolbar extends Toolbar {
 
     private final String TITLE = "title",LEFT_TEXT = "left_text",RIGHT_TEXT = "right_text";
     private static Context context;
+    private LinearLayout toolbarLayout;
     private String titleStr = "",leftStr = "",rightStr = "";
     private TextView titleTV,leftTV,rightTV;
     private LinearLayout icoLayout;
 
+
     public interface IcoBtnClickListener{
         void onClick(View view);
     }
@@ -70,9 +72,14 @@ public class BaseToolbar extends Toolbar {
         leftTV = (TextView) view.findViewById(R.id.toolbar_left);
         rightTV = (TextView) view.findViewById(R.id.toolbar_right);
         icoLayout = (LinearLayout) view.findViewById(R.id.toolbar_ico_layout);
+        toolbarLayout = (LinearLayout) view.findViewById(R.id.toolbar_layout);
     }
 
 
+    public LinearLayout getToolbarLayout() {
+        return toolbarLayout;
+    }
+
     public TextView getTitleTV() {
         return titleTV;
     }
@@ -87,6 +94,7 @@ public class BaseToolbar extends Toolbar {
 
 
     public void init(){
+        this.setVisibility(VISIBLE);
         titleTV.setVisibility(INVISIBLE);
         leftTV.setVisibility(INVISIBLE);
         rightTV.setVisibility(INVISIBLE);

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

@@ -0,0 +1,10 @@
+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 {
+}

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

@@ -0,0 +1,39 @@
+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.uikit_implements.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);
+    }
+
+
+
+}

+ 3 - 3
app/src/com/sheishuo/app/core_module/trade/model/TradeModel.java

@@ -22,10 +22,10 @@ import okhttp3.FormBody;
 
 public class TradeModel {
     public final static int TYPE_ALL = 0
-            ,TYPE_SUPPLY = 1
-            ,TYPE_DEMAND = 2
+            ,TYPE_SELL = 1
+            ,TYPE_BUY = 2
             ,TYPE_RECENT = 3
-            ,TYPE_RELEASE = 4
+            ,TYPE_MINE = 4
             ,TYPE_CONCERN = 5;
 
 

+ 4 - 0
app/src/com/sheishuo/app/core_module/trade/view/adapter/TradeItemAdapter.java

@@ -238,6 +238,10 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
         }
     }
 
+    public void clearAll(){
+        data.clear();
+        notifyDataSetChanged();
+    }
 
     class TradeItemViewHolder extends RecyclerView.ViewHolder{
         private CardView layout;

+ 61 - 0
app/src/com/sheishuo/app/core_module/trade/view/ui/activity/TradeDetailActivity.java

@@ -0,0 +1,61 @@
+package com.sheishuo.app.core_module.trade.view.ui.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.util.Log;
+import android.view.Menu;
+import com.sheishuo.app.R;
+import com.sheishuo.app.common.views.BaseToolbar;
+import com.sheishuo.app.uikit_implements.SheishuoUI;
+
+/**
+ * Created by KN on 2017/8/4.
+ */
+
+public class TradeDetailActivity extends SheishuoUI{
+
+    private String TAG = this.getClass().getSimpleName();
+
+    private BaseToolbar toolbar;
+    public static void start(Context context) {
+        start(context, null);
+    }
+
+    public static void start(Context context, Intent extras) {
+        Intent intent = new Intent();
+        intent.setClass(context, TradeDetailActivity.class);
+        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        if (extras != null) {
+            intent.putExtras(extras);
+        }
+        context.startActivity(intent);
+    }
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.trade_detail_activity);
+        findViews();
+        init();
+    }
+
+
+    private void findViews(){
+        toolbar = (BaseToolbar) findViewById(R.id.toolbar);
+    }
+
+    private void init(){
+        setSupportActionBar(toolbar);
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+        Log.e(TAG,"onCreateOptionsMenu");
+        getMenuInflater().inflate(R.menu.main_activity_menu,menu);
+        return true;
+    }
+}

+ 5 - 1
app/src/com/sheishuo/app/main/activity/MainActivity.java

@@ -38,6 +38,7 @@ import com.sheishuo.app.contact.activity.AddFriendActivity;
 import com.sheishuo.app.login.LoginActivity;
 import com.sheishuo.app.login.LogoutHelperBak;
 import com.sheishuo.app.main.fragment.HomeFragment;
+import com.sheishuo.app.main.fragment.MineFragment;
 import com.sheishuo.app.main.model.Extras;
 import com.sheishuo.app.session.SessionHelper;
 import com.sheishuo.app.team.TeamCreateHelper;
@@ -255,7 +256,10 @@ public class MainActivity extends SheishuoUI {
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         Log.e(TAG,"onActivityResult " + requestCode + "    " + resultCode);
-        if (resultCode == Activity.RESULT_OK) {
+
+        if(requestCode == MineFragment.AVATAR_SELECTED || requestCode == MineFragment.BANNER_SELECTED){
+            mainFragment.onActivityResult(requestCode,resultCode,data);
+        }else if (resultCode == Activity.RESULT_OK) {
             if (requestCode == REQUEST_CODE_NORMAL) {
                 final ArrayList<String> selected = data.getStringArrayListExtra(ContactSelectActivity.RESULT_DATA);
                 if (selected != null && !selected.isEmpty()) {

+ 7 - 3
app/src/com/sheishuo/app/main/adapter/AreaGroupsAdapter.java

@@ -9,6 +9,7 @@ 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.InvocationFuture;
 import com.netease.nimlib.sdk.NIMClient;
 import com.netease.nimlib.sdk.RequestCallback;
@@ -55,7 +56,10 @@ public class AreaGroupsAdapter  extends RecyclerView.Adapter<AreaGroupsAdapter.A
                 if (team.getIcon().isEmpty()){
                     Glide.with(context).load(R.drawable.nim_avatar_group).into(holder.groupIco);
                 }else {
-                    Glide.with(context).load(team.getIcon()).into(holder.groupIco);
+                    Glide.with(context)
+                            .load(team.getIcon())
+                            .placeholder(R.drawable.nim_avatar_group)
+                            .into(holder.groupIco);
                 }
             }
 
@@ -93,12 +97,12 @@ public class AreaGroupsAdapter  extends RecyclerView.Adapter<AreaGroupsAdapter.A
 
     class AreaGroupsViewHold extends RecyclerView.ViewHolder{
         View layout;
-        ImageView groupIco;
+        HeadImageView groupIco;
         TextView groupName,groupMemberNum;
         public AreaGroupsViewHold(View itemView) {
             super(itemView);
             layout = itemView.findViewById(R.id.area_groups_layout);
-            groupIco = (ImageView) itemView.findViewById(R.id.area_groups_item_avatar);
+            groupIco = (HeadImageView) itemView.findViewById(R.id.area_groups_item_avatar);
             groupName = (TextView) itemView.findViewById(R.id.group_name);
             groupMemberNum = (TextView) itemView.findViewById(R.id.group_member_num);
         }

+ 5 - 1
app/src/com/sheishuo/app/main/fragment/CircleOfFriendsFragment.java

@@ -2,11 +2,15 @@ package com.sheishuo.app.main.fragment;
 
 import android.content.Context;
 import android.content.Intent;
+import android.graphics.Color;
+import android.os.Build;
 import android.os.Handler;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.Log;
 import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
 import android.widget.ImageView;
 import android.widget.TextView;
 import android.widget.Toast;
@@ -72,6 +76,7 @@ public class CircleOfFriendsFragment extends MainTabFragment{
             Log.e(TAG,"Yes");
         }
 
+
         presenter.loadCircleList(AccountCache.getAccount().getId(),"0");
 
         //初始化朋友圈首页界面
@@ -140,7 +145,6 @@ public class CircleOfFriendsFragment extends MainTabFragment{
 
         if (isVisibleToUser && isLoaded) refreshCircle();
 
-
         NetStatus.IS_BUSY = false;
     }
 

+ 53 - 45
app/src/com/sheishuo/app/main/fragment/HomeFragment.java

@@ -5,7 +5,6 @@ import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
 import android.support.design.widget.BottomNavigationView;
 import android.support.v4.app.Fragment;
 import android.support.v4.view.ViewPager;
@@ -13,8 +12,6 @@ import android.support.v4.view.ViewPager.OnPageChangeListener;
 import android.support.v7.widget.Toolbar;
 import android.util.Log;
 import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
@@ -32,8 +29,8 @@ import com.netease.nimlib.sdk.msg.SystemMessageService;
 import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
 import com.netease.nimlib.sdk.msg.model.RecentContact;
 import com.netease.nimlib.sdk.team.TeamService;
-import com.sheishuo.app.cache.AccountCache;
 import com.sheishuo.app.R;
+import com.sheishuo.app.cache.AccountCache;
 import com.sheishuo.app.common.ui.viewpager.FadeInOutPageTransformer;
 import com.sheishuo.app.common.ui.viewpager.PagerSlidingTabStrip;
 import com.sheishuo.app.common.views.BottomNavigationViewEx;
@@ -98,7 +95,6 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
         autoJoinAreaChat();
 
 
-
         //暂时用来解决无法加载首页的bug
         getHandler().postDelayed(new Runnable() {
             @Override
@@ -106,40 +102,40 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
                 pager.setCurrentItem(1);
                 pager.setCurrentItem(0);
             }
-        },300);
+        }, 300);
 
 
     }
 
 
     //自动加入地区群聊
-    public void autoJoinAreaChat(){
+    public void autoJoinAreaChat() {
         List<String> autoJoinList = new ArrayList<>();
         autoJoinList.add(AccountCache.getAccount().getCountry_room_id());
         autoJoinList.add(AccountCache.getAccount().getProvince_room_id());
         autoJoinList.add(AccountCache.getAccount().getCity_room_id());
         autoJoinList.add(AccountCache.getAccount().getDistrict_room_id());
 
-        for(String roomId : autoJoinList){
-            if (roomId != null)NIMClient.getService(TeamService.class).applyJoinTeam(roomId, null);
+        for (String roomId : autoJoinList) {
+            if (roomId != null) NIMClient.getService(TeamService.class).applyJoinTeam(roomId, null);
         }
 
     }
 
     //初始化BottomNavigationView
-    public void initBottomNavigationView(){
+    public void initBottomNavigationView() {
         navigationbarItemList.add(R.id.main_navi_groups);
         navigationbarItemList.add(R.id.main_navi_friends);
         navigationbarItemList.add(R.id.main_navi_trade);
         navigationbarItemList.add(R.id.main_navi_circle_of_friends);
         navigationbarItemList.add(R.id.main_navi_me);
-        if (navigationView != null){
+        if (navigationView != null) {
             navigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
                 @Override
                 public boolean onNavigationItemSelected(@NonNull MenuItem item) {
-                    for(int position = 0;position < navigationbarItemList.size();position++){
+                    for (int position = 0; position < navigationbarItemList.size(); position++) {
 
-                        if (navigationbarItemList.get(position) == item.getItemId()){
+                        if (navigationbarItemList.get(position) == item.getItemId()) {
                             pager.setCurrentItem(position);
                         }
                     }
@@ -157,7 +153,6 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
     }
 
 
-
     @Override
     public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
         // TO TABS
@@ -181,12 +176,11 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
     }
 
 
-    public Toolbar getToolbar(){
-        return ((MainActivity)getActivity()).getToolBar();
+    public Toolbar getToolbar() {
+        return ((MainActivity) getActivity()).getToolBar();
     }
 
 
-
     @Override
     public void onPageScrollStateChanged(int state) {
         // TO TABS
@@ -200,7 +194,7 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
     private void selectPage(int page) {
         // TO PAGE
         if (scrollState == ViewPager.SCROLL_STATE_IDLE) {
-            Log.e(TAG,"currentItem" + pager.getCurrentItem());
+            Log.e(TAG, "currentItem" + pager.getCurrentItem());
             adapter.onPageSelected(pager.getCurrentItem());
         }
     }
@@ -223,7 +217,6 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
     }
 
 
-
     @Override
     public void onResume() {
         super.onResume();
@@ -360,32 +353,32 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
 
         DropManager.getInstance().init(getContext(), (DropCover) findView(R.id.unread_cover),
                 new DropCover.IDropCompletedListener() {
-            @Override
-            public void onCompleted(Object id, boolean explosive) {
-                if (id == null || !explosive) {
-                    return;
-                }
+                    @Override
+                    public void onCompleted(Object id, boolean explosive) {
+                        if (id == null || !explosive) {
+                            return;
+                        }
 
-                if (id instanceof RecentContact) {
-                    RecentContact r = (RecentContact) id;
-                    NIMClient.getService(MsgService.class).clearUnreadCount(r.getContactId(), r.getSessionType());
-                    LogUtil.i("HomeFragment", "clearUnreadCount, sessionId=" + r.getContactId());
-                } else if (id instanceof String) {
-                    if (((String) id).contentEquals("0")) {
-                        List<RecentContact> recentContacts = NIMClient.getService(MsgService.class).queryRecentContactsBlock();
-                        for (RecentContact r : recentContacts) {
-                            if (r.getUnreadCount() > 0) {
-                                NIMClient.getService(MsgService.class).clearUnreadCount(r.getContactId(), r.getSessionType());
+                        if (id instanceof RecentContact) {
+                            RecentContact r = (RecentContact) id;
+                            NIMClient.getService(MsgService.class).clearUnreadCount(r.getContactId(), r.getSessionType());
+                            LogUtil.i("HomeFragment", "clearUnreadCount, sessionId=" + r.getContactId());
+                        } else if (id instanceof String) {
+                            if (((String) id).contentEquals("0")) {
+                                List<RecentContact> recentContacts = NIMClient.getService(MsgService.class).queryRecentContactsBlock();
+                                for (RecentContact r : recentContacts) {
+                                    if (r.getUnreadCount() > 0) {
+                                        NIMClient.getService(MsgService.class).clearUnreadCount(r.getContactId(), r.getSessionType());
+                                    }
+                                }
+                                LogUtil.i("HomeFragment", "clearAllUnreadCount");
+                            } else if (((String) id).contentEquals("1")) {
+                                NIMClient.getService(SystemMessageService.class).resetSystemMessageUnreadCount();
+                                LogUtil.i("HomeFragment", "clearAllSystemUnreadCount");
                             }
                         }
-                        LogUtil.i("HomeFragment", "clearAllUnreadCount");
-                    } else if (((String) id).contentEquals("1")) {
-                        NIMClient.getService(SystemMessageService.class).resetSystemMessageUnreadCount();
-                        LogUtil.i("HomeFragment", "clearAllSystemUnreadCount");
                     }
-                }
-            }
-        });
+                });
     }
 
 
@@ -393,21 +386,36 @@ public class HomeFragment extends TFragment implements OnPageChangeListener, Rem
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         //super.onActivityResult(requestCode, resultCode, data);
-        switch (resultCode){
+        Log.e(TAG, requestCode + "   " + resultCode);
+
+        //我的 选择照片回调
+        if (resultCode == Activity.RESULT_OK && (requestCode == MineFragment.AVATAR_SELECTED || requestCode == MineFragment.BANNER_SELECTED)) {
+            for (Fragment fragment : getFragmentManager().getFragments()) {
+                if (fragment instanceof MineFragment)
+                    fragment.onActivityResult(requestCode, resultCode, data);
+
+            }
+            //防止往下传递,为什么不会消耗掉这个事件?
+            resultCode = -9999;
+        }
+
+
+        switch (resultCode) {
             //创建群回调
             case Activity.RESULT_OK:
                 List<String> memberList = data.getStringArrayListExtra(ContactSelectActivity.RESULT_DATA);
-                TeamCreateHelper.createAdvancedTeam(context,memberList);
+                TeamCreateHelper.createAdvancedTeam(context, memberList);
                 break;
 
             //朋友圈自动刷新回调
             case CircleOfFriendsFragment.REFRESH_CIRCLE:
-                for (Fragment fragment : getFragmentManager().getFragments()){
+                for (Fragment fragment : getFragmentManager().getFragments()) {
                     if (fragment instanceof CircleOfFriendsFragment)
-                        fragment.onActivityResult(requestCode,resultCode,data);
+                        fragment.onActivityResult(requestCode, resultCode, data);
 
                 }
                 break;
+
         }
     }
 

+ 206 - 0
app/src/com/sheishuo/app/main/fragment/MineFragment.java

@@ -0,0 +1,206 @@
+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 com.bumptech.glide.Glide;
+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;
+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.common.views.BaseToolbar;
+import com.sheishuo.app.core_module.social_info.view.ui.activity.PersonalSettingsActivity;
+import com.sheishuo.app.main.activity.MainActivity;
+
+import java.util.List;
+
+/**
+ * Created by KN on 2017/8/8.
+ */
+
+public class MineFragment extends MainTabFragment implements View.OnClickListener{
+    private String TAG = this.getClass().getSimpleName();
+
+    private MainActivity parent;
+    private BaseToolbar toolbar;
+    private ScrollView layout;
+    private ImageView avatarImg,settingsImg,bannerImg,editPhotoImg;
+    private TextView usernameTV,userIdTV;
+    private LinearLayout neabyPeopleOption,mineTradeOption,settingsOptions;
+
+
+
+    //FLAGS
+    public final static int AVATAR_SELECTED = 2000;
+    public final static int BANNER_SELECTED = 2001;
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+        onCurrent();
+
+    }
+
+    @Override
+    protected void onInit() {
+        findViews();
+        init();
+    }
+
+
+    private void findViews(){
+        parent = (MainActivity) getActivity();
+        toolbar = (BaseToolbar) parent.getToolBar();
+        layout = findView(R.id.mine_layout);
+        avatarImg = findView(R.id.mine_fragment_avatar);
+        settingsImg = findView(R.id.mine_fragment_personal_settings);
+        bannerImg = findView(R.id.mine_fragment_banner);
+        usernameTV = findView(R.id.mine_fragment_username_tv);
+        userIdTV = findView(R.id.mine_fragment_id_tv);
+        editPhotoImg = findView(R.id.mine_fragment_edit_photos_img);
+        neabyPeopleOption = findView(R.id.mine_fragment_nearby_people);
+        mineTradeOption = findView(R.id.mine_fragment_trade);
+        settingsOptions = findView(R.id.mine_fragment_setting);
+
+        avatarImg.setOnClickListener(this);
+        bannerImg.setOnClickListener(this);
+        settingsImg.setOnClickListener(this);
+        editPhotoImg.setOnClickListener(this);
+        neabyPeopleOption.setOnClickListener(this);
+        mineTradeOption.setOnClickListener(this);
+        settingsOptions.setOnClickListener(this);
+
+    }
+
+    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);
+        }
+
+
+        UserInfoProvider.UserInfo user = NIMClient.getService(UserService.class).getUserInfo(AccountCache.getAccount().getId());
+        if (user.getAvatar() != null)
+            Glide.with(getActivity()).load(user.getAvatar()).into(avatarImg);
+
+        usernameTV.setText(getName(AccountCache.getAccount().getId()));
+        userIdTV.setText("ID:" + AccountCache.getAccount().getId());
+
+    }
+
+
+    private void initToolbar(){
+        toolbar.init();
+        toolbar.setVisibility(View.GONE);
+    }
+
+    private String getName(String id){
+        UserInfoProvider.UserInfo user = NIMClient.getService(UserService.class).getUserInfo(id);
+        if (!(user.getName() == null)){
+            return user.getName();
+        }
+        return id;
+    }
+    @Override
+    public void setUserVisibleHint(boolean isVisibleToUser) {
+        super.setUserVisibleHint(isVisibleToUser);
+
+
+        if (isVisibleToUser && toolbar != null && parent != null){
+            initToolbar();
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+                parent.getWindow().setStatusBarColor(getResources().getColor(android.R.color.transparent));
+            }
+
+        }else if (parent != null){
+            Log.e(TAG,"setFitsSystemWindows False");
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()){
+            case R.id.mine_fragment_avatar:
+                pickImage(MineFragment.AVATAR_SELECTED);
+                break;
+            case R.id.mine_fragment_banner:
+                pickImage(MineFragment.BANNER_SELECTED);
+                break;
+            case R.id.mine_fragment_personal_settings:
+                PersonalSettingsActivity.start(getActivity().getApplicationContext());
+                break;
+            case R.id.mine_fragment_edit_photos_img:
+                break;
+            case R.id.mine_fragment_nearby_people:
+                break;
+            case R.id.mine_fragment_trade:
+                break;
+            case R.id.mine_fragment_setting:
+                break;
+        }
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode == Activity.RESULT_OK){
+            Bundle result = data.getExtras();
+            if (!result.getBoolean("from_local")) {
+                //照相机
+                String filePath = result.getString("file_path");
+                if (requestCode == AVATAR_SELECTED){
+                    Glide.with(getActivity()).load(filePath)
+                            .centerCrop()
+                            .into(avatarImg);
+                } else if (requestCode == BANNER_SELECTED){
+                    Glide.with(getActivity()).load(filePath)
+                            .centerCrop()
+                            .into(bannerImg);
+                }
+            } else {
+                //相册
+                List<PhotoInfo> photoInfoList = (List<PhotoInfo>) result.getSerializable("photo_list");
+                if (requestCode == AVATAR_SELECTED){
+                    Glide.with(getActivity())
+                            .load(photoInfoList.get(0).getFilePath())
+                            .centerCrop()
+                            .into(avatarImg);
+                } else if (requestCode == BANNER_SELECTED){
+                    Glide.with(getActivity())
+                            .load(photoInfoList.get(0).getFilePath())
+                            .centerCrop()
+                            .into(bannerImg);
+                }
+            }
+
+
+        }
+    }
+
+    private void pickImage(int requestCode){
+        PickImageHelper.PickImageOption option = new PickImageHelper.PickImageOption();
+        option.multiSelectMaxCount = 1;
+        PickImageHelper.pickImage(getContext(),requestCode,option);
+    }
+
+
+}

+ 91 - 1
app/src/com/sheishuo/app/main/fragment/TradeListFragment.java

@@ -1,10 +1,15 @@
 package com.sheishuo.app.main.fragment;
 
+import android.os.Bundle;
 import android.os.Handler;
+import android.support.annotation.Nullable;
 import android.support.v7.widget.CardView;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -17,8 +22,12 @@ import com.sheishuo.app.common.views.BaseToolbar;
 import com.sheishuo.app.core_module.trade.model.TradeModel;
 import com.sheishuo.app.core_module.trade.presenter.TradePresenter;
 import com.sheishuo.app.core_module.trade.view.adapter.TradeItemAdapter;
+import com.sheishuo.app.core_module.trade.view.ui.activity.TradeDetailActivity;
 import com.sheishuo.app.main.activity.MainActivity;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Created by KN on 2017/7/31.
  */
@@ -39,12 +48,77 @@ public class TradeListFragment extends MainTabFragment {
     private RecyclerView recyclerview;
     private TradeItemAdapter adapter;
     private LinearLayoutManager layoutManager;
+    private List<MenuItem> menuItems = new ArrayList<>();
+    private Menu menu;
 
     /**
      * FLAGS
      */
     public int PAGE_TO_LOAD = 1;
     public int TYPE_TO_LOAD = TradeModel.TYPE_ALL;
+    public int MENU_ITEM_CHECKED = R.id.trade_menu_all;
+
+
+    @Override
+    public void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+
+
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        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));
+        }
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+
+        if (item.getItemId() == MENU_ITEM_CHECKED || item.getItemId() == R.id.trade_menu_filter){
+            return false;
+        }
+
+        MENU_ITEM_CHECKED = item.getItemId();
+        setAllMenuItemUnchecked(menuItems);
+        item.setChecked(true);
+        clearTradeList();
+        switch (item.getItemId()){
+            case R.id.trade_menu_all:
+                loadTradeList(TradeModel.TYPE_ALL,1);
+                break;
+            case R.id.trade_menu_buy:
+                loadTradeList(TradeModel.TYPE_BUY,1);
+                break;
+            case R.id.trade_menu_sell:
+                loadTradeList(TradeModel.TYPE_SELL,1);
+                break;
+            case R.id.trade_menu_recent:
+                loadTradeList(TradeModel.TYPE_RECENT,1);
+                break;
+            case R.id.trade_menu_concern:
+                loadTradeList(TradeModel.TYPE_CONCERN,1);
+                break;
+            case R.id.trade_menu_mine:
+                loadTradeList(TradeModel.TYPE_MINE,1);
+                break;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+
+    private void setAllMenuItemUnchecked(List<MenuItem> menuItems){
+        for (MenuItem item:menuItems){
+            item.setChecked(false);
+        }
+    }
+
+
 
 
     @Override
@@ -52,6 +126,7 @@ public class TradeListFragment extends MainTabFragment {
         presenter = new TradePresenter(this);
         findViews();
         init();
+
     }
 
 
@@ -66,15 +141,17 @@ public class TradeListFragment extends MainTabFragment {
 
     private void init(){
         initToolbar();
+        parent.setSupportActionBar(toolbar);
         layoutManager = new LinearLayoutManager(getActivity());
         loadTradeList(TYPE_TO_LOAD,PAGE_TO_LOAD);
+
     }
 
     private void initToolbar(){
         toolbar.init();
         toolbar.setTitle(R.string.main_tab_trade);
         toolbar.setLeftText(AccountCache.getAccount().getCity() + AccountCache.getAccount().getDistrict());
-        toolbar.setRightText("筛选");
+        toolbar.getRightTV().setVisibility(View.GONE);
     }
 
 
@@ -90,6 +167,7 @@ public class TradeListFragment extends MainTabFragment {
                 public void onClick(View view) {
                     if (view instanceof CardView){
                         TradeBean.DBean.ListBean bean = (TradeBean.DBean.ListBean) view.getTag();
+                        TradeDetailActivity.start(getActivity());
 
                     }else if (view instanceof ImageView){
 
@@ -186,4 +264,16 @@ public class TradeListFragment extends MainTabFragment {
     }
 
 
+    public void clearTradeList(){
+        handler.post(new Runnable() {
+            @Override
+            public void run() {
+                if (adapter != null){
+                    adapter.clearAll();
+                }
+            }
+        });
+    }
+
+
 }

+ 2 - 1
app/src/com/sheishuo/app/main/model/MainTab.java

@@ -2,6 +2,7 @@ package com.sheishuo.app.main.model;
 
 import com.sheishuo.app.main.fragment.AreaGroupsFragment;
 import com.sheishuo.app.main.fragment.CircleOfFriendsFragment;
+import com.sheishuo.app.main.fragment.MineFragment;
 import com.sheishuo.app.main.fragment.SessionListFragment;
 import com.sheishuo.app.main.fragment.TradeListFragment;
 import com.sheishuo.app.main.reminder.ReminderId;
@@ -16,7 +17,7 @@ public enum MainTab {
 //    CHAT_ROOM(2, ReminderId.INVALID, ChatRoomListFragment.class, R.string.chat_room, R.layout.chat_room_tab),
     TRADE(2,ReminderId.INVALID, TradeListFragment.class,R.string.main_tab_trade,R.layout.trade_list_fragment),
     CIRCLE_OF_FRIENDS(3,ReminderId.INVALID, CircleOfFriendsFragment.class,R.string.main_tab_circleoffriends,R.layout.circle_of_friends_fragment),
-    CONTACT(4, ReminderId.CONTACT, ContactListFragment.class, R.string.main_tab_contact, R.layout.contacts_list);
+    CONTACT(4, ReminderId.INVALID, MineFragment.class,R.string.main_tab_mine , R.layout.mine_fragment);
     public final int tabIndex;
 
     public final int reminderId;

+ 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/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" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
-      <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" />
@@ -73,6 +66,13 @@
       <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" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
+      <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" />
       <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" />

Some files were not shown because too many files changed in this diff