修复直播间滚动,横竖屏展示错误问题
This commit is contained in:
parent
fe027e53db
commit
e6766dc5eb
@ -293,7 +293,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
mViewGroup = viewGroup;
|
mViewGroup = viewGroup;
|
||||||
mLastPosition = currentItem;
|
mLastPosition = currentItem;
|
||||||
liveHandler.post(liveRunnable);
|
liveHandler.post(liveRunnable);
|
||||||
Log.e("收到socket--->", "mLiveUid--------------------------->" + mLiveUid);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ import com.yunbao.live.adapter.SystemChatMessageAdapter;
|
|||||||
import com.yunbao.live.bean.ImUserBean;
|
import com.yunbao.live.bean.ImUserBean;
|
||||||
import com.yunbao.live.event.RecommendLiveRoomEvent;
|
import com.yunbao.live.event.RecommendLiveRoomEvent;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -195,12 +194,7 @@ public class PDLIiveChatActivity extends FragmentActivity {
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0);
|
RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0);
|
||||||
}
|
}
|
||||||
|
@ -166,13 +166,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
|
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
RouteUtil.forwardUserHome(mContext, String.valueOf(live_id), 0);
|
RouteUtil.forwardUserHome(mContext, String.valueOf(live_id), 0);
|
||||||
}
|
}
|
||||||
|
@ -294,12 +294,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||||
}
|
}
|
||||||
|
@ -184,12 +184,7 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -373,13 +373,7 @@ public class LiveGiftAnimPresenter {
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
|
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -296,7 +296,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
.enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback<EnterRoomNewModel>() {
|
.enterRoomNew(mLiveBean.getStream(), mLiveBean.getUid(), mLiveBean.getCity(), new com.yunbao.common.http.base.HttpCallback<EnterRoomNewModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(EnterRoomNewModel data) {
|
public void onSuccess(EnterRoomNewModel data) {
|
||||||
// mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape());
|
mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape());
|
||||||
isEnterRoom = true;
|
isEnterRoom = true;
|
||||||
//加入房间发送Im消息
|
//加入房间发送Im消息
|
||||||
LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid());
|
LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid());
|
||||||
|
@ -20,11 +20,8 @@ import com.yunbao.common.views.SlideInBannerViewHolder;
|
|||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
||||||
//侧边栏轮播
|
//侧边栏轮播
|
||||||
@ -102,20 +99,10 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
|||||||
mShowLoadingDialog.dismiss();
|
mShowLoadingDialog.dismiss();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new LiveRoomCheckLivePresenter(mBanner.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
Map<String, String> map = null;
|
|
||||||
if (type == 2) {
|
|
||||||
map = new HashMap<>();
|
|
||||||
map.put("OPEN", "NEWUSER");
|
|
||||||
}
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||||
mShowLoadingDialog.dismiss();
|
mShowLoadingDialog.dismiss();
|
||||||
((Activity) itemView.getContext()).finish();
|
((Activity) itemView.getContext()).finish();
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||||
mShowLoadingDialog.dismiss();
|
mShowLoadingDialog.dismiss();
|
||||||
|
@ -683,13 +683,9 @@ public class EntryActivity extends AppCompatActivity {
|
|||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new LiveRoomCheckLivePresenter(activity, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
NoviceInstructorManager.get(activity).setFrist(false);
|
NoviceInstructorManager.get(activity).setFrist(false);
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
MainActivity.forward(EntryActivity.this, false);
|
MainActivity.forward(EntryActivity.this, false);
|
||||||
|
@ -116,12 +116,8 @@ public class LiveClassActivity extends AbsActivity implements OnItemClickListene
|
|||||||
* 观看直播
|
* 观看直播
|
||||||
*/
|
*/
|
||||||
public void watchLive(LiveBean liveBean, int position) {
|
public void watchLive(LiveBean liveBean, int position) {
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -50,7 +50,6 @@ import com.yunbao.common.utils.RouteUtil;
|
|||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.event.RegSuccessEvent;
|
import com.yunbao.main.event.RegSuccessEvent;
|
||||||
import com.yunbao.main.http.MainHttpConsts;
|
import com.yunbao.main.http.MainHttpConsts;
|
||||||
@ -240,13 +239,8 @@ public class LoginActivity extends AbsActivity {
|
|||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new LiveRoomCheckLivePresenter(activity, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
NoviceInstructorManager.get(activity).setFrist(false);
|
NoviceInstructorManager.get(activity).setFrist(false);
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
MainActivity.forward(LoginActivity.this, false);
|
MainActivity.forward(LoginActivity.this, false);
|
||||||
|
@ -237,12 +237,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtil.show("直播已结束");
|
ToastUtil.show("直播已结束");
|
||||||
}
|
}
|
||||||
@ -413,12 +408,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
RouteUtil.forwardUserHome(mContext, Uid, 0);
|
RouteUtil.forwardUserHome(mContext, Uid, 0);
|
||||||
}
|
}
|
||||||
@ -887,12 +877,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
* 观看直播
|
* 观看直播
|
||||||
*/
|
*/
|
||||||
public void watchLive(LiveBean liveBean, String key, int position) {
|
public void watchLive(LiveBean liveBean, String key, int position) {
|
||||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||||
@Override
|
|
||||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
|
||||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user