收藏房间
This commit is contained in:
@@ -14,6 +14,7 @@ import android.support.v7.widget.AppCompatImageView;
|
|||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewConfiguration;
|
import android.view.ViewConfiguration;
|
||||||
@@ -95,6 +96,7 @@ import java.net.MalformedURLException;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import cn.sharesdk.framework.Platform;
|
import cn.sharesdk.framework.Platform;
|
||||||
@@ -147,6 +149,9 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
|
|||||||
|
|
||||||
private ShareDialog shareDialog;
|
private ShareDialog shareDialog;
|
||||||
|
|
||||||
|
//收藏房间
|
||||||
|
private String FOLLOW_ROOM_TYPE = "";
|
||||||
|
//取消收藏房间
|
||||||
|
|
||||||
public static HomePartyFragment newInstance(long roomUid, boolean isRoomMin) {
|
public static HomePartyFragment newInstance(long roomUid, boolean isRoomMin) {
|
||||||
HomePartyFragment homePartyFragment = new HomePartyFragment();
|
HomePartyFragment homePartyFragment = new HomePartyFragment();
|
||||||
@@ -569,6 +574,11 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
|
|||||||
roomTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
|
roomTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// tvFollowRoom.setVisibility(AvRoomDataManager.get().isRoomOwner()?View.GONE:View.VISIBLE);
|
||||||
|
FOLLOW_ROOM_TYPE = AvRoomDataManager.get().isRoomFans?"2":"1";
|
||||||
|
tvFollowRoom.setText(AvRoomDataManager.get().isRoomFans?"已收藏":"收藏");
|
||||||
|
|
||||||
setIdOnlineData();
|
setIdOnlineData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -602,7 +612,7 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case R.id.room_back:
|
case R.id.room_back:
|
||||||
((AVRoomActivity) getActivity()).onBackPressed();
|
(Objects.requireNonNull(getActivity())).onBackPressed();
|
||||||
break;
|
break;
|
||||||
case R.id.iv_room_share:
|
case R.id.iv_room_share:
|
||||||
shareRoom();
|
shareRoom();
|
||||||
@@ -618,14 +628,21 @@ public class HomePartyFragment extends AbsRoomFragment implements View.OnClickLi
|
|||||||
* 收藏房间
|
* 收藏房间
|
||||||
*/
|
*/
|
||||||
private void followRoom() {
|
private void followRoom() {
|
||||||
CollectionRoomModel.get().followRoom(String.valueOf(mUserInfo.getErbanNo()))
|
RoomInfo currentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||||
|
if (currentRoomInfo == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
CollectionRoomModel.get().followRoom(FOLLOW_ROOM_TYPE,mTargetRoomUid)
|
||||||
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
||||||
.doOnError(throwable -> {
|
.doOnError(throwable -> {
|
||||||
toast(throwable.getMessage());
|
toast(throwable.getMessage());
|
||||||
})
|
})
|
||||||
.subscribe(s -> {
|
.subscribe(s -> {
|
||||||
|
AvRoomDataManager.get().isRoomFans = AvRoomDataManager.get().isRoomFans?false:true;
|
||||||
|
FOLLOW_ROOM_TYPE = AvRoomDataManager.get().isRoomFans?"2":"1";
|
||||||
|
tvFollowRoom.setText(AvRoomDataManager.get().isRoomFans?"已收藏":"收藏");
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shareRoom() {
|
public void shareRoom() {
|
||||||
|
@@ -125,6 +125,7 @@ public class AvRoomPresenter extends BaseMvpPresenter<IAvRoomView> {
|
|||||||
AvRoomDataManager.get().nick = roomInfo.getNick();
|
AvRoomDataManager.get().nick = roomInfo.getNick();
|
||||||
AvRoomDataManager.get().gender = roomInfo.getGender();
|
AvRoomDataManager.get().gender = roomInfo.getGender();
|
||||||
AvRoomDataManager.get().avatar = roomInfo.getAvatar();
|
AvRoomDataManager.get().avatar = roomInfo.getAvatar();
|
||||||
|
AvRoomDataManager.get().isRoomFans = roomInfo.isRoomFans();
|
||||||
|
|
||||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_LIST_TYPE,
|
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_ROOM_LIST_TYPE,
|
||||||
"区分房间类型:" + roomInfo.getRoomTypeLable());
|
"区分房间类型:" + roomInfo.getRoomTypeLable());
|
||||||
|
@@ -6,14 +6,20 @@ import android.os.Bundle;
|
|||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import android.support.v7.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import android.support.v7.widget.RecyclerView;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||||
import com.yizhuan.erban.base.BaseActivity;
|
import com.yizhuan.erban.base.BaseActivity;
|
||||||
import com.yizhuan.erban.home.adapter.CollectionRoomAdapter;
|
import com.yizhuan.erban.home.adapter.CollectionRoomAdapter;
|
||||||
import com.yizhuan.erban.home.bean.CollectionRoomInfo;
|
import com.yizhuan.erban.home.bean.CollectionRoomInfo;
|
||||||
import com.yizhuan.erban.home.model.CollectionRoomModel;
|
import com.yizhuan.erban.home.model.CollectionRoomModel;
|
||||||
|
import com.yizhuan.erban.ui.relation.AttentionListActivity;
|
||||||
import com.yizhuan.xchat_android_core.Constants;
|
import com.yizhuan.xchat_android_core.Constants;
|
||||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||||
|
import com.yizhuan.xchat_android_core.user.bean.AttentionInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.user.bean.AttentionItem;
|
||||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,7 +27,7 @@ import java.util.List;
|
|||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
|
||||||
public class CollectionRoomActivity extends BaseActivity {
|
public class CollectionRoomActivity extends BaseActivity implements SwipeRefreshLayout.OnRefreshListener,BaseQuickAdapter.RequestLoadMoreListener{
|
||||||
|
|
||||||
|
|
||||||
@BindView(R.id.recycler_view)
|
@BindView(R.id.recycler_view)
|
||||||
@@ -42,7 +48,12 @@ public class CollectionRoomActivity extends BaseActivity {
|
|||||||
ButterKnife.bind(this);
|
ButterKnife.bind(this);
|
||||||
initTitleBar("我收藏的房间");
|
initTitleBar("我收藏的房间");
|
||||||
initRecyclerView();
|
initRecyclerView();
|
||||||
initSwipRefresh();
|
swipeRefresh.setOnRefreshListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
loadData();
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,37 +65,53 @@ public class CollectionRoomActivity extends BaseActivity {
|
|||||||
private void initRecyclerView() {
|
private void initRecyclerView() {
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
recyclerView.setLayoutManager(new LinearLayoutManager(this));
|
||||||
roomAdapter = new CollectionRoomAdapter();
|
roomAdapter = new CollectionRoomAdapter();
|
||||||
|
roomAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
|
||||||
|
CollectionRoomInfo.FansRoomListBean fansRoomListBean = (CollectionRoomInfo.FansRoomListBean) adapter.getItem(position);
|
||||||
|
switch (view.getId()){
|
||||||
|
case R.id.cl_root:
|
||||||
|
AVRoomActivity.start(CollectionRoomActivity.this,fansRoomListBean.getRoomUid() );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
recyclerView.setAdapter(roomAdapter);
|
recyclerView.setAdapter(roomAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSwipRefresh() {
|
|
||||||
swipeRefresh.setOnRefreshListener(() -> loadData());
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isLoading = false;
|
|
||||||
private void loadData() {
|
private void loadData() {
|
||||||
if (isLoading) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
isLoading = true;
|
|
||||||
CollectionRoomModel.get().getCollectionRoomList(AuthModel.get().getCurrentUid(),page,pageSize)
|
CollectionRoomModel.get().getCollectionRoomList(AuthModel.get().getCurrentUid(),page,pageSize)
|
||||||
.subscribe((serviceResult, throwable) -> {
|
.subscribe((serviceResult, throwable) -> {
|
||||||
if (throwable != null) {
|
if (throwable != null) {
|
||||||
|
swipeRefresh.setRefreshing(false);
|
||||||
} else {
|
} else {
|
||||||
|
swipeRefresh.setRefreshing(false);
|
||||||
List<CollectionRoomInfo.FansRoomListBean> info = serviceResult.getFansRoomList();
|
List<CollectionRoomInfo.FansRoomListBean> info = serviceResult.getFansRoomList();
|
||||||
if (ListUtils.isListEmpty(info)) {
|
if (ListUtils.isListEmpty(info)) {
|
||||||
showNoData(R.drawable.icon_common_failure, "亲爱的用户,你还没有收藏哦!");
|
showNoData(R.drawable.icon_common_failure, "亲爱的用户,你还没有收藏哦!");
|
||||||
return;
|
}else {
|
||||||
|
hideStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
roomAdapter.setNewData(info);
|
roomAdapter.setNewData(info);
|
||||||
roomAdapter.notifyDataSetChanged();
|
roomAdapter.notifyDataSetChanged();
|
||||||
swipeRefresh.setRefreshing(false);
|
|
||||||
isLoading = false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreRequested() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefresh() {
|
||||||
|
loadData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,10 +23,13 @@ public class CollectionRoomAdapter extends BaseQuickAdapter<CollectionRoomInfo.F
|
|||||||
protected void convert(BaseViewHolder helper, CollectionRoomInfo.FansRoomListBean item) {
|
protected void convert(BaseViewHolder helper, CollectionRoomInfo.FansRoomListBean item) {
|
||||||
|
|
||||||
helper.setText(R.id.tv_room_name,item.getRoomName())
|
helper.setText(R.id.tv_room_name,item.getRoomName())
|
||||||
.setText(R.id.room_id,"ID:"+item.getId())
|
.setText(R.id.tv_room_id,"ID:"+item.getRoomUid())
|
||||||
.setText(R.id.tv_room_online_num,item.getRoomOnlineNum());
|
.setText(R.id.tv_room_online_num,item.getRoomOnlineNum() +"");
|
||||||
ImageView imageView = helper.getView(R.id.rriv_room_img);
|
ImageView imageView = helper.getView(R.id.rriv_room_img);
|
||||||
ImageLoadUtilsV2.loadImage(imageView, item.getRoomAvatar());
|
ImageLoadUtilsV2.loadImage(imageView, item.getRoomAvatar());
|
||||||
|
|
||||||
|
helper.addOnClickListener(R.id.cl_root);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -43,6 +43,15 @@ public class CollectionRoomInfo {
|
|||||||
private String roomAvatar;
|
private String roomAvatar;
|
||||||
private String roomName;
|
private String roomName;
|
||||||
private int roomOnlineNum;
|
private int roomOnlineNum;
|
||||||
|
private int roomUid;
|
||||||
|
|
||||||
|
public int getRoomUid() {
|
||||||
|
return roomUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomUid(int roomUid) {
|
||||||
|
this.roomUid = roomUid;
|
||||||
|
}
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@@ -53,8 +53,8 @@ public class RoomListFragment extends BaseMvpFragment<IRoomListFragmentView, Roo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFindViews() {
|
public void onFindViews() {
|
||||||
swipeRefresh = (SwipeRefreshLayout) getView().findViewById(R.id.swipe_refresh);
|
swipeRefresh = getView().findViewById(R.id.swipe_refresh);
|
||||||
recyclerView = (RecyclerView) getView().findViewById(R.id.recycler_view);
|
recyclerView = getView().findViewById(R.id.recycler_view);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,22 +52,22 @@ public class CollectionRoomModel extends BaseModel {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Single<String> followRoom(String roomId){
|
public Single<String> followRoom(String type,long roomUid){
|
||||||
long uid = AuthModel.get().getCurrentUid();
|
long uid = AuthModel.get().getCurrentUid();
|
||||||
String ticket = AuthModel.get().getTicket();
|
String ticket = AuthModel.get().getTicket();
|
||||||
return api.followRoom(String.valueOf(uid),roomId,ticket)
|
return api.followRoom(String.valueOf(uid),String.valueOf(roomUid),type,ticket)
|
||||||
.flatMap(new Function<ServiceResult<String>, SingleSource<String>>() {
|
.flatMap(new Function<ServiceResult<String>, SingleSource<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public SingleSource<String> apply(ServiceResult<String> stringServiceResult) throws Exception {
|
public SingleSource<String> apply(ServiceResult<String> stringServiceResult) throws Exception {
|
||||||
if (stringServiceResult.isSuccess()) {
|
if (stringServiceResult.isSuccess()) {
|
||||||
return Single.just("收藏成功");
|
return Single.just(stringServiceResult.getMessage());
|
||||||
}else {
|
}else {
|
||||||
return Single.error(new Throwable(stringServiceResult.getMessage()));
|
return Single.error(new Throwable(stringServiceResult.getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.doOnSuccess(s -> {
|
.doOnSuccess(s -> {
|
||||||
SingleToastUtil.showToast("收藏成功");
|
|
||||||
})
|
})
|
||||||
.compose(RxHelper.handleSchedulers());
|
.compose(RxHelper.handleSchedulers());
|
||||||
}
|
}
|
||||||
@@ -89,7 +89,8 @@ public class CollectionRoomModel extends BaseModel {
|
|||||||
|
|
||||||
@POST("fans/fansRoom")
|
@POST("fans/fansRoom")
|
||||||
Single<ServiceResult<String>> followRoom(@Query("uid") String uid,
|
Single<ServiceResult<String>> followRoom(@Query("uid") String uid,
|
||||||
@Query("roomId") String roomId,
|
@Query("roomUid") String roomUid,
|
||||||
@Query("ticket") String ticket);
|
@Query("type") String type,
|
||||||
|
@Query("ticket") String ticket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -226,7 +226,7 @@ public class LoginCodeActivity extends BaseLoginAct {
|
|||||||
String shuMeiDeviceId = SmAntiFraud.getDeviceId();
|
String shuMeiDeviceId = SmAntiFraud.getDeviceId();
|
||||||
AuthModel.get().login(
|
AuthModel.get().login(
|
||||||
mPhone,
|
mPhone,
|
||||||
"123456aa",
|
"",
|
||||||
smsCode,
|
smsCode,
|
||||||
yiDunLoginToken,
|
yiDunLoginToken,
|
||||||
shuMeiDeviceId)
|
shuMeiDeviceId)
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.yizhuan.erban.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/status_layout"
|
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
>
|
>
|
||||||
|
|
||||||
<com.yizhuan.erban.base.TitleBar
|
<com.yizhuan.erban.base.TitleBar
|
||||||
@@ -19,13 +19,20 @@
|
|||||||
android:layout_below="@id/title_bar"
|
android:layout_below="@id/title_bar"
|
||||||
>
|
>
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<com.yizhuan.erban.common.widget.StatusLayout
|
||||||
android:id="@+id/recycler_view"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
>
|
android:id="@+id/status_layout">
|
||||||
|
|
||||||
</android.support.v7.widget.RecyclerView>
|
<android.support.v7.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
>
|
||||||
|
|
||||||
|
</android.support.v7.widget.RecyclerView>
|
||||||
|
|
||||||
|
</com.yizhuan.erban.common.widget.StatusLayout>
|
||||||
|
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
</LinearLayout>
|
@@ -102,6 +102,8 @@
|
|||||||
<color name="primary_disabled">#bdbdbd</color>
|
<color name="primary_disabled">#bdbdbd</color>
|
||||||
<!--字体颜色-->
|
<!--字体颜色-->
|
||||||
<color name="text_color_primary">#333333</color>
|
<color name="text_color_primary">#333333</color>
|
||||||
|
<color name="text_color_nim_msg_rec">#5F45D6</color>
|
||||||
|
<color name="text_color_nim_msg_send">#666666</color>
|
||||||
<!-- 列表次要-->
|
<!-- 列表次要-->
|
||||||
<color name="text_color_secondary">#999999</color><!-- 绑定区服列表主要-->
|
<color name="text_color_secondary">#999999</color><!-- 绑定区服列表主要-->
|
||||||
<!-- 添加关注-->
|
<!-- 添加关注-->
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/cl_root"
|
||||||
android:background="@color/white">
|
android:background="@color/white">
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.RectRoundImageView
|
<com.yizhuan.erban.common.widget.RectRoundImageView
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
android:id="@+id/tv_play"
|
android:id="@+id/tv_play"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:text="人在玩"
|
android:text="人在玩"
|
||||||
android:textColor="@color/color_999999"
|
android:textColor="@color/color_999999"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@@ -24,6 +24,7 @@ import com.yizhuan.erban.base.BaseMvpFragment;
|
|||||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||||
import com.yizhuan.erban.community.helper.ShareDynamicHelper;
|
import com.yizhuan.erban.community.helper.ShareDynamicHelper;
|
||||||
import com.yizhuan.erban.community.square.adapter.SquareDynamicAdapter;
|
import com.yizhuan.erban.community.square.adapter.SquareDynamicAdapter;
|
||||||
|
import com.yizhuan.erban.home.activity.CollectionRoomActivity;
|
||||||
import com.yizhuan.erban.miniworld.activity.AllTopicActivity;
|
import com.yizhuan.erban.miniworld.activity.AllTopicActivity;
|
||||||
import com.yizhuan.erban.miniworld.activity.TopicMainActivity;
|
import com.yizhuan.erban.miniworld.activity.TopicMainActivity;
|
||||||
import com.yizhuan.erban.miniworld.adapter.RecommendTopicListAdapter;
|
import com.yizhuan.erban.miniworld.adapter.RecommendTopicListAdapter;
|
||||||
@@ -220,7 +221,8 @@ public class SquareDynamicFragment extends BaseMvpFragment<IMiniWorldCategoryVie
|
|||||||
"分享动态-区分-动态广场");
|
"分享动态-区分-动态广场");
|
||||||
new ShareDynamicHelper(getActivity()).share(bean);
|
new ShareDynamicHelper(getActivity()).share(bean);
|
||||||
} else if (view.getId() == R.id.iv_in_room){
|
} else if (view.getId() == R.id.iv_in_room){
|
||||||
openRoom(bean.getUid());
|
// openRoom(bean.getUid());
|
||||||
|
AVRoomActivity.start(mContext,bean.getUid());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -3,23 +3,26 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.StatusLayout
|
|
||||||
|
<android.support.v4.widget.SwipeRefreshLayout
|
||||||
|
android:id="@+id/refresh_layout"
|
||||||
|
android:focusableInTouchMode="true"
|
||||||
|
android:focusable="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.v4.widget.SwipeRefreshLayout
|
<com.yizhuan.erban.common.widget.StatusLayout
|
||||||
android:id="@+id/refresh_layout"
|
|
||||||
android:focusableInTouchMode="true"
|
|
||||||
android:focusable="true"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/status_layout">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<android.support.v7.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
||||||
android:background="@color/transparent" />
|
android:background="@color/transparent" />
|
||||||
</android.support.v4.widget.SwipeRefreshLayout>
|
</com.yizhuan.erban.common.widget.StatusLayout>
|
||||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
|
||||||
|
|
||||||
|
</android.support.v4.widget.SwipeRefreshLayout>
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
@@ -267,7 +267,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
|||||||
VersionUtil.getLocalName(BasicConfig.INSTANCE.getAppContext()),
|
VersionUtil.getLocalName(BasicConfig.INSTANCE.getAppContext()),
|
||||||
"erban-client",
|
"erban-client",
|
||||||
account,
|
account,
|
||||||
DESAndBase64(password),
|
"",//DESAndBase64(password)
|
||||||
"password",
|
"password",
|
||||||
"uyzjdhds",
|
"uyzjdhds",
|
||||||
code,
|
code,
|
||||||
|
@@ -114,6 +114,11 @@ public final class AvRoomDataManager {
|
|||||||
* 龙珠状态
|
* 龙珠状态
|
||||||
*/
|
*/
|
||||||
public boolean haveStartDragon;
|
public boolean haveStartDragon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房间收藏状态
|
||||||
|
*/
|
||||||
|
public boolean isRoomFans;
|
||||||
/**
|
/**
|
||||||
* 龙珠数组
|
* 龙珠数组
|
||||||
*/
|
*/
|
||||||
@@ -421,6 +426,7 @@ public final class AvRoomDataManager {
|
|||||||
return mCurrentRoomInfo != null && mCurrentRoomInfo.getUid() == AuthModel.get().getCurrentUid();
|
return mCurrentRoomInfo != null && mCurrentRoomInfo.getUid() == AuthModel.get().getCurrentUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void removeManagerMember(String account) {
|
void removeManagerMember(String account) {
|
||||||
if (ListUtils.isListEmpty(mRoomManagerList) || TextUtils.isEmpty(account)) return;
|
if (ListUtils.isListEmpty(mRoomManagerList) || TextUtils.isEmpty(account)) return;
|
||||||
ListIterator<ChatRoomMember> iterator = mRoomManagerList.listIterator();
|
ListIterator<ChatRoomMember> iterator = mRoomManagerList.listIterator();
|
||||||
|
@@ -76,6 +76,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
*/
|
*/
|
||||||
private byte isRecom;
|
private byte isRecom;
|
||||||
|
|
||||||
|
private boolean isRoomFans;
|
||||||
|
|
||||||
private BackgroundBean background;
|
private BackgroundBean background;
|
||||||
//是否有ktv权限的意思
|
//是否有ktv权限的意思
|
||||||
public boolean hasKTVPriv;
|
public boolean hasKTVPriv;
|
||||||
@@ -175,6 +177,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
", tagPict='" + tagPict + '\'' +
|
", tagPict='" + tagPict + '\'' +
|
||||||
", onlineNum=" + onlineNum +
|
", onlineNum=" + onlineNum +
|
||||||
", isRecom=" + isRecom +
|
", isRecom=" + isRecom +
|
||||||
|
", isRoomFans=" + isRoomFans +
|
||||||
", background=" + background +
|
", background=" + background +
|
||||||
", hasKTVPriv=" + hasKTVPriv +
|
", hasKTVPriv=" + hasKTVPriv +
|
||||||
", isOpenKTV=" + isOpenKTV +
|
", isOpenKTV=" + isOpenKTV +
|
||||||
@@ -209,6 +212,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
onlineNum = in.readInt();
|
onlineNum = in.readInt();
|
||||||
limitType = in.readString();
|
limitType = in.readString();
|
||||||
isRecom = in.readByte();
|
isRecom = in.readByte();
|
||||||
|
isRoomFans = in.readBoolean();
|
||||||
avatar = in.readString();
|
avatar = in.readString();
|
||||||
isOpenGame = in.readByte()!=0;
|
isOpenGame = in.readByte()!=0;
|
||||||
isOpenKTV = in.readByte() != 0;
|
isOpenKTV = in.readByte() != 0;
|
||||||
@@ -243,6 +247,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
|||||||
dest.writeString(tagPict);
|
dest.writeString(tagPict);
|
||||||
dest.writeInt(onlineNum);
|
dest.writeInt(onlineNum);
|
||||||
dest.writeByte(isRecom);
|
dest.writeByte(isRecom);
|
||||||
|
dest.writeBoolean(isRoomFans);
|
||||||
dest.writeString(limitType);
|
dest.writeString(limitType);
|
||||||
dest.writeString(avatar);
|
dest.writeString(avatar);
|
||||||
dest.writeByte((byte) (isOpenGame ? 1 : 0));
|
dest.writeByte((byte) (isOpenGame ? 1 : 0));
|
||||||
|
@@ -81,8 +81,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/message_item_name_layout"
|
android:layout_below="@id/message_item_name_layout"
|
||||||
android:layout_toLeftOf="@id/message_item_portrait_right"
|
android:layout_toStartOf="@id/message_item_portrait_right"
|
||||||
android:layout_toRightOf="@id/message_item_portrait_left">
|
android:layout_toEndOf="@id/message_item_portrait_left">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/message_item_body"
|
android:id="@+id/message_item_body"
|
||||||
|
@@ -92,7 +92,7 @@ public class MsgViewHolderAudio extends MsgViewHolderBase {
|
|||||||
containerView.setBackgroundResource(NimUIKitImpl.getOptions().messageLeftBackground);
|
containerView.setBackgroundResource(NimUIKitImpl.getOptions().messageLeftBackground);
|
||||||
containerView.setPadding(ScreenUtil.dip2px(15), ScreenUtil.dip2px(8), ScreenUtil.dip2px(10), ScreenUtil.dip2px(8));
|
containerView.setPadding(ScreenUtil.dip2px(15), ScreenUtil.dip2px(8), ScreenUtil.dip2px(10), ScreenUtil.dip2px(8));
|
||||||
animationView.setBackgroundResource(R.drawable.nim_audio_animation_list_left);
|
animationView.setBackgroundResource(R.drawable.nim_audio_animation_list_left);
|
||||||
durationLabel.setTextColor(Color.BLACK);
|
durationLabel.setTextColor(Color.parseColor("#522f0c"));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setGravity(animationView, Gravity.RIGHT | Gravity.CENTER_VERTICAL);
|
setGravity(animationView, Gravity.RIGHT | Gravity.CENTER_VERTICAL);
|
||||||
@@ -102,7 +102,7 @@ public class MsgViewHolderAudio extends MsgViewHolderBase {
|
|||||||
containerView.setBackgroundResource(NimUIKitImpl.getOptions().messageRightBackground);
|
containerView.setBackgroundResource(NimUIKitImpl.getOptions().messageRightBackground);
|
||||||
containerView.setPadding(ScreenUtil.dip2px(10), ScreenUtil.dip2px(8), ScreenUtil.dip2px(15), ScreenUtil.dip2px(8));
|
containerView.setPadding(ScreenUtil.dip2px(10), ScreenUtil.dip2px(8), ScreenUtil.dip2px(15), ScreenUtil.dip2px(8));
|
||||||
animationView.setBackgroundResource(R.drawable.nim_audio_animation_list_right);
|
animationView.setBackgroundResource(R.drawable.nim_audio_animation_list_right);
|
||||||
durationLabel.setTextColor(Color.WHITE);
|
durationLabel.setTextColor(Color.parseColor("#666666"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,10 +52,10 @@ public class MsgViewHolderText extends MsgViewHolderBase {
|
|||||||
private void layoutDirection() {
|
private void layoutDirection() {
|
||||||
if (isReceivedMessage()) {
|
if (isReceivedMessage()) {
|
||||||
bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageLeftBackground);
|
bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageLeftBackground);
|
||||||
bodyTextView.setTextColor(Color.BLACK);
|
bodyTextView.setTextColor(Color.parseColor("#5F45D6"));
|
||||||
} else {
|
} else {
|
||||||
bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageRightBackground);
|
bodyTextView.setBackgroundResource(NimUIKitImpl.getOptions().messageRightBackground);
|
||||||
bodyTextView.setTextColor(Color.WHITE);
|
bodyTextView.setTextColor(Color.parseColor("#666666"));
|
||||||
}
|
}
|
||||||
// bodyTextView.setPadding(ScreenUtil.dip2px(10), ScreenUtil.dip2px(14), ScreenUtil.dip2px(10), ScreenUtil.dip2px(14));
|
// bodyTextView.setPadding(ScreenUtil.dip2px(10), ScreenUtil.dip2px(14), ScreenUtil.dip2px(10), ScreenUtil.dip2px(14));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user