an rel="diff-8ea5c669ca973ea368d21824361ee6d280c022c8R255">255
        TextView isTop;
256
        TextView title;
257
        ConstraintLayout authorInfo;
258
        ImageView headImage;
259
        TextView nickName;
260
        ConstraintLayout likeInfo;
261
        ImageView likeIcon;
262
        TextView likeNum;
263
264
        ConstraintLayout topic_item;
265
        ImageView topicCoverImage;
266
        TextView topicTitle;
267
104 268
105 269
        public ContentViewHolder(View itemView) {
106 270
            super(itemView);
107
        }
108
    }
271
            image_video_item = itemView.findViewById(R.id.image_video_item);
272
            coverImage = itemView.findViewById(R.id.coverImage);
273
            videoIcon = itemView.findViewById(R.id.videoIcon);
274
            isTop = itemView.findViewById(R.id.isTop);
275
            title = itemView.findViewById(R.id.title);
276
            authorInfo = itemView.findViewById(R.id.authorInfo);
277
            headImage = itemView.findViewById(R.id.headImage);
278
            nickName = itemView.findViewById(R.id.nickName);
279
            likeInfo = itemView.findViewById(R.id.likeInfo);
280
            likeIcon = itemView.findViewById(R.id.likeIcon);
281
            likeNum = itemView.findViewById(R.id.likeNum);
109 282
283
            // 默认是隐藏的,只有在首页信息流里面插入的话题才会显示
284
            topic_item = itemView.findViewById(R.id.topic_item);
285
            topicCoverImage = itemView.findViewById(R.id.topicCoverImage);
286
            topicTitle = itemView.findViewById(R.id.topicTitle);
110 287
288
        }
289
    }
111 290
}

+ 4 - 4
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

@ -73,10 +73,10 @@ public class MainApplication extends MultiDexApplication {
73 73
    public static String firstPoint = "";
74 74
    public static Boolean firstSsyd;
75 75
    public static String password = "";
76
    public static String url = "http://59.110.68.162";// 充电桩测试环境
77
//    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
78
    public static String urlNew = "http://123.56.67.7:83/api/0200";// 一电测试环境
79
//    public static String urlNew = "https://api.touchev.com:83/api/0200";// 一电正式环境
76
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
77
    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
78
//    public static String urlNew = "http://123.56.67.7:83/api/0200";// 一电测试环境
79
    public static String urlNew = "https://api.touchev.com:83/api/0200";// 一电正式环境
80 80
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
81 81
    //	public static String url = "https://cdz.d1ev.com";
82 82
    public static String build_flag = "0";

+ 28 - 22
app/src/main/java/com/electric/chargingpile/data/HomePageBean.java

@ -5,29 +5,35 @@ import java.util.ArrayList;
5 5
public class HomePageBean {
6 6
7 7
8
    public ArrayList<TalkRecommendBean> list;
9
    public HomePageuserVo userVo;
8
    public ArrayList<ChatRecommendBean> list; // 话题下的内容信息集合
9
    public HomePageTopicBean topicVo;
10 10
11
    public class HomePageuserVo {
12
        public String nickName;
13
        public String headImgUrl;
14
        public String carName;
15
        public int topicNums;
11
    public class HomePageTopicBean {
12
        public String topicId; // 话题ID
13
        public String name; // 话题名称
14
        public String coverImgUrl; // 话题封面图片
15
        public String desc; // 话题描述
16
        public int joinNums; // 参与该话题的人数(最多显示4位,超过4位,以千进位,显示1.1W,小数点后1位)
17
        public int visitNums; // 访问量
16 18
17
        public long targetId;
18
        public long addUserId;
19
        public int targetType;
20
        public String title;
21
        public String carSeriesName;
22
        public String topicName;
23
        public String coverImgUrl;
24
        public String shareUrl;
25
        public String[] imgUrls;
26
        public int topicId;
27
        public int likeNums;
28
        public int commentNums;
29
        public int isTop;
30
        public int likeFlg;
31
        public int source;
19
        @Override
20
        public String toString() {
21
            return "HomePageTopicBean{" +
22
                    "topicId='" + topicId + '\'' +
23
                    ", name='" + name + '\'' +
24
                    ", coverImgUrl='" + coverImgUrl + '\'' +
25
                    ", desc='" + desc + '\'' +
26
                    ", joinNums=" + joinNums +
27
                    ", visitNums=" + visitNums +
28
                    '}';
29
        }
30
    }
31
32
    @Override
33
    public String toString() {
34
        return "HomePageBean{" +
35
                "list=" + list +
36
                ", topicVo=" + topicVo +
37
                '}';
32 38
    }
33 39
}

+ 195 - 3
app/src/main/res/layout/activity_chat_content.xml

@ -1,6 +1,198 @@
1 1
<?xml version="1.0" encoding="utf-8"?>
2
<android.support.constraint.ConstraintLayout
3
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
4
    android:layout_height="match_parent">
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="wrap_content"
6
    android:layout_height="wrap_content"
7
    android:layout_marginBottom="10dp"
8
    android:background="#ffffff">
9
10
    <android.support.constraint.ConstraintLayout
11
        android:id="@+id/image_video_item"
12
        android:layout_width="wrap_content"
13
        android:layout_height="wrap_content"
14
        app:layout_constraintBottom_toBottomOf="parent"
15
        app:layout_constraintEnd_toEndOf="parent"
16
        app:layout_constraintStart_toStartOf="parent"
17
        app:layout_constraintTop_toTopOf="parent">
18
19
        <ImageView
20
            android:id="@+id/coverImage"
21
            android:layout_width="168dp"
22
            android:layout_height="147dp"
23
            android:contentDescription="信息图片"
24
            app:layout_constraintEnd_toEndOf="parent"
25
            app:layout_constraintStart_toStartOf="parent"
26
            app:layout_constraintTop_toTopOf="parent"
27
            tools:srcCompat="@tools:sample/avatars[0]" />
28
29
        <ImageView
30
            android:id="@+id/videoIcon"
31
            android:layout_width="wrap_content"
32
            android:layout_height="wrap_content"
33
            android:src="@drawable/app_talk_video_icon"
34
            android:visibility="gone"
35
            app:layout_constraintBottom_toBottomOf="@+id/coverImage"
36
            app:layout_constraintLeft_toLeftOf="@+id/coverImage"
37
            app:layout_constraintRight_toRightOf="@+id/coverImage"
38
            app:layout_constraintTop_toTopOf="@+id/coverImage"
39
            tools:visibility="visible" />
40
41
        <TextView
42
            android:id="@+id/isTop"
43
            android:layout_width="wrap_content"
44
            android:layout_height="wrap_content"
45
            android:layout_marginTop="10dp"
46
            android:layout_marginRight="10dp"
47
            android:background="@color/white"
48
            android:paddingLeft="4dp"
49
            android:paddingRight="4dp"
50
            android:text="置顶"
51
            android:textColor="@color/color_fb9349"
52
            android:textSize="14sp"
53
            android:visibility="gone"
54
            app:layout_constraintRight_toRightOf="@+id/coverImage"
55
            app:layout_constraintTop_toTopOf="@+id/coverImage"
56
            tools:visibility="visible" />
57
58
        <TextView
59
            android:id="@+id/title"
60
            android:layout_width="0dp"
61
            android:layout_height="wrap_content"
62
            android:layout_marginLeft="10dp"
63
            android:layout_marginTop="10dp"
64
            android:layout_marginRight="10dp"
65
            android:ellipsize="end"
66
            android:maxLines="2"
67
            android:textColor="#222222"
68
            android:textSize="15sp"
69
            app:layout_constraintEnd_toEndOf="parent"
70
            app:layout_constraintStart_toStartOf="parent"
71
            app:layout_constraintTop_toBottomOf="@+id/coverImage"
72
            tools:text="汽车上的“保命油”到底该多久换一次?汽车上的“保命油”到底该多久换一次?" />
73
74
        <android.support.constraint.ConstraintLayout
75
            android:layout_width="0dp"
76
            android:layout_height="48dp"
77
            app:layout_constraintLeft_toLeftOf="parent"
78
            app:layout_constraintRight_toRightOf="parent"
79
            app:layout_constraintTop_toBottomOf="@+id/title">
80
81
            <android.support.constraint.ConstraintLayout
82
                android:id="@+id/authorInfo"
83
                android:layout_width="wrap_content"
84
                android:layout_height="0dp"
85
                android:paddingLeft="10dp"
86
                android:paddingRight="10dp"
87
                app:layout_constraintBottom_toBottomOf="parent"
88
                app:layout_constraintLeft_toLeftOf="parent"
89
                app:layout_constraintTop_toTopOf="parent">
90
91
                <ImageView
92
                    android:id="@+id/headImage"
93
                    android:layout_width="20dp"
94
                    android:layout_height="20dp"
95
                    app:layout_constraintBottom_toBottomOf="parent"
96
                    app:layout_constraintStart_toStartOf="parent"
97
                    app:layout_constraintTop_toTopOf="parent"
98
                    tools:srcCompat="@tools:sample/avatars[1]" />
99
100
                <TextView
101
                    android:id="@+id/nickName"
102
                    android:layout_width="wrap_content"
103
                    android:layout_height="wrap_content"
104
                    android:layout_marginStart="5dp"
105
                    android:textColor="#888888"
106
                    android:textSize="14sp"
107
                    app:layout_constraintBottom_toBottomOf="parent"
108
                    app:layout_constraintLeft_toRightOf="@+id/headImage"
109
                    app:layout_constraintTop_toTopOf="parent"
110
                    tools:text="妮妮" />
111
            </android.support.constraint.ConstraintLayout>
112
113
            <android.support.constraint.ConstraintLayout
114
                android:id="@+id/likeInfo"
115
                android:layout_width="wrap_content"
116
                android:layout_height="0dp"
117
                android:paddingLeft="10dp"
118
                android:paddingRight="10dp"
119
                app:layout_constraintBottom_toBottomOf="parent"
120
                app:layout_constraintRight_toRightOf="parent"
121
                app:layout_constraintTop_toTopOf="parent">
122
123
                <ImageView
124
                    android:id="@+id/likeIcon"
125
                    android:layout_width="16dp"
126
                    android:layout_height="16dp"
127
                    android:background="@drawable/app_talk_main_list_zan_icon"
128
                    android:contentDescription="点赞图片"
129
                    app:layout_constraintBottom_toBottomOf="parent"
130
                    app:layout_constraintRight_toLeftOf="@+id/likeNum"
131
                    app:layout_constraintTop_toTopOf="parent" />
132
133
                <TextView
134
                    android:id="@+id/likeNum"
135
                    android:layout_width="wrap_content"
136
                    android:layout_height="wrap_content"
137
                    android:paddingLeft="5dp"
138
                    android:textColor="#888888"
139
                    android:textSize="13sp"
140
                    app:layout_constraintBottom_toBottomOf="parent"
141
                    app:layout_constraintRight_toRightOf="parent"
142
                    app:layout_constraintTop_toTopOf="parent"
143
                    tools:text="11W" />
144
            </android.support.constraint.ConstraintLayout>
145
146
        </android.support.constraint.ConstraintLayout>
147
    </android.support.constraint.ConstraintLayout>
148
149
    <android.support.constraint.ConstraintLayout
150
        android:id="@+id/topic_item"
151
        android:layout_width="wrap_content"
152
        android:layout_height="wrap_content"
153
        android:visibility="gone"
154
        app:layout_constraintBottom_toBottomOf="parent"
155
        app:layout_constraintLeft_toLeftOf="parent"
156
        app:layout_constraintRight_toRightOf="parent"
157
        app:layout_constraintTop_toTopOf="parent">
158
159
        <ImageView
160
            android:id="@+id/topicCoverImage"
161
            android:layout_width="168dp"
162
            android:layout_height="147dp"
163
            android:contentDescription="话题图片"
164
            app:layout_constraintBottom_toBottomOf="parent"
165
            app:layout_constraintLeft_toLeftOf="parent"
166
            app:layout_constraintRight_toRightOf="parent"
167
            app:layout_constraintTop_toTopOf="parent"
168
            tools:srcCompat="@tools:sample/avatars[7]" />
169
170
        <ImageView
171
            android:layout_width="0dp"
172
            android:layout_height="0dp"
173
            android:alpha="0.5"
174
            android:background="#000000"
175
            android:contentDescription="话题遮罩"
176
            app:layout_constraintBottom_toBottomOf="@+id/topicCoverImage"
177
            app:layout_constraintLeft_toLeftOf="@+id/topicCoverImage"
178
            app:layout_constraintRight_toRightOf="@+id/topicCoverImage"
179
            app:layout_constraintTop_toTopOf="@id/topicCoverImage" />
180
181
        <TextView
182
            android:id="@+id/topicTitle"
183
            android:layout_width="0dp"
184
            android:layout_height="wrap_content"
185
            android:ellipsize="end"
186
            android:maxLines="3"
187
            android:paddingLeft="10dp"
188
            android:paddingRight="10dp"
189
            android:textColor="#ffffff"
190
            android:textSize="15sp"
191
            app:layout_constraintBottom_toBottomOf="@+id/topicCoverImage"
192
            app:layout_constraintLeft_toLeftOf="@+id/topicCoverImage"
193
            app:layout_constraintRight_toRightOf="@+id/topicCoverImage"
194
            app:layout_constraintTop_toTopOf="@id/topicCoverImage"
195
            tools:text="新能源汽车发展趋势" />
196
    </android.support.constraint.ConstraintLayout>
5 197
6 198
</android.support.constraint.ConstraintLayout>

+ 1 - 0
app/src/main/res/layout/activity_topic_detail.xml

@ -11,6 +11,7 @@
11 11
        android:id="@+id/navBar"
12 12
        android:layout_width="0dp"
13 13
        android:layout_height="44dp"
14
        android:background="#ffffff"
14 15
        app:layout_constraintEnd_toEndOf="parent"
15 16
        app:layout_constraintStart_toStartOf="parent"
16 17
        app:layout_constraintTop_toTopOf="parent">

+ 45 - 10
app/src/main/res/layout/activity_topic_detail_header.xml

@ -2,6 +2,7 @@
2 2
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4 4
    xmlns:tools="http://schemas.android.com/tools"
5
    android:id="@+id/topicDetailHeader"
5 6
    android:layout_width="match_parent"
6 7
    android:layout_height="260dp">
7 8
@ -24,7 +25,7 @@
24 25
            tools:srcCompat="@tools:sample/avatars" />
25 26
26 27
        <TextView
27
            android:id="@+id/title"
28
            android:id="@+id/name"
28 29
            android:layout_width="0dp"
29 30
            android:layout_height="0dp"
30 31
            android:layout_marginStart="5dp"
@ -49,6 +50,7 @@
49 50
            android:layout_marginStart="15dp"
50 51
            android:layout_marginTop="15dp"
51 52
            android:layout_marginEnd="15dp"
53
            android:ellipsize="end"
52 54
            android:maxLines="3"
53 55
            android:textColor="#555555"
54 56
            android:textSize="15sp"
@ -70,7 +72,7 @@
70 72
            app:layout_constraintStart_toStartOf="parent" />
71 73
72 74
        <TextView
73
            android:id="@+id/readTextView"
75
            android:id="@+id/read"
74 76
            android:layout_width="wrap_content"
75 77
            android:layout_height="wrap_content"
76 78
            android:layout_marginStart="5dp"
@ -90,17 +92,17 @@
90 92
            android:text="参与"
91 93
            android:textColor="#555555"
92 94
            android:textSize="12sp"
93
            app:layout_constraintBottom_toBottomOf="@+id/readTextView"
94
            app:layout_constraintStart_toEndOf="@+id/readTextView"
95
            app:layout_constraintTop_toTopOf="@+id/readTextView" />
95
            app:layout_constraintBottom_toBottomOf="@+id/read"
96
            app:layout_constraintStart_toEndOf="@+id/read"
97
            app:layout_constraintTop_toTopOf="@+id/read" />
96 98
97 99
        <TextView
98
            android:id="@+id/joinTextView"
100
            android:id="@+id/join"
99 101
            android:layout_width="wrap_content"
100 102
            android:layout_height="wrap_content"
101 103
            android:layout_marginStart="5dp"
102 104
            android:gravity="center_vertical"
103
            android:text="32"
105
            tools:text="32"
104 106
            android:textColor="#555555"
105 107
            android:textSize="12sp"
106 108
            app:layout_constraintBottom_toBottomOf="@+id/joinLabel"
@ -108,12 +110,45 @@
108 110
            app:layout_constraintTop_toTopOf="@+id/joinLabel" />
109 111
    </android.support.constraint.ConstraintLayout>
110 112
111
    <LinearLayout
113
    <android.support.constraint.ConstraintLayout
112 114
        android:layout_width="0dp"
113 115
        android:layout_height="50dp"
114
        android:background="#ff00ff"
116
        android:background="#ffffff"
115 117
        android:orientation="horizontal"
116 118
        app:layout_constraintBottom_toBottomOf="parent"
117 119
        app:layout_constraintEnd_toEndOf="parent"
118
        app:layout_constraintStart_toStartOf="parent"></LinearLayout>
120
        app:layout_constraintStart_toStartOf="parent">
121
122
        <android.support.constraint.ConstraintLayout
123
            android:layout_width="wrap_content"
124
            android:layout_height="0dp"
125
            android:paddingLeft="15dp"
126
            android:paddingRight="15dp"
127
            app:layout_constraintBottom_toBottomOf="parent"
128
            app:layout_constraintStart_toStartOf="parent"
129
            app:layout_constraintTop_toTopOf="parent">
130
131
            <TextView
132
                android:id="@+id/sortTextView"
133
                android:layout_width="wrap_content"
134
                android:layout_height="match_parent"
135
                android:layout_weight="1"
136
                android:gravity="center_vertical"
137
                android:text="最新发布"
138
                android:textColor="#02B637"
139
                android:textSize="12sp"
140
                app:layout_constraintBottom_toBottomOf="parent"
141
                app:layout_constraintStart_toStartOf="parent"
142
                app:layout_constraintTop_toTopOf="parent" />
143
144
            <ImageView
145
                android:id="@+id/sortCursor"
146
                android:layout_width="wrap_content"
147
                android:layout_height="wrap_content"
148
                android:src="@drawable/app_topic_detaic_popup_icon"
149
                app:layout_constraintBottom_toBottomOf="parent"
150
                app:layout_constraintLeft_toRightOf="@+id/sortTextView"
151
                app:layout_constraintTop_toTopOf="parent" />
152
        </android.support.constraint.ConstraintLayout>
153
    </android.support.constraint.ConstraintLayout>
119 154
</android.support.constraint.ConstraintLayout>

+ 1 - 4
build.gradle

@ -8,8 +8,7 @@ buildscript {
8 8
//        appKey = 'mnhwhy8jP7Fq2G6b' // 注册时分配的App Key
9 9
//    }
10 10
    repositories {
11
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
12
        maven{ url 'https://maven.aliyun.com/repository/google' }
11
13 12
        jcenter()
14 13
        google()
15 14
    }
@ -24,8 +23,6 @@ buildscript {
24 23
}
25 24
allprojects {
26 25
    repositories {
27
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
28
        maven{ url 'https://maven.aliyun.com/repository/google' }
29 26
        jcenter()
30 27
        google()
31 28
        maven { url "https://jitpack.io" }

dudu/cdzApp - Gogs: Go Git Service

2 次代碼提交 (2ae57b26bb11407116f12325278a757f9f94958a)

作者 SHA1 備註 提交日期
  1145873331@qq.com e1cf244fe0 remove Useless dependence 7 年之前
  dxh 06bd894653 init 7 年之前