测试修改
This commit is contained in:
parent
fb0e35196c
commit
8b180ce664
@ -10,6 +10,7 @@
|
||||
android:id="@+id/fun_game_pic"
|
||||
android:padding="3dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/live_more_icon_guard" />
|
||||
|
||||
|
@ -19,9 +19,8 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/fun_games_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="62dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
|
@ -933,7 +933,7 @@
|
||||
<string name="system_window">APP全應用小窗播放</string>
|
||||
<string name="system_window_hint">在其他應用上及所有界面显示小窗\n需打開懸浮窗權限。</string>
|
||||
<string name="to_open_the">前往打開</string>
|
||||
<string name="do_you_like">不喜歡小窗播放吗?\n 可以在「個人中心」-「設定」中關閉</string>
|
||||
<string name="do_you_like">不喜歡小窗播放吗?\n可以在「個人中心」-「設定」中關閉</string>
|
||||
<string name="to_set_up">去設置</string>
|
||||
<string name="know_the">知道了</string>
|
||||
<string name="individual_set">個人設定</string>
|
||||
|
@ -726,15 +726,25 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
liveGiftDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGiftDialogFragment");
|
||||
break;
|
||||
case CURRENT_ACTIVITY:
|
||||
bundle.putString("url", event.getModel().activityUrl(mContext, mLiveBean.getUid()));
|
||||
int show = TextUtils.isEmpty(event.getModel().getShowType()) ? 0 : Integer.parseInt(event.getModel().getShowType());
|
||||
bundle.putInt("show_type", show);
|
||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||
liveHDDialogFragment.setArguments(bundle);
|
||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||
int type = 0;
|
||||
if (TextUtils.equals(event.getModel().getActiveName(), "闖關熱戀")) {
|
||||
type = 0;
|
||||
} else if (TextUtils.equals(event.getModel().getActiveName(), "甜蜜約會")) {
|
||||
type = 1;
|
||||
} else if (TextUtils.equals(event.getModel().getActiveName(), "娛樂整蠱")) {
|
||||
type = 3;
|
||||
} else if (TextUtils.equals(event.getModel().getActiveName(), "怪物大作戰")) {
|
||||
type = 4;
|
||||
} else if (TextUtils.equals(event.getModel().getActiveName(), "動感零鉆購")) {
|
||||
type = 2;
|
||||
}
|
||||
LiveGameDialogFragment currentFragment = new LiveGameDialogFragment();
|
||||
currentFragment.selectIndex(type);
|
||||
currentFragment.setRoomId(mLiveUid);
|
||||
currentFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
||||
break;
|
||||
case WE_CHEAT:
|
||||
LiveGameDialogFragment fragment=new LiveGameDialogFragment();
|
||||
LiveGameDialogFragment fragment = new LiveGameDialogFragment();
|
||||
fragment.selectIndex(3);
|
||||
fragment.setRoomId(mLiveUid);
|
||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
||||
@ -874,7 +884,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
+ "&stream=" + mStream
|
||||
+ "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
liveHDDialogFragment = new LiveHDDialogFragment();
|
||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||
bundle.putString("url", url);
|
||||
bundle.putInt("show_type", 0);
|
||||
liveHDDialogFragment.setArguments(bundle);
|
||||
|
@ -80,6 +80,7 @@ public class SidebarAdapter extends RefreshAdapter<AnchorRecommendItemModel> {
|
||||
* @param list
|
||||
*/
|
||||
public void addData(List<AnchorRecommendItemModel> list) {
|
||||
|
||||
refreshData(list);
|
||||
}
|
||||
|
||||
|
@ -151,19 +151,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
title.setVisibility(View.GONE);
|
||||
title1.setVisibility(View.GONE);
|
||||
Log.i("tag", "" + num);
|
||||
// if (position == 0 && type.equals("1")) {
|
||||
// title1.setText(R.string.noble);
|
||||
// title1.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
if (!noble && position == num && type.equals("1")) {
|
||||
title.setText(R.string.live_audience);
|
||||
title.setVisibility(View.VISIBLE);
|
||||
|
||||
}
|
||||
ivIcon.setVisibility(View.GONE);
|
||||
if (noble) {
|
||||
ivIcon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mIcon.setImageBitmap(null);
|
||||
|
||||
tvName.setVisibility(View.GONE);
|
||||
|
@ -8,6 +8,7 @@ import android.view.WindowManager;
|
||||
import android.widget.HorizontalScrollView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
@ -72,7 +73,7 @@ public class LiveTotalDialog extends AbsDialogFragment {
|
||||
benefits = (HorizontalScrollView) findViewById(R.id.benefits);
|
||||
basicToolsLayout = (HorizontalScrollView) findViewById(R.id.basic_tools_layout);
|
||||
gamesAdapter = new FunGamesAdapter();
|
||||
funGamesList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||
funGamesList.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||
funGamesList.setAdapter(gamesAdapter);
|
||||
if (isActivity) {
|
||||
funGames.setVisibility(View.VISIBLE);
|
||||
|
@ -275,10 +275,8 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
data.add(model);
|
||||
}
|
||||
} else {
|
||||
if (TextUtils.equals(model.getNoble_id(), "0")) {
|
||||
data.add(model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Log.i("tag222", "ssss");
|
||||
|
@ -10,14 +10,19 @@ import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.ms.banner.Banner;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.bean.SlideInfoModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
@ -28,9 +33,10 @@ import com.yunbao.common.http.main.MainNetManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.views.SlideInBannerViewHolder;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.SidebarAdapter;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
@ -59,6 +65,9 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||
|
||||
private int index = 0;
|
||||
private LinearLayout haveData, noDataLive;
|
||||
private Banner mBanner;
|
||||
private TextView inBatch;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -76,6 +85,11 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
Bundle bundle = getArguments();
|
||||
|
||||
sidebarBack = (ImageView) findViewById(R.id.sidebar_back);
|
||||
haveData = (LinearLayout) findViewById(R.id.have_data);
|
||||
noDataLive = (LinearLayout) findViewById(R.id.view_no_data_live);
|
||||
//侧边栏轮播
|
||||
mBanner = (Banner) findViewById(R.id.banner);
|
||||
inBatch = (TextView) findViewById(R.id.in_batch);
|
||||
mask = findViewById(R.id.mask);
|
||||
if (bundle != null) {
|
||||
String avatar = bundle.getString("Avatar");
|
||||
@ -117,10 +131,46 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
sidebarAdapter = new SidebarAdapter(mContext, mDisplay.getHeight());
|
||||
sidebarAdapter.setHasStableIds(true);
|
||||
sidebarList.setRecyclerViewAdapter(sidebarAdapter);
|
||||
ViewClicksAntiShake.clicksAntiShake(inBatch, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
sidebarList.initData();
|
||||
}
|
||||
});
|
||||
if (sidebarAdapter != null) {
|
||||
if (list.size() == 1) {
|
||||
haveData.setVisibility(View.GONE);
|
||||
noDataLive.setVisibility(View.VISIBLE);
|
||||
|
||||
if (mBanner.isStart()) {
|
||||
mBanner.update(slideInfoModels);
|
||||
} else {
|
||||
mBanner.setAutoPlay(true)
|
||||
.setPages(slideInfoModels, new SlideInBannerViewHolder())
|
||||
.setDelayTime(3000)
|
||||
.setOnBannerClickListener((datas, p) -> {
|
||||
if (p >= 0 && p < slideInfoModels.size()) {
|
||||
SlideInfoModel bean = slideInfoModels.get(p);
|
||||
if (bean != null) {
|
||||
|
||||
String link = bean.getSlideUrl();
|
||||
if (link.contains("http")) {
|
||||
WebViewActivity.forward(getContext(), link, true);
|
||||
} else {
|
||||
gotoLive(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
haveData.setVisibility(View.VISIBLE);
|
||||
noDataLive.setVisibility(View.GONE);
|
||||
sidebarAdapter.addData(list);
|
||||
sidebarAdapter.setData(slideInfoModels);
|
||||
}
|
||||
|
||||
}
|
||||
sidebarList.setDataHelperNew(new CommonRefreshView.DataHelperNew() {
|
||||
@Override
|
||||
public void loadData(int p) {
|
||||
@ -147,9 +197,38 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
}
|
||||
|
||||
list.add(0, new AnchorRecommendItemModel());
|
||||
if (list.size() == 1) {
|
||||
haveData.setVisibility(View.GONE);
|
||||
noDataLive.setVisibility(View.VISIBLE);
|
||||
|
||||
if (mBanner.isStart()) {
|
||||
mBanner.update(slideInfoModels);
|
||||
} else {
|
||||
mBanner.setAutoPlay(true)
|
||||
.setPages(slideInfoModels, new SlideInBannerViewHolder())
|
||||
.setDelayTime(3000)
|
||||
.setOnBannerClickListener((datas, p) -> {
|
||||
if (p >= 0 && p < slideInfoModels.size()) {
|
||||
SlideInfoModel bean = slideInfoModels.get(p);
|
||||
if (bean != null) {
|
||||
|
||||
String link = bean.getSlideUrl();
|
||||
if (link.contains("http")) {
|
||||
WebViewActivity.forward(getContext(), link, true);
|
||||
} else {
|
||||
gotoLive(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
} else {
|
||||
haveData.setVisibility(View.VISIBLE);
|
||||
noDataLive.setVisibility(View.GONE);
|
||||
sidebarAdapter.addData(list);
|
||||
sidebarAdapter.setData(anchorRecommendModel.getSlide());
|
||||
}
|
||||
|
||||
sidebarList.onFinish();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@ -16,6 +17,7 @@
|
||||
android:background="#90000000" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/have_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
@ -40,4 +42,69 @@
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/view_no_data_live"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="26dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
app:cardCornerRadius="4dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="77dp"
|
||||
app:delay_time="3000"
|
||||
app:indicator_drawable_selected="@drawable/bg_home_indicator_selected"
|
||||
app:indicator_drawable_unselected="@drawable/bg_home_indicator_unselected"
|
||||
app:indicator_height="8dp"
|
||||
app:indicator_margin="6dp"
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/recommended_for_you"
|
||||
android:textColor="#FFF6F7FB"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/in_batch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:drawableStart="@mipmap/icon_change"
|
||||
android:drawablePadding="2dp"
|
||||
android:text="@string/in_batch"
|
||||
android:textColor="#FFF6F7FB"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="130dp"
|
||||
android:layout_marginTop="194dp"
|
||||
android:src="@mipmap/img_no_anchor" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
@ -52,6 +52,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:text="@string/fingers_slide"
|
||||
android:textColor="#9A9A9A" />
|
||||
|
||||
|
BIN
live/src/main/res/mipmap-xxxhdpi/img_no_anchor.png
Normal file
BIN
live/src/main/res/mipmap-xxxhdpi/img_no_anchor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 127 KiB |
@ -21,9 +21,5 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_arrow_right" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/gray2" />
|
||||
|
||||
</RelativeLayout>
|
@ -23,9 +23,5 @@
|
||||
android:textColor="@color/global"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/gray2" />
|
||||
|
||||
</RelativeLayout>
|
Loading…
Reference in New Issue
Block a user