游戏列表跳转游戏
This commit is contained in:
parent
869ca75464
commit
e2148c3f31
@ -26,10 +26,10 @@ import com.yunbao.common.event.RoomHolderTypeEvent;
|
|||||||
import com.yunbao.common.event.SudGameListDissMissEvent;
|
import com.yunbao.common.event.SudGameListDissMissEvent;
|
||||||
import com.yunbao.common.event.SudGameListEvent;
|
import com.yunbao.common.event.SudGameListEvent;
|
||||||
import com.yunbao.common.event.SudGameListSillEvent;
|
import com.yunbao.common.event.SudGameListSillEvent;
|
||||||
import com.yunbao.common.event.SudRoomListModelEvent;
|
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.RandomUtil;
|
||||||
import com.yunbao.common.views.LiveSudGamePopup;
|
import com.yunbao.common.views.LiveSudGamePopup;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
@ -149,7 +149,30 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
});
|
});
|
||||||
mRefreshView.initData();
|
mRefreshView.initData();
|
||||||
|
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.random_start), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
|
||||||
|
List<SudRoomListModel> sudRoomListModels = sudGameListAdapter.getList();
|
||||||
|
if (sudRoomListModels.size()>1){
|
||||||
|
int random = RandomUtil.nextInt(sudRoomListModels.size() - 1);
|
||||||
|
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();
|
||||||
|
createSudRoomModel.setSudGameId(sudRoomListModels.get(random).getSudGameId());
|
||||||
|
createSudRoomModel.setSudGameRoomId(sudRoomListModels.get(random).getSudGameRoomId());
|
||||||
|
createSudRoomModel.setAvatar(sudRoomListModels.get(random).getAvatar());
|
||||||
|
createSudRoomModel.setRoomName(sudRoomListModels.get(random).getRoomName());
|
||||||
|
createSudRoomModel.setSudGameName(sudRoomListModels.get(random).getSudGameName());
|
||||||
|
new XPopup.Builder(getContext())
|
||||||
|
.enableDrag(false)
|
||||||
|
.dismissOnTouchOutside(false)
|
||||||
|
.dismissOnBackPressed(false)
|
||||||
|
.asCustom(new LiveSudGamePopup(getContext(), createSudRoomModel))
|
||||||
|
.show();
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.interactive_game_room_game), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.interactive_game_room_game), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
@ -273,7 +296,6 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
|
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
@ -174,6 +174,7 @@
|
|||||||
android:layout_marginRight="5dp" />
|
android:layout_marginRight="5dp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
android:id="@+id/random_start"
|
||||||
android:layout_width="174dp"
|
android:layout_width="174dp"
|
||||||
android:layout_height="61dp"
|
android:layout_height="61dp"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
|
Loading…
Reference in New Issue
Block a user