fix [修复-关注状态问题、动态必填信息问题]
This commit is contained in:
parent
35e0d3dc3e
commit
954a14662b
@ -38,7 +38,7 @@
|
|||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:padding="1dp"
|
android:padding="1dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_oval="true" />
|
app:riv_corner_radius="20dp" />
|
||||||
|
|
||||||
<pl.droidsonroids.gif.GifImageView
|
<pl.droidsonroids.gif.GifImageView
|
||||||
android:id="@+id/liveStatus"
|
android:id="@+id/liveStatus"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
android:id="@+id/avatar01"
|
android:id="@+id/avatar01"
|
||||||
android:layout_width="23dp"
|
android:layout_width="23dp"
|
||||||
android:layout_height="23dp"
|
android:layout_height="23dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/icon_data_empty"
|
android:src="@mipmap/icon_data_empty"
|
||||||
app:riv_corner_radius="20dp" />
|
app:riv_corner_radius="20dp" />
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/icon_data_empty"
|
android:src="@mipmap/icon_data_empty"
|
||||||
app:riv_oval="true" />
|
app:riv_oval="true" />
|
||||||
|
|
||||||
@ -123,6 +124,7 @@
|
|||||||
android:id="@+id/avatar01"
|
android:id="@+id/avatar01"
|
||||||
android:layout_width="23dp"
|
android:layout_width="23dp"
|
||||||
android:layout_height="23dp"
|
android:layout_height="23dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
android:src="@mipmap/icon_data_empty"
|
android:src="@mipmap/icon_data_empty"
|
||||||
app:riv_corner_radius="20dp" />
|
app:riv_corner_radius="20dp" />
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.SparseArray;
|
import android.util.SparseArray;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
@ -30,6 +31,7 @@ import com.yunbao.common.bean.ActiveBean;
|
|||||||
import com.yunbao.common.bean.CommentBean;
|
import com.yunbao.common.bean.CommentBean;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.dialog.ImagePreviewDialog;
|
import com.yunbao.common.dialog.ImagePreviewDialog;
|
||||||
|
import com.yunbao.common.event.FollowEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
@ -44,9 +46,14 @@ import com.yunbao.common.utils.StringUtil;
|
|||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.NineGridLayout;
|
import com.yunbao.common.views.NineGridLayout;
|
||||||
import com.yunbao.common.views.TopGradual;
|
import com.yunbao.common.views.TopGradual;
|
||||||
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
import com.yunbao.share.bean.ShareBean;
|
import com.yunbao.share.bean.ShareBean;
|
||||||
import com.yunbao.share.ui.SharePopDialog;
|
import com.yunbao.share.ui.SharePopDialog;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -103,6 +110,7 @@ public class CommunityDetailsActivity extends AbsActivity {
|
|||||||
activeId = getIntent().getStringExtra(Constants.TO_COMMUNITY_ID);
|
activeId = getIntent().getStringExtra(Constants.TO_COMMUNITY_ID);
|
||||||
initView();
|
initView();
|
||||||
initData();
|
initData();
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
@ -366,6 +374,27 @@ public class CommunityDetailsActivity extends AbsActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听关注变化事件
|
||||||
|
*/
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onFollowEvent(FollowEvent e) {
|
||||||
|
if (!TextUtils.isEmpty(activeBean.getUser_id()) && activeBean.getUser_id().equals(e.getToUid())) {
|
||||||
|
activeBean.setIs_attention(String.valueOf(e.getIsAttention()));
|
||||||
|
if (e.getIsAttention() == 1) {//关注
|
||||||
|
ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_followed, followIcon);
|
||||||
|
followName.setText(getResources().getString(R.string.following));
|
||||||
|
followName.setTextColor(Color.parseColor("#777777"));
|
||||||
|
followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type_1));
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_follow, followIcon);
|
||||||
|
followName.setText(getResources().getString(R.string.follow));
|
||||||
|
followName.setTextColor(getResources().getColor(R.color.white));
|
||||||
|
followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("UseCompatLoadingForDrawables")
|
@SuppressLint("UseCompatLoadingForDrawables")
|
||||||
private void initData() {
|
private void initData() {
|
||||||
LiveNetManager.get(mContext).getDynamicInfo(activeId, new com.yunbao.common.http.base.HttpCallback<ActiveBean>() {
|
LiveNetManager.get(mContext).getDynamicInfo(activeId, new com.yunbao.common.http.base.HttpCallback<ActiveBean>() {
|
||||||
|
@ -86,7 +86,7 @@ public class CommunitySendActivity extends AbsActivity {
|
|||||||
private List<String> imgUrlList = new ArrayList<>();
|
private List<String> imgUrlList = new ArrayList<>();
|
||||||
private String videoUrl;
|
private String videoUrl;
|
||||||
List<NewCommunityType> newCommunityTypeList = new ArrayList<>();
|
List<NewCommunityType> newCommunityTypeList = new ArrayList<>();
|
||||||
int talkId;
|
int talkId = 0;
|
||||||
Dialog dialog;
|
Dialog dialog;
|
||||||
private Uri videoUri;
|
private Uri videoUri;
|
||||||
|
|
||||||
@ -129,10 +129,6 @@ public class CommunitySendActivity extends AbsActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtil.isEmpty(talkContent.getText().toString())) {
|
|
||||||
ToastUtil.show(mContext.getResources().getString(com.yunbao.main.R.string.please_input_content));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
List<UploadBean> uploadBeanList = new ArrayList<>();
|
List<UploadBean> uploadBeanList = new ArrayList<>();
|
||||||
if (isImage) {
|
if (isImage) {
|
||||||
for (int i = 0; i < activeImageAdapter.getImageFileList().size(); i++) {
|
for (int i = 0; i < activeImageAdapter.getImageFileList().size(); i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user