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" }

cdzApp - Gogs: Go Git Service

充电桩app代码

huyuguo 578e41f0e1 埋点 7 年之前
..
SmallVideoLib2 d2f405e921 add video play 7 年之前
picture_library 578e41f0e1 埋点 7 年之前