Browse Source

话题详情页修改

huyuguo 5 years ago
parent
commit
fad5dcdc31
24 changed files with 189 additions and 164 deletions
  1. 0 1
      app/build.gradle
  2. 20 65
      app/src/main/AndroidManifest.xml
  3. 15 0
      app/src/main/java/com/electric/chargingpile/activity/UserPageActivity.java
  4. 1 1
      app/src/main/java/com/electric/chargingpile/fragment/ChatRecommendFragment.java
  5. 0 0
      app/src/main/res/drawable-hdpi/user_page_bg.png
  6. BIN
      app/src/main/res/drawable-mdpi/app_header_edit_icon.png
  7. BIN
      app/src/main/res/drawable-mdpi/app_header_more_icon.png
  8. BIN
      app/src/main/res/drawable-mdpi/app_white_back_icon.png
  9. BIN
      app/src/main/res/drawable-mdpi/user_page_bg.png
  10. BIN
      app/src/main/res/drawable-xhdpi/app_header_edit_icon.png
  11. BIN
      app/src/main/res/drawable-xhdpi/app_header_more_icon.png
  12. BIN
      app/src/main/res/drawable-xhdpi/app_white_back_icon.png
  13. BIN
      app/src/main/res/drawable-xhdpi/user_page_bg.png
  14. BIN
      app/src/main/res/drawable-xxhdpi/app_header_edit_icon.png
  15. BIN
      app/src/main/res/drawable-xxhdpi/app_header_more_icon.png
  16. BIN
      app/src/main/res/drawable-xxhdpi/app_white_back_icon.png
  17. BIN
      app/src/main/res/drawable-xxhdpi/user_page_bg.png
  18. BIN
      app/src/main/res/drawable-xxxhdpi/app_header_edit_icon.png
  19. BIN
      app/src/main/res/drawable-xxxhdpi/app_header_more_icon.png
  20. BIN
      app/src/main/res/drawable-xxxhdpi/app_white_back_icon.png
  21. BIN
      app/src/main/res/drawable-xxxhdpi/user_page_bg.png
  22. 17 17
      app/src/main/res/layout/activity_personal_page.xml
  23. 101 80
      app/src/main/res/layout/activity_topic_detail_header.xml
  24. 35 0
      app/src/main/res/layout/activity_user_page.xml

+ 0 - 1
app/build.gradle

@ -199,7 +199,6 @@ MobSDK {
199 199
            }
200 200
201 201
202
203 202
            QQ {
204 203
                id 3
205 204
                sortId 3

+ 20 - 65
app/src/main/AndroidManifest.xml

@ -3,13 +3,10 @@
3 3
    package="com.electric.chargingpile"
4 4
    android:versionCode="75"
5 5
    android:versionName="3.2.4">
6
7 6
    <!-- 极光 -->
8 7
    <permission
9 8
        android:name="${applicationId}.permission.JPUSH_MESSAGE"
10
        android:protectionLevel="signature" />
11
12
    <!-- 往SDCard写入数据权限 -->
9
        android:protectionLevel="signature" /> <!-- 往SDCard写入数据权限 -->
13 10
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
14 11
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
15 12
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
@ -38,32 +35,26 @@
38 35
    <uses-permission android:name="android.permission.READ_LOGS" />
39 36
    <uses-permission android:name="android.permission.VIBRATE" />
40 37
    <uses-permission android:name="android.permission.INTERNET" />
41
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
42
    <!-- 极光 -->
38
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <!-- 极光 -->
43 39
    <uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" />
44 40
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
45 41
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
46
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
47
    <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
42
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
48 43
    <!-- <uses-permission android:name="android.permission.WAKE_LOCK" /> -->
49 44
    <!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" /> -->
50 45
    <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
51 46
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
52 47
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
53
    <uses-permission android:name="android.permission.VIBRATE" />
54
    <!-- <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> -->
48
    <uses-permission android:name="android.permission.VIBRATE" /> <!-- <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> -->
55 49
    <!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> -->
56 50
    <!-- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> -->
57
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
58
    <!-- 极光 -->
51
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 极光 -->
59 52
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
60 53
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
61 54
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
62 55
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
63 56
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
64
    <uses-permission android:name="android.permission.REORDER_TASKS" />
65
66
    <!-- 【常用】 信鸽SDK所需权限 -->
57
    <uses-permission android:name="android.permission.REORDER_TASKS" /> <!-- 【常用】 信鸽SDK所需权限 -->
67 58
    <!-- <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> -->
68 59
    <!-- <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> -->
69 60
    <!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
@ -76,22 +67,15 @@
76 67
    <!-- 蓝牙分享所需的权限 -->
77 68
    <!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
78 69
    <!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> -->
79
80
81 70
    <!-- 权限 :  GPS定位 -->
82 71
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
83 72
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
84 73
    <uses-permission android:name="android.permission.LOCATION_HARDWARE" />
85 74
86 75
    <uses-feature android:name="android.hardware.camera" />
87
    <uses-feature android:name="android.hardware.camera.autofocus" />
88
89
    <!-- 权限 : AGPS定位 -->
76
    <uses-feature android:name="android.hardware.camera.autofocus" /> <!-- 权限 : AGPS定位 -->
90 77
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
91 78
92
    <!-- <uses-permission -->
93
    <!-- android:name="android.permission.READ_EXTERNAL_STORAGE" -->
94
    <!-- android:maxSdkVersion="21" /> -->
95 79
    <application
96 80
        android:name=".application.MainApplication"
97 81
        android:allowBackup="true"
@ -100,15 +84,14 @@
100 84
        android:largeHeap="true"
101 85
        android:resizeableActivity="true"
102 86
        android:theme="@style/AppTheme">
87
        <activity android:name=".activity.UserPageActivity"></activity>
88
103 89
        <meta-data
104 90
            android:name="com.amap.api.v2.apikey"
105 91
            android:value="fabcfbf869745789b151d0c88e9b4807" />
106 92
        <meta-data
107 93
            android:name="com.baidu.lbsapi.API_KEY"
108
            android:value="qmitBFE5Am7H53UVylGwG6b0" />
109
110
        <!-- android:value="Zl49XczhF1ZFHSWFyBEnGYVz" />开发 -->
111
94
            android:value="qmitBFE5Am7H53UVylGwG6b0" /> <!-- android:value="Zl49XczhF1ZFHSWFyBEnGYVz" />开发 -->
112 95
        <meta-data
113 96
            android:name="design_width"
114 97
            android:value="1080" />
@ -124,9 +107,7 @@
124 107
            <meta-data
125 108
                android:name="android.support.FILE_PROVIDER_PATHS"
126 109
                android:resource="@xml/provider_paths" />
127
        </provider>
128
129
        <!-- <provider -->
110
        </provider> <!-- <provider -->
130 111
        <!-- android:name="android.support.v4.content.FileProvider" -->
131 112
        <!-- android:authorities="com.electric.chargingpile.fileprovider" -->
132 113
        <!-- android:exported="true" -->
@ -135,7 +116,6 @@
135 116
        <!-- &lt;!&ndash;android:name="android.support.FILE_PROVIDER_PATHS"&ndash;&gt; -->
136 117
        <!-- &lt;!&ndash;android:resource="@xml/filepaths" />&ndash;&gt; -->
137 118
        <!-- </provider> -->
138
139 119
        <activity
140 120
            android:name=".activity.WelcomeActivity"
141 121
            android:configChanges="keyboardHidden|orientation"
@ -198,8 +178,7 @@
198 178
            android:label="@string/my_search_name"
199 179
            android:launchMode="singleTop"
200 180
            android:screenOrientation="portrait"
201
            android:windowSoftInputMode="adjustResize" />
202
        <!-- 微信分享回调 -->
181
            android:windowSoftInputMode="adjustResize" /> <!-- 微信分享回调 -->
203 182
        <activity
204 183
            android:name=".wxapi.WXEntryActivity"
205 184
            android:configChanges="keyboardHidden|orientation|screenSize"
@ -503,54 +482,39 @@
503 482
        <activity
504 483
            android:name=".activity.ZoomingPhotoTextActivity"
505 484
            android:launchMode="singleTask"
506
            android:screenOrientation="portrait" />
507
508
        <!-- 【必须】 信鸽receiver广播接收 -->
485
            android:screenOrientation="portrait" /> <!-- 【必须】 信鸽receiver广播接收 -->
509 486
        <!-- <receiver -->
510 487
        <!-- android:name="com.tencent.android.tpush.XGPushReceiver" -->
511 488
        <!-- android:process=":xg_service_v2"> -->
512 489
        <!-- <intent-filter android:priority="0x7fffffff"> -->
513
514
515 490
        <!-- &lt;!&ndash; 【必须】 信鸽SDK的内部广播 &ndash;&gt; -->
516 491
        <!-- <action android:name="com.tencent.android.tpush.action.SDK" /> -->
517 492
        <!-- <action android:name="com.tencent.android.tpush.action.INTERNAL_PUSH_MESSAGE" /> -->
518 493
        <!-- &lt;!&ndash; 【必须】 系统广播:开屏和网络切换 &ndash;&gt; -->
519 494
        <!-- <action android:name="android.intent.action.USER_PRESENT" /> -->
520 495
        <!-- <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> -->
521
522
523 496
        <!-- &lt;!&ndash; 【可选】 一些常用的系统广播,增强信鸽service的复活机会,请根据需要选择。当然,你也可以添加APP自定义的一些广播让启动service &ndash;&gt; -->
524 497
        <!-- <action android:name="android.bluetooth.adapter.action.STATE_CHANGED" /> -->
525 498
        <!-- <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> -->
526 499
        <!-- <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" /> -->
527 500
        <!-- </intent-filter> -->
528 501
        <!-- </receiver> -->
529
530
531 502
        <!-- 【必须】 (2.30及以上版新增)展示通知的activity -->
532 503
        <!-- 【注意】 如果被打开的activity是启动模式为SingleTop,SingleTask或SingleInstance,请根据通知的异常自查列表第8点处理 -->
533 504
        <!-- <activity -->
534 505
        <!-- android:name="com.tencent.android.tpush.XGPushActivity" -->
535 506
        <!-- android:exported="false"> -->
536 507
        <!-- <intent-filter> -->
537
538
539 508
        <!-- &lt;!&ndash; 若使用AndroidStudio,请设置android:name="android.intent.action" &ndash;&gt; -->
540 509
        <!-- <action android:name="android.intent.action" /> -->
541 510
        <!-- </intent-filter> -->
542 511
        <!-- </activity> -->
543
544
        <service android:name="com.amap.api.location.APSService" />
545
546
        <!-- 【必须】 信鸽service -->
512
        <service android:name="com.amap.api.location.APSService" /> <!-- 【必须】 信鸽service -->
547 513
        <!-- <service -->
548 514
        <!-- android:name="com.tencent.android.tpush.service.XGPushService" -->
549 515
        <!-- android:exported="true" -->
550 516
        <!-- android:persistent="true" -->
551 517
        <!-- android:process=":xg_service_v2" /> -->
552
553
554 518
        <!-- 【必须】 通知service,此选项有助于提高抵达率 -->
555 519
        <!-- <service -->
556 520
        <!-- android:name="com.tencent.android.tpush.rpc.XGRemoteService" -->
@ -559,8 +523,6 @@
559 523
        <!-- <action android:name="com.electric.chargingpile.PUSH_ACTION" /> -->
560 524
        <!-- </intent-filter> -->
561 525
        <!-- </service> -->
562
563
564 526
        <!-- 【必须】 请修改为APP的AccessId,“21”开头的10位数字,中间没空格 -->
565 527
        <!-- <meta-data -->
566 528
        <!-- android:name="XG_V2_ACCESS_ID" -->
@ -569,7 +531,6 @@
569 531
        <!-- <meta-data -->
570 532
        <!-- android:name="XG_V2_ACCESS_KEY" -->
571 533
        <!-- android:value="AT7Q84BLL26L" /> -->
572
573 534
        <activity
574 535
            android:name=".activity.FindActivity"
575 536
            android:launchMode="singleTask"
@ -637,9 +598,7 @@
637 598
        <activity
638 599
            android:name=".activity.InputCodeActivity"
639 600
            android:exported="true"
640
            android:screenOrientation="portrait" />
641
642
        <!-- <intent-filter > -->
601
            android:screenOrientation="portrait" /> <!-- <intent-filter > -->
643 602
        <!-- &lt;!&ndash; action随便设置,但必须保证唯一 &ndash;&gt; -->
644 603
        <!-- <action android:name="input_code"/> -->
645 604
        <!-- <category android:name="android.intent.category.DEFAULT"/> -->
@ -659,9 +618,7 @@
659 618
            android:screenOrientation="portrait" />
660 619
        <activity
661 620
            android:name=".activity.CreditActivity"
662
            android:screenOrientation="portrait" />
663
664
        <!-- 极光 -->
621
            android:screenOrientation="portrait" /> <!-- 极光 -->
665 622
        <activity
666 623
            android:name="cn.jpush.android.ui.PopWinActivity"
667 624
            android:exported="false"
@ -751,7 +708,6 @@
751 708
        <meta-data
752 709
            android:name="JPUSH_APPKEY"
753 710
            android:value="19fde8a6fe56b6918522bfa3" /> <!-- </>值来自开发者平台取得的AppKey -->
754
755 711
        <activity
756 712
            android:name=".activity.ShowBuildLocationActivity"
757 713
            android:screenOrientation="portrait" />
@ -852,11 +808,10 @@
852 808
            android:screenOrientation="portrait" />
853 809
        <activity
854 810
            android:name=".activity.TLDLoadingActivity"
855
            android:screenOrientation="portrait" />
856
        <!--<activity-->
857
        <!--android:name=".activity.MyCaptureActivity"-->
858
        <!--android:launchMode="singleTask"-->
859
        <!--android:screenOrientation="portrait" />-->
811
            android:screenOrientation="portrait" /> <!-- <activity -->
812
        <!-- android:name=".activity.MyCaptureActivity" -->
813
        <!-- android:launchMode="singleTask" -->
814
        <!-- android:screenOrientation="portrait" /> -->
860 815
        <activity
861 816
            android:name=".activity.MemberCoinRecordActivity"
862 817
            android:screenOrientation="portrait" />

+ 15 - 0
app/src/main/java/com/electric/chargingpile/activity/UserPageActivity.java

@ -0,0 +1,15 @@
1
package com.electric.chargingpile.activity;
2
3
import android.support.v7.app.AppCompatActivity;
4
import android.os.Bundle;
5
6
import com.electric.chargingpile.R;
7
8
public class UserPageActivity extends AppCompatActivity {
9
10
    @Override
11
    protected void onCreate(Bundle savedInstanceState) {
12
        super.onCreate(savedInstanceState);
13
        setContentView(R.layout.activity_user_page);
14
    }
15
}

+ 1 - 1
app/src/main/java/com/electric/chargingpile/fragment/ChatRecommendFragment.java

@ -99,7 +99,7 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
99 99
        recyclerView.addItemDecoration(new ChatRecommendItemDecoration()); // 设置边距
100 100
        // 静默加载模式不能设置footerview
101 101
        recyclerView.setAdapter(chatRecommendAdapter);
102
//        refreshView.setPinnedTime(1000);
102
        refreshView.setPinnedTime(0);
103 103
//        refreshView.setMoveForHorizontal(true);
104 104
105 105
        refreshView.setXRefreshViewListener(new XRefreshView.SimpleXRefreshListener() {

app/src/main/res/drawable-hdpi/app_personal_header_bg_icon.png → app/src/main/res/drawable-hdpi/user_page_bg.png


BIN
app/src/main/res/drawable-mdpi/app_header_edit_icon.png


BIN
app/src/main/res/drawable-mdpi/app_header_more_icon.png


BIN
app/src/main/res/drawable-mdpi/app_white_back_icon.png


BIN
app/src/main/res/drawable-mdpi/user_page_bg.png


BIN
app/src/main/res/drawable-xhdpi/app_header_edit_icon.png


BIN
app/src/main/res/drawable-xhdpi/app_header_more_icon.png


BIN
app/src/main/res/drawable-xhdpi/app_white_back_icon.png


BIN
app/src/main/res/drawable-xhdpi/user_page_bg.png


BIN
app/src/main/res/drawable-xxhdpi/app_header_edit_icon.png


BIN
app/src/main/res/drawable-xxhdpi/app_header_more_icon.png


BIN
app/src/main/res/drawable-xxhdpi/app_white_back_icon.png


BIN
app/src/main/res/drawable-xxhdpi/user_page_bg.png


BIN
app/src/main/res/drawable-xxxhdpi/app_header_edit_icon.png


BIN
app/src/main/res/drawable-xxxhdpi/app_header_more_icon.png


BIN
app/src/main/res/drawable-xxxhdpi/app_white_back_icon.png


BIN
app/src/main/res/drawable-xxxhdpi/user_page_bg.png


+ 17 - 17
app/src/main/res/layout/activity_personal_page.xml

@ -9,9 +9,9 @@
9 9
        android:id="@+id/personal_header_view"
10 10
        android:layout_width="match_parent"
11 11
        android:layout_height="wrap_content"
12
        android:background="@drawable/user_page_bg"
12 13
        android:minHeight="180dp"
13
        android:orientation="vertical"
14
        android:background="@drawable/app_personal_header_bg_icon">
14
        android:orientation="vertical">
15 15
16 16
        <RelativeLayout
17 17
            android:id="@+id/rl_title"
@ -47,24 +47,24 @@
47 47
            android:layout_height="60dp">
48 48
49 49
            <!--<ImageView-->
50
                <!--android:id="@+id/user_avater"-->
51
                <!--android:layout_width="56dp"-->
52
                <!--android:layout_height="56dp"-->
53
                <!--android:layout_centerVertical="true"-->
54
                <!--android:contentDescription="@null"-->
55
                <!--android:src="@drawable/ic_category_1"-->
56
                <!--android:layout_marginLeft="16dp"/>-->
50
            <!--android:id="@+id/user_avater"-->
51
            <!--android:layout_width="56dp"-->
52
            <!--android:layout_height="56dp"-->
53
            <!--android:layout_centerVertical="true"-->
54
            <!--android:contentDescription="@null"-->
55
            <!--android:src="@drawable/ic_category_1"-->
56
            <!--android:layout_marginLeft="16dp"/>-->
57 57
58 58
            <com.electric.chargingpile.view.RoundImageView
59 59
                android:id="@+id/user_avater"
60 60
                android:layout_width="56dp"
61 61
                android:layout_height="56dp"
62 62
                android:layout_centerVertical="true"
63
                android:scaleType="fitXY"
64 63
                android:layout_gravity="center"
65 64
                android:layout_marginLeft="16dp"
66
                app:type="circle"
67
                android:background="@drawable/icon_user1118" />
65
                android:background="@drawable/icon_user1118"
66
                android:scaleType="fitXY"
67
                app:type="circle" />
68 68
69 69
            <TextView
70 70
                android:id="@+id/username_text"
@ -75,20 +75,20 @@
75 75
                android:layout_toRightOf="@+id/user_avater"
76 76
                android:text=""
77 77
                android:textColor="#ffffff"
78
                android:textSize="16sp"/>
78
                android:textSize="16sp" />
79 79
80 80
            <TextView
81 81
                android:id="@+id/username_content"
82 82
                android:layout_width="wrap_content"
83 83
                android:layout_height="wrap_content"
84
                android:layout_below="@+id/username_text"
85
                android:layout_alignParentBottom="true"
84 86
                android:layout_marginLeft="10dp"
85 87
                android:layout_marginTop="3dp"
86
                android:layout_alignParentBottom="true"
87
                android:layout_below="@+id/username_text"
88 88
                android:layout_toRightOf="@+id/user_avater"
89 89
                android:text=""
90 90
                android:textColor="#ffffff"
91
                android:textSize="12sp"/>
91
                android:textSize="12sp" />
92 92
93 93
            <ImageView
94 94
                android:id="@+id/user_edit"
@ -97,7 +97,7 @@
97 97
                android:layout_alignParentRight="true"
98 98
                android:layout_marginRight="15dp"
99 99
                android:src="@drawable/app_header_edit_icon"
100
                android:visibility="gone"/>
100
                android:visibility="gone" />
101 101
102 102
        </RelativeLayout>
103 103
    </LinearLayout>

+ 101 - 80
app/src/main/res/layout/activity_topic_detail_header.xml

@ -4,110 +4,129 @@
4 4
    xmlns:tools="http://schemas.android.com/tools"
5 5
    android:id="@+id/topicDetailHeader"
6 6
    android:layout_width="match_parent"
7
    android:layout_height="260dp">
7
    android:layout_height="wrap_content">
8 8
9 9
    <android.support.constraint.ConstraintLayout
10
        android:id="@+id/topicInfo"
10 11
        android:layout_width="0dp"
11
        android:layout_height="200dp"
12
        android:layout_height="wrap_content"
12 13
        android:background="#ffffff"
13 14
        app:layout_constraintEnd_toEndOf="parent"
14 15
        app:layout_constraintStart_toStartOf="parent"
15 16
        app:layout_constraintTop_toTopOf="parent">
16 17
17
        <ImageView
18
            android:id="@+id/headImage"
19
            android:layout_width="71dp"
20
            android:layout_height="60dp"
21
            android:layout_marginStart="15dp"
22
            android:layout_marginTop="15dp"
23
            app:layout_constraintStart_toStartOf="parent"
24
            app:layout_constraintTop_toTopOf="parent"
25
            tools:srcCompat="@tools:sample/avatars" />
26
27
        <TextView
28
            android:id="@+id/name"
18
        <android.support.constraint.ConstraintLayout
19
            android:id="@+id/topicTitle"
29 20
            android:layout_width="0dp"
30
            android:layout_height="0dp"
31
            android:layout_marginStart="5dp"
32
            android:layout_marginTop="5dp"
33
            android:layout_marginEnd="15dp"
34
            android:layout_marginBottom="5dp"
35
            android:gravity="center_vertical"
36
            android:maxLines="2"
37
            android:textColor="#222222"
38
            android:textSize="17sp"
39
            android:textStyle="bold"
40
            app:layout_constraintBottom_toBottomOf="@+id/headImage"
41
            app:layout_constraintEnd_toEndOf="parent"
42
            app:layout_constraintStart_toEndOf="@+id/headImage"
43
            app:layout_constraintTop_toTopOf="@+id/headImage"
44
            tools:text="#车主说车#" />
21
            android:layout_height="90dp"
22
            app:layout_constraintLeft_toLeftOf="parent"
23
            app:layout_constraintRight_toRightOf="parent"
24
            app:layout_constraintTop_toTopOf="parent">
25
26
            <ImageView
27
                android:id="@+id/headImage"
28
                android:layout_width="71dp"
29
                android:layout_height="60dp"
30
                android:layout_marginStart="15dp"
31
                android:layout_marginTop="15dp"
32
                app:layout_constraintStart_toStartOf="parent"
33
                app:layout_constraintTop_toTopOf="parent"
34
                tools:srcCompat="@tools:sample/avatars" />
35
36
            <TextView
37
                android:id="@+id/name"
38
                android:layout_width="0dp"
39
                android:layout_height="0dp"
40
                android:layout_marginStart="5dp"
41
                android:layout_marginTop="5dp"
42
                android:layout_marginEnd="15dp"
43
                android:layout_marginBottom="5dp"
44
                android:gravity="center_vertical"
45
                android:maxLines="2"
46
                android:textColor="#222222"
47
                android:textSize="17sp"
48
                android:textStyle="bold"
49
                app:layout_constraintBottom_toBottomOf="@+id/headImage"
50
                app:layout_constraintEnd_toEndOf="parent"
51
                app:layout_constraintStart_toEndOf="@+id/headImage"
52
                app:layout_constraintTop_toTopOf="@+id/headImage"
53
                tools:text="#车主说车#" />
54
55
        </android.support.constraint.ConstraintLayout>
56
45 57
46 58
        <TextView
47 59
            android:id="@+id/desc"
48 60
            android:layout_width="0dp"
49 61
            android:layout_height="wrap_content"
50 62
            android:layout_marginStart="15dp"
51
            android:layout_marginTop="15dp"
52 63
            android:layout_marginEnd="15dp"
53
            android:ellipsize="end"
54
            android:maxLines="3"
55 64
            android:textColor="#555555"
56 65
            android:textSize="15sp"
57 66
            app:layout_constraintEnd_toEndOf="parent"
58 67
            app:layout_constraintStart_toStartOf="parent"
59
            app:layout_constraintTop_toBottomOf="@+id/headImage"
60
            tools:text="电动小汽车,炫13.98万元起,魅15.98万元起,太值了!NEDC综合续航510km" />
68
            app:layout_constraintTop_toBottomOf="@+id/topicTitle"
69
            tools:text="电动小汽车,炫13.98万元起,魅15.98万元起" />
61 70
62
        <TextView
63
            android:id="@+id/readLabel"
64
            android:layout_width="wrap_content"
65
            android:layout_height="wrap_content"
66
            android:layout_marginStart="15dp"
67
            android:layout_marginBottom="14dp"
68
            android:text="阅读"
69
            android:textColor="#555555"
70
            android:textSize="12sp"
71
        <android.support.constraint.ConstraintLayout
72
            android:layout_width="0dp"
73
            android:layout_height="48dp"
71 74
            app:layout_constraintBottom_toBottomOf="parent"
72
            app:layout_constraintStart_toStartOf="parent" />
75
            app:layout_constraintLeft_toLeftOf="parent"
76
            app:layout_constraintRight_toRightOf="parent"
77
            app:layout_constraintTop_toBottomOf="@+id/desc">
73 78
74
        <TextView
75
            android:id="@+id/read"
76
            android:layout_width="wrap_content"
77
            android:layout_height="wrap_content"
78
            android:layout_marginStart="5dp"
79
            android:gravity="center_vertical"
80
            android:textSize="12sp"
81
            app:layout_constraintBottom_toBottomOf="@+id/readLabel"
82
            app:layout_constraintLeft_toRightOf="@+id/readLabel"
83
            app:layout_constraintTop_toTopOf="@+id/readLabel"
84
            tools:text="8" />
79
            <TextView
80
                android:id="@+id/readLabel"
81
                android:layout_width="wrap_content"
82
                android:layout_height="wrap_content"
83
                android:layout_marginLeft="15dp"
84
                android:text="阅读"
85
                android:textColor="#555555"
86
                android:textSize="12sp"
87
                app:layout_constraintBottom_toBottomOf="parent"
88
                app:layout_constraintLeft_toLeftOf="parent"
89
                app:layout_constraintTop_toTopOf="parent" />
85 90
86
        <TextView
87
            android:id="@+id/joinLabel"
88
            android:layout_width="wrap_content"
89
            android:layout_height="wrap_content"
90
            android:layout_marginStart="30dp"
91
            android:gravity="center_vertical"
92
            android:text="参与"
93
            android:textColor="#555555"
94
            android:textSize="12sp"
95
            app:layout_constraintBottom_toBottomOf="@+id/read"
96
            app:layout_constraintStart_toEndOf="@+id/read"
97
            app:layout_constraintTop_toTopOf="@+id/read" />
91
            <TextView
92
                android:id="@+id/read"
93
                android:layout_width="wrap_content"
94
                android:layout_height="wrap_content"
95
                android:layout_marginStart="5dp"
96
                android:gravity="center_vertical"
97
                android:textSize="12sp"
98
                app:layout_constraintBottom_toBottomOf="@+id/readLabel"
99
                app:layout_constraintLeft_toRightOf="@+id/readLabel"
100
                app:layout_constraintTop_toTopOf="@+id/readLabel"
101
                tools:text="8" />
98 102
99
        <TextView
100
            android:id="@+id/join"
101
            android:layout_width="wrap_content"
102
            android:layout_height="wrap_content"
103
            android:layout_marginStart="5dp"
104
            android:gravity="center_vertical"
105
            android:textColor="#555555"
106
            android:textSize="12sp"
107
            app:layout_constraintBottom_toBottomOf="@+id/joinLabel"
108
            app:layout_constraintStart_toEndOf="@+id/joinLabel"
109
            app:layout_constraintTop_toTopOf="@+id/joinLabel"
110
            tools:text="32" />
103
            <TextView
104
                android:id="@+id/joinLabel"
105
                android:layout_width="wrap_content"
106
                android:layout_height="wrap_content"
107
                android:layout_marginStart="30dp"
108
                android:gravity="center_vertical"
109
                android:text="参与"
110
                android:textColor="#555555"
111
                android:textSize="12sp"
112
                app:layout_constraintBottom_toBottomOf="@+id/read"
113
                app:layout_constraintStart_toEndOf="@+id/read"
114
                app:layout_constraintTop_toTopOf="@+id/read" />
115
116
            <TextView
117
                android:id="@+id/join"
118
                android:layout_width="wrap_content"
119
                android:layout_height="wrap_content"
120
                android:layout_marginStart="5dp"
121
                android:gravity="center_vertical"
122
                android:textColor="#555555"
123
                android:textSize="12sp"
124
                app:layout_constraintBottom_toBottomOf="@+id/joinLabel"
125
                app:layout_constraintStart_toEndOf="@+id/joinLabel"
126
                app:layout_constraintTop_toTopOf="@+id/joinLabel"
127
                tools:text="32" />
128
129
        </android.support.constraint.ConstraintLayout>
111 130
    </android.support.constraint.ConstraintLayout>
112 131
113 132
    <android.support.constraint.ConstraintLayout
@ -115,9 +134,11 @@
115 134
        android:layout_height="50dp"
116 135
        android:background="#ffffff"
117 136
        android:orientation="horizontal"
137
        android:layout_marginTop="10dp"
118 138
        app:layout_constraintBottom_toBottomOf="parent"
119 139
        app:layout_constraintEnd_toEndOf="parent"
120
        app:layout_constraintStart_toStartOf="parent">
140
        app:layout_constraintStart_toStartOf="parent"
141
        app:layout_constraintTop_toBottomOf="@+id/topicInfo">
121 142
122 143
        <android.support.constraint.ConstraintLayout
123 144
            android:id="@+id/sortConstrainLayout"

+ 35 - 0
app/src/main/res/layout/activity_user_page.xml

@ -0,0 +1,35 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7
    tools:context=".activity.UserPageActivity">
8
9
    <android.support.constraint.ConstraintLayout
10
        android:layout_width="0dp"
11
        android:layout_height="174dp"
12
        app:layout_constraintEnd_toEndOf="parent"
13
        app:layout_constraintStart_toStartOf="parent"
14
        app:layout_constraintTop_toTopOf="parent">
15
16
        <ImageView
17
            android:layout_width="0dp"
18
            android:layout_height="150dp"
19
            android:background="@drawable/user_page_bg"
20
            app:layout_constraintLeft_toLeftOf="parent"
21
            app:layout_constraintRight_toRightOf="parent"
22
            app:layout_constraintTop_toTopOf="parent" />
23
24
25
        <android.support.constraint.ConstraintLayout
26
            android:layout_width="0dp"
27
            android:layout_height="44dp"
28
            app:layout_constraintEnd_toEndOf="parent"
29
            app:layout_constraintStart_toStartOf="parent"
30
            app:layout_constraintTop_toTopOf="parent">
31
32
        </android.support.constraint.ConstraintLayout>
33
34
    </android.support.constraint.ConstraintLayout>
35
</android.support.constraint.ConstraintLayout>