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
            sv_show_comment_ll;
56
            sv_show_comment_ll;
57
    private TextView sv_show_comment_count_tv, sv_show_like_tv, sv_show_tvcon,
57
    private TextView sv_show_comment_count_tv, sv_show_like_tv, sv_show_tvcon,
58
            sv_show_user_name, sv_show_user_time, sv_show_topic_con, vd_title_tv;
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
    private View sv_show_tvcon_more;
61
    private View sv_show_tvcon_more;
62
62
137
        sv_show_comment_count_tv.setText(talkRecommendBean.commentNums + "");
137
        sv_show_comment_count_tv.setText(talkRecommendBean.commentNums + "");
138
        sv_show_like_tv.setText(talkRecommendBean.likeNums + "");
138
        sv_show_like_tv.setText(talkRecommendBean.likeNums + "");
139
        sv_show_tvcon.setText(talkRecommendBean.content);
139
        sv_show_tvcon.setText(talkRecommendBean.content);
140
        sv_show_tvcon.setText(talkRecommendBean.title);
140
        sv_show_user_name.setText(talkRecommendBean.nickName);
141
        sv_show_user_name.setText(talkRecommendBean.nickName);
141
        String time = TimeUtil.getTimeFormatText(talkRecommendBean.addTime);
142
        String time = ""+talkRecommendBean.addTime;
142
        sv_show_user_time.setText(time);
143
        sv_show_user_time.setText(time);
143
        sv_show_topic_con.setText(talkRecommendBean.topicName);
144
        sv_show_topic_con.setText(talkRecommendBean.topicName);
144
145
151
                    .into(sv_show_user_avatar);
152
                    .into(sv_show_user_avatar);
152
        } else {
153
        } else {
153
            Picasso.with(activity)
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
                    .placeholder(R.drawable.icon_face2_0)
156
                    .placeholder(R.drawable.icon_face2_0)
156
                    .error(R.drawable.icon_face2_0)
157
                    .error(R.drawable.icon_face2_0)
157
                    .transform(new CircleTransform())
158
                    .transform(new CircleTransform())
165
            // sv_show_like_img  not like
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
            sv_show_tvcon_more.setVisibility(View.VISIBLE);
170
            sv_show_tvcon_more.setVisibility(View.VISIBLE);
170
        } else {
171
        } else {
171
            sv_show_tvcon_more.setVisibility(View.GONE);
172
            sv_show_tvcon_more.setVisibility(View.GONE);
246
    }
247
    }
247
248
248
    private void initPlayer(View view) {
249
    private void initPlayer(View view) {
250
        playIcon = view.findViewById(R.id.view_show_icon);
249
        upVideoView2 = view.findViewById(R.id.view_show_video);
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
    ZoomingViewpager zoomingViewpager;
267
    ZoomingViewpager zoomingViewpager;

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

51
        videoPublishClose.setOnClickListener(this);
51
        videoPublishClose.setOnClickListener(this);
52
52
53
53
54
        videoPublishTopicCon.setText(talkRecommendBean.title);
54
        videoPublishTopicCon.setText(talkRecommendBean.topicName);
55
        videoPublishCon.setText(talkRecommendBean.title);
55
        videoPublishCon.setText(talkRecommendBean.title);
56
56
57
        if (TextUtils.isEmpty(talkRecommendBean.headImgUrl)) {
57
        if (TextUtils.isEmpty(talkRecommendBean.headImgUrl)) {

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

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

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

12
        android:layout_width="match_parent"
12
        android:layout_width="match_parent"
13
        android:layout_height="match_parent" />
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
    <include layout="@layout/view_show_bottom" />
23
    <include layout="@layout/view_show_bottom" />
16
24
17
</RelativeLayout>
25
</RelativeLayout>

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

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