修复直播间滚动,横竖屏展示错误问题
This commit is contained in:
parent
fe027e53db
commit
e6766dc5eb
@ -293,7 +293,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mViewGroup = viewGroup;
|
||||
mLastPosition = currentItem;
|
||||
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.event.RecommendLiveRoomEvent;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
@ -195,12 +194,7 @@ public class PDLIiveChatActivity extends FragmentActivity {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0);
|
||||
}
|
||||
|
@ -166,13 +166,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||
} else {
|
||||
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) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||
} else {
|
||||
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) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -373,13 +373,7 @@ public class LiveGiftAnimPresenter {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean,0 , 0,0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -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>() {
|
||||
@Override
|
||||
public void onSuccess(EnterRoomNewModel data) {
|
||||
// mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape());
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape());
|
||||
isEnterRoom = true;
|
||||
//加入房间发送Im消息
|
||||
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.live.R;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
||||
//侧边栏轮播
|
||||
@ -102,20 +99,10 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
||||
mShowLoadingDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
new LiveRoomCheckLivePresenter(mBanner.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@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())
|
||||
mShowLoadingDialog.dismiss();
|
||||
((Activity) itemView.getContext()).finish();
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||
mShowLoadingDialog.dismiss();
|
||||
((Activity) itemView.getContext()).finish();
|
||||
} else {
|
||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||
mShowLoadingDialog.dismiss();
|
||||
|
@ -683,13 +683,9 @@ public class EntryActivity extends AppCompatActivity {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
new LiveRoomCheckLivePresenter(activity, 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));
|
||||
NoviceInstructorManager.get(activity).setFrist(false);
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
NoviceInstructorManager.get(activity).setFrist(false);
|
||||
|
||||
|
||||
} else {
|
||||
MainActivity.forward(EntryActivity.this, false);
|
||||
|
@ -116,12 +116,8 @@ public class LiveClassActivity extends AbsActivity implements OnItemClickListene
|
||||
* 观看直播
|
||||
*/
|
||||
public void watchLive(LiveBean liveBean, int position) {
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,7 +50,6 @@ import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.event.RegSuccessEvent;
|
||||
import com.yunbao.main.http.MainHttpConsts;
|
||||
@ -240,13 +239,8 @@ public class LoginActivity extends AbsActivity {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
new LiveRoomCheckLivePresenter(activity, 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));
|
||||
NoviceInstructorManager.get(activity).setFrist(false);
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
NoviceInstructorManager.get(activity).setFrist(false);
|
||||
|
||||
} else {
|
||||
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) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
} else {
|
||||
ToastUtil.show("直播已结束");
|
||||
}
|
||||
@ -413,12 +408,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
} else {
|
||||
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) {
|
||||
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));
|
||||
}
|
||||
});
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user