Browse Source

modify user avatar

dxh 6 years ago
parent
commit
0b7c0f62ae

+ 19 - 4
app/src/main/java/com/electric/chargingpile/fragment/SvVideoShowView.java

@ -56,7 +56,7 @@ public class SvVideoShowView implements View.OnClickListener {
56 56
            sv_show_comment_ll;
57 57
    private TextView sv_show_comment_count_tv, sv_show_like_tv, sv_show_tvcon,
58 58
            sv_show_user_name, sv_show_user_time, sv_show_topic_con, vd_title_tv;
59
    private ImageView sv_show_like_img, sv_show_user_avatar;
59
    private ImageView sv_show_like_img, sv_show_user_avatar,playIcon;
60 60
61 61
    private View sv_show_tvcon_more;
62 62
@ -137,8 +137,9 @@ public class SvVideoShowView implements View.OnClickListener {
137 137
        sv_show_comment_count_tv.setText(talkRecommendBean.commentNums + "");
138 138
        sv_show_like_tv.setText(talkRecommendBean.likeNums + "");
139 139
        sv_show_tvcon.setText(talkRecommendBean.content);
140
        sv_show_tvcon.setText(talkRecommendBean.title);
140 141
        sv_show_user_name.setText(talkRecommendBean.nickName);
141
        String time = TimeUtil.getTimeFormatText(talkRecommendBean.addTime);
142
        String time = ""+talkRecommendBean.addTime;
142 143
        sv_show_user_time.setText(time);
143 144
        sv_show_topic_con.setText(talkRecommendBean.topicName);
144 145
@ -151,7 +152,7 @@ public class SvVideoShowView implements View.OnClickListener {
151 152
                    .into(sv_show_user_avatar);
152 153
        } else {
153 154
            Picasso.with(activity)
154
                    .load("http://cdz.evcharge.cc/zhannew/uploadfile/"+talkRecommendBean.headImgUrl)
155
                    .load("http://cdz.evcharge.cc/zhannew/uploadfile/" + talkRecommendBean.headImgUrl)
155 156
                    .placeholder(R.drawable.icon_face2_0)
156 157
                    .error(R.drawable.icon_face2_0)
157 158
                    .transform(new CircleTransform())
@ -165,7 +166,7 @@ public class SvVideoShowView implements View.OnClickListener {
165 166
            // sv_show_like_img  not like
166 167
        }
167 168
168
        if (sv_show_tvcon.getLineCount() >= 3) {
169
        if (sv_show_tvcon.getLineCount() > 3) {
169 170
            sv_show_tvcon_more.setVisibility(View.VISIBLE);
170 171
        } else {
171 172
            sv_show_tvcon_more.setVisibility(View.GONE);
@ -246,7 +247,21 @@ public class SvVideoShowView implements View.OnClickListener {
246 247
    }
247 248
248 249
    private void initPlayer(View view) {
250
        playIcon = view.findViewById(R.id.view_show_icon);
249 251
        upVideoView2 = view.findViewById(R.id.view_show_video);
252
        upVideoView2.setOnClickListener(new View.OnClickListener() {
253
            @Override
254
            public void onClick(View view) {
255
                boolean playing = upVideoView2.isPlaying();
256
                if (playing) {
257
                    upVideoView2.pause();
258
                    playIcon.setVisibility(View.VISIBLE);
259
                } else {
260
                    playIcon.setVisibility(View.GONE);
261
                    upVideoView2.start();
262
                }
263
            }
264
        });
250 265
    }
251 266
252 267
    ZoomingViewpager zoomingViewpager;

+ 1 - 1
app/src/main/java/com/electric/chargingpile/view/VideoPubilshDialog.java

@ -51,7 +51,7 @@ public class VideoPubilshDialog extends Dialog implements View.OnClickListener {
51 51
        videoPublishClose.setOnClickListener(this);
52 52
53 53
54
        videoPublishTopicCon.setText(talkRecommendBean.title);
54
        videoPublishTopicCon.setText(talkRecommendBean.topicName);
55 55
        videoPublishCon.setText(talkRecommendBean.title);
56 56
57 57
        if (TextUtils.isEmpty(talkRecommendBean.headImgUrl)) {

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

@ -122,6 +122,7 @@
122 122
        android:layout_marginLeft="39dp"
123 123
        android:layout_marginRight="39dp"
124 124
        android:layout_marginBottom="23dp"
125
        android:textColor="#E2E2E2"
125 126
        android:ellipsize="end"
126 127
        android:maxLines="3"
127 128
        android:textSize="14sp" />

+ 8 - 0
app/src/main/res/layout/view_show_view.xml

@ -12,6 +12,14 @@
12 12
        android:layout_width="match_parent"
13 13
        android:layout_height="match_parent" />
14 14
15
    <ImageView
16
        android:id="@+id/view_show_icon"
17
        android:layout_width="40dp"
18
        android:layout_height="40dp"
19
        android:visibility="gone"
20
        android:layout_centerInParent="true"
21
        android:background="@drawable/app_talk_video_icon"/>
22
15 23
    <include layout="@layout/view_show_bottom" />
16 24
17 25
</RelativeLayout>

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

@ -6,6 +6,7 @@
6 6
7 7
    <com.electric.chargingpile.widge.photoview.ZoomingViewpager
8 8
        android:id="@+id/view_show_zoomingphoto"
9
        android:layout_marginTop="48dp"
9 10
        android:layout_width="match_parent"
10 11
        android:layout_height="match_parent" />
11 12