直播间修改
This commit is contained in:
parent
87d1212478
commit
f8f1f4e647
@ -206,6 +206,17 @@ public class IMLoginModel extends BaseModel {
|
||||
private List<List<ListModel>> list;
|
||||
@SerializedName("slide")
|
||||
private List<SlideModel> slide;
|
||||
@SerializedName("gift_effect")
|
||||
private boolean giftEffect =false;
|
||||
|
||||
public boolean isGiftEffect() {
|
||||
return giftEffect;
|
||||
}
|
||||
|
||||
public IMLoginModel setGiftEffect(boolean giftEffect) {
|
||||
this.giftEffect = giftEffect;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,36 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 直播首页轮播和侧边栏轮播
|
||||
*/
|
||||
public class SlideInfoModel extends BaseModel {
|
||||
/**
|
||||
* slide_pic : https://qny.shayucm.com/20220810/81a4c030334a4a5a30eb62b84191f46d.jpg
|
||||
* slide_url : https://napi.yaoulive.com/h5/monthlyActivities/202208QIXI/index.html?t=1660619212
|
||||
*/
|
||||
|
||||
@SerializedName("slide_pic")
|
||||
private String slidePic = "";
|
||||
@SerializedName("slide_url")
|
||||
private String slideUrl = "";
|
||||
|
||||
public String getSlidePic() {
|
||||
return slidePic;
|
||||
}
|
||||
|
||||
public SlideInfoModel setSlidePic(String slidePic) {
|
||||
this.slidePic = slidePic;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSlideUrl() {
|
||||
return slideUrl;
|
||||
}
|
||||
|
||||
public SlideInfoModel setSlideUrl(String slideUrl) {
|
||||
this.slideUrl = slideUrl;
|
||||
return this;
|
||||
}
|
||||
}
|
@ -2,10 +2,6 @@ package com.yunbao.common.custom;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
@ -13,6 +9,11 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
|
||||
@ -163,6 +164,7 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
mDataHelper.onRefreshSuccess(adapter.getList(), adapter.getItemCount());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -265,6 +267,18 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
}
|
||||
};
|
||||
|
||||
public void onFinish() {
|
||||
if (mLoadFailureView != null && mLoadFailureView.getVisibility() == View.VISIBLE) {
|
||||
mLoadFailureView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (mEmptyLayout != null && mEmptyLayout.getVisibility() == View.VISIBLE) {
|
||||
mEmptyLayout.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (mSmartRefreshLayout != null) {
|
||||
mSmartRefreshLayout.finishRefresh(true);
|
||||
}
|
||||
}
|
||||
|
||||
public <T> void setDataHelper(DataHelper<T> dataHelper) {
|
||||
mDataHelper = dataHelper;
|
||||
}
|
||||
@ -328,6 +342,9 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
mPageCount = 1;
|
||||
mDataHelper.loadData(mPageCount, mRefreshCallback);
|
||||
}
|
||||
if (dataHelperNew != null) {
|
||||
dataHelperNew.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadMore() {
|
||||
@ -338,6 +355,9 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
mPageCount++;
|
||||
mDataHelper.loadData(mPageCount, mLoadMoreCallback);
|
||||
}
|
||||
if (dataHelperNew != null) {
|
||||
dataHelperNew.loadData(mPageCount);
|
||||
}
|
||||
}
|
||||
|
||||
public int getPageCount() {
|
||||
@ -376,6 +396,18 @@ public class CommonRefreshView extends FrameLayout implements View.OnClickListen
|
||||
}
|
||||
}
|
||||
|
||||
public interface DataHelperNew {
|
||||
void loadData(int p);
|
||||
|
||||
void refresh();
|
||||
}
|
||||
|
||||
private DataHelperNew dataHelperNew;
|
||||
|
||||
public CommonRefreshView setDataHelperNew(DataHelperNew dataHelperNew) {
|
||||
this.dataHelperNew = dataHelperNew;
|
||||
return this;
|
||||
}
|
||||
|
||||
public interface DataHelper<T> {
|
||||
RefreshAdapter<T> getAdapter();
|
||||
|
@ -8,10 +8,8 @@ import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
@ -135,4 +133,12 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<List<SetAttentsModel>>> setAttents(
|
||||
@Query("touid") String liveuid
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取首页位
|
||||
*/
|
||||
@GET("/api/public/?service=Home.getHot")
|
||||
Observable<ResponseModel<List<SlideInBannerModel>>> getHot(
|
||||
@Query("p") int page
|
||||
);
|
||||
}
|
||||
|
@ -2,16 +2,15 @@ package com.yunbao.common.http.main;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.FaceBookUpModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SlideInfoModel;
|
||||
import com.yunbao.common.http.API;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@ -70,6 +69,7 @@ public class MainNetManager {
|
||||
|
||||
/**
|
||||
* FB是否替换新Key
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
public void FaceBookUp(HttpCallback<FaceBookUpModel> callback) {
|
||||
@ -89,6 +89,7 @@ public class MainNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 猜你喜欢
|
||||
*
|
||||
@ -120,7 +121,7 @@ public class MainNetManager {
|
||||
* @param p 頁碼
|
||||
*/
|
||||
public void search(String jianKey, String fanKey, int type, int p, HttpCallback<List<List<SearchModel>>> callback) {
|
||||
API.get().pdLiveApi(mContext).search(jianKey,fanKey,type,p)
|
||||
API.get().pdLiveApi(mContext).search(jianKey, fanKey, type, p)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
@ -134,6 +135,7 @@ public class MainNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
@ -143,7 +145,7 @@ public class MainNetManager {
|
||||
* @param p 頁碼
|
||||
*/
|
||||
public void searchNew(String jianKey, String fanKey, int type, int p, HttpCallback<List<SearchModel>> callback) {
|
||||
API.get().pdLiveApi(mContext).searchNew(jianKey,fanKey,type,p)
|
||||
API.get().pdLiveApi(mContext).searchNew(jianKey, fanKey, type, p)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
@ -158,4 +160,23 @@ public class MainNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页轮播
|
||||
*/
|
||||
public void getHot(int page, HttpCallback<List<SlideInfoModel>> callback) {
|
||||
API.get().pdLiveApi(mContext).getHot(page)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(slideInBannerModelResponseModel -> {
|
||||
if (!mContext.isFinishing() && callback != null) {
|
||||
List<SlideInfoModel> slideInfoModels = slideInBannerModelResponseModel.getData().getInfo().get(0).getSlide();
|
||||
callback.onSuccess(slideInfoModels);
|
||||
}
|
||||
}, throwable -> {
|
||||
if (!mContext.isFinishing() && callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package com.yunbao.common.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.ms.banner.holder.BannerViewHolder;
|
||||
import com.yunbao.common.bean.SlideInfoModel;
|
||||
|
||||
public class SlideInBannerViewHolder implements BannerViewHolder<SlideInfoModel> {
|
||||
|
||||
@Override
|
||||
public View createView(Context context, int position, SlideInfoModel data) {
|
||||
// 返回mImageView页面布局
|
||||
ImageView imageView = new ImageView(context);
|
||||
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT
|
||||
);
|
||||
imageView.setLayoutParams(params);
|
||||
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
|
||||
Glide.with(context).load(data.getSlidePic()).into(imageView);
|
||||
|
||||
return imageView;
|
||||
}
|
||||
|
||||
}
|
@ -33,6 +33,7 @@
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_gravity="center" />
|
||||
</RelativeLayout>
|
||||
|
||||
@ -49,6 +50,7 @@
|
||||
<com.yunbao.common.views.weight.ClipPathCircleImage
|
||||
android:id="@+id/clip_image2"
|
||||
android:layout_width="24dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center" />
|
||||
@ -70,6 +72,7 @@
|
||||
android:id="@+id/clip_image3"
|
||||
android:layout_width="29dp"
|
||||
android:layout_height="29dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center" />
|
||||
</RelativeLayout>
|
||||
@ -83,11 +86,13 @@
|
||||
android:background="@drawable/bg_white_clip"
|
||||
android:gravity="center"
|
||||
android:padding="1dp"
|
||||
|
||||
android:visibility="visible">
|
||||
|
||||
<com.yunbao.common.views.weight.ClipPathCircleImage
|
||||
android:id="@+id/clip_image4"
|
||||
android:layout_width="29dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="29dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_gravity="center" />
|
||||
|
@ -1,11 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smartrefresh.layout.header.ClassicsHeader
|
||||
android:id="@+id/header"
|
||||
@ -17,8 +15,7 @@
|
||||
app:srlTextPulling="@string/refresh_header_pulling"
|
||||
app:srlTextRefreshing="@string/refresh_header_refreshing"
|
||||
app:srlTextRelease="@string/refresh_header_release"
|
||||
app:srlTextUpdate="@string/refresh_header_update"
|
||||
/>
|
||||
app:srlTextUpdate="@string/refresh_header_update" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -28,15 +25,13 @@
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
/>
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/no_data_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="invisible"
|
||||
>
|
||||
android:visibility="invisible">
|
||||
|
||||
|
||||
<TextView
|
||||
@ -46,8 +41,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/no_data"
|
||||
android:textColor="@color/gray1"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@ -59,33 +53,29 @@
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:translationY="-60dp"
|
||||
android:visibility="invisible"
|
||||
>
|
||||
android:visibility="invisible">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="74dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/bg_load_failure"
|
||||
/>
|
||||
android:src="@mipmap/bg_load_failure" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="@string/load_failure"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/load_failure_2"
|
||||
android:textColor="@color/gray1"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_reload"
|
||||
@ -96,8 +86,7 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/reload"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -107,14 +96,13 @@
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:srlTextFailed="@string/refresh_footer_failed"
|
||||
app:srlTextFinish="@string/refresh_footer_finish"
|
||||
app:srlTextLoading="@string/refresh_footer_loading"
|
||||
app:srlTextNothing="@string/refresh_footer_nothing"
|
||||
app:srlTextPulling="@string/refresh_footer_pulling"
|
||||
app:srlTextRefreshing="@string/refresh_footer_refreshing"
|
||||
app:srlTextRelease="@string/refresh_footer_release"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
app:srlTextRelease="@string/refresh_footer_release" />
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
@ -846,4 +846,18 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="whole_station_horn">Whole station horn</string>
|
||||
<string name="quote">quote</string>
|
||||
<string name="whole_station_horn_hint">Available times: %s Note: Update times at 4:00 am on the 1st of each month</string>
|
||||
<string name="cannot_be_empty">Content cannot be empty</string>
|
||||
<string name="site_wide_news">Noble exclusive site-wide news</string>
|
||||
<string name="site_wide_news_hint1">Display messages on the whole station and jump to the current live room</string>
|
||||
<string name="site_wide_news_hint2">Open noble king, emperor, super emperor to get free</string>
|
||||
<string name="back">back</string>
|
||||
<string name="go_nobility">to the nobles</string>
|
||||
<string name="use_successfully">Use successfully</string>
|
||||
<string name="use_live">Go to the live room</string>
|
||||
<string name="search_history">search history</string>
|
||||
<string name="you_may_also_like">you may also like</string>
|
||||
<string name="anchor">anchor</string>
|
||||
<string name="anchor_more">More</string>
|
||||
<string name="wonderful_live">Wonderful live</string>
|
||||
<string name="recommended_for_you">recommended for you</string>
|
||||
</resources>
|
||||
|
@ -871,4 +871,5 @@
|
||||
<string name="anchor">主播</string>
|
||||
<string name="anchor_more">更多</string>
|
||||
<string name="wonderful_live">精彩直播</string>
|
||||
<string name="recommended_for_you">為您推薦</string>
|
||||
</resources>
|
||||
|
@ -9,9 +9,9 @@ ext {
|
||||
]
|
||||
manifestPlaceholders = [
|
||||
//正式
|
||||
serverHost : "https://napi.yaoulive.com",
|
||||
// serverHost : "https://napi.yaoulive.com",
|
||||
//測試
|
||||
// serverHost : "https://ceshi.yaoulive.com",
|
||||
serverHost : "https://ceshi.yaoulive.com",
|
||||
|
||||
//腾讯地图
|
||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||
|
@ -315,8 +315,6 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (bean.getmLiveUId().equals(bean.getRoomnum())) {
|
||||
mLiveRoomViewHolder.insertChat(bean.getLiveChatBean(), 1);
|
||||
}
|
||||
|
||||
// mLiveRoomViewHolder.showGiftMessage(bean);
|
||||
mLiveRoomViewHolder.showGiftMessage(bean, mIsAnchor);
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.yunbao.live.activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
@ -10,15 +11,20 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.view.ViewParent;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
@ -27,6 +33,7 @@ import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ms.banner.Banner;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
@ -34,16 +41,26 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.SlideInfoModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.custom.MyViewPager;
|
||||
import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.main.MainNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.pay.PayCallback;
|
||||
import com.yunbao.common.pay.PayPresenter;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessResultUtil;
|
||||
@ -51,8 +68,10 @@ import com.yunbao.common.utils.RandomUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.SlideInBannerViewHolder;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.LiveRoomScrollAdapter;
|
||||
import com.yunbao.live.adapter.SidebarAdapter;
|
||||
import com.yunbao.live.bean.LiveBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.bean.LivePKUserListBean;
|
||||
@ -61,6 +80,7 @@ import com.yunbao.live.dialog.BlowkissDialog;
|
||||
import com.yunbao.live.dialog.LiveGiftDialogFragment;
|
||||
import com.yunbao.live.dialog.NewUserDialog;
|
||||
import com.yunbao.live.event.LinkMicTxAccEvent;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
@ -121,7 +141,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
public static String anyway;
|
||||
public static JSONObject pkInfo;
|
||||
public static LiveAudienceActivity liveAudienceActivity;
|
||||
|
||||
private Banner mBanner;
|
||||
public CommonRefreshView sidebarList;
|
||||
private SidebarAdapter sidebarAdapter;
|
||||
private ImageView sidebarBack;
|
||||
private DrawerLayout drawerLayout;
|
||||
|
||||
public static void forward(Context context, LiveBean liveBean, int liveType, int liveTypeVal, String key, int position, int liveSdk) {
|
||||
Intent intent = new Intent(context, LiveAudienceActivity.class);
|
||||
@ -159,6 +183,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
public static ProcessResultUtil mProcessResultUtil;
|
||||
private LiveImDeletUtil liveImDeletUtil;
|
||||
public static int isattention;
|
||||
private ImageView liveBack;
|
||||
private LiveBean liveBean;
|
||||
|
||||
@Override
|
||||
public <T extends View> T findViewById(@IdRes int id) {
|
||||
@ -186,7 +212,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
|
||||
Bus.getOn(this);
|
||||
|
||||
liveImDeletUtil = new LiveImDeletUtil();
|
||||
if (getIntent().getIntExtra("isry", 0) == 1) {
|
||||
@ -219,19 +245,17 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mContainerWrap = mSecondPage.findViewById(R.id.container_wrap);
|
||||
mContainer = mSecondPage.findViewById(R.id.container);
|
||||
btnSmallScreen = findViewById(R.id.btn_small_screen);
|
||||
btnSmallScreen.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
btnSmallScreen.setOnClickListener(v -> {
|
||||
mViewPager.setCurrentItem(1);
|
||||
btnSmallScreen.setVisibility(View.GONE);
|
||||
((LiveAudienceActivity) mContext).mLivePlayViewHolder.smallScreen();
|
||||
}
|
||||
});
|
||||
mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, (GifImageView) mSecondPage.findViewById(R.id.gift_gif), (SVGAImageView) mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, getWindowManager());
|
||||
mLiveRoomViewHolder.addToParent();
|
||||
mLiveRoomViewHolder.subscribeActivityLifeCycle();
|
||||
mLiveAudienceViewHolder = new LiveAudienceViewHolder(mContext, mContainer);
|
||||
mLiveAudienceViewHolder.addToParent();
|
||||
mLiveAudienceViewHolder.subscribeActivityLifeCycle();
|
||||
mLiveBottomViewHolder = mLiveAudienceViewHolder;
|
||||
mViewPager.setAdapter(new PagerAdapter() {
|
||||
|
||||
@ -312,10 +336,87 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
}
|
||||
mLiveType = intent.getIntExtra(Constants.LIVE_TYPE, Constants.LIVE_TYPE_NORMAL);
|
||||
mLiveTypeVal = intent.getIntExtra(Constants.LIVE_TYPE_VAL, 0);
|
||||
LiveBean liveBean = intent.getParcelableExtra(Constants.LIVE_BEAN);
|
||||
liveBean = intent.getParcelableExtra(Constants.LIVE_BEAN);
|
||||
setLiveRoomData(liveBean);
|
||||
enterRoom();
|
||||
//直播页面背景
|
||||
liveBack = findViewById(R.id.live_back);
|
||||
ImgLoader.displayBlur(mContext, liveBean.getAvatar(), liveBack);
|
||||
|
||||
|
||||
//侧边栏
|
||||
drawerLayout = findViewById(R.id.drawer_layout);
|
||||
sidebarList = (CommonRefreshView) findViewById(R.id.sidebarList);
|
||||
sidebarBack = findViewById(R.id.sidebar_back);
|
||||
ImgLoader.displayBlur(mContext, liveBean.getAvatar(), sidebarBack);
|
||||
//禁止滑动打开侧边栏
|
||||
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
|
||||
sidebarList.setEmptyLayoutId(R.layout.view_no_data_live);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 2, GridLayoutManager.VERTICAL, false);
|
||||
sidebarList.setLayoutManager(gridLayoutManager);
|
||||
ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 5, 0);
|
||||
decoration.setOnlySetItemOffsetsButNoDraw(true);
|
||||
sidebarList.setItemDecoration(decoration);
|
||||
Display mDisplay = getWindowManager().getDefaultDisplay();
|
||||
sidebarAdapter = new SidebarAdapter(mContext, mDisplay.getHeight());
|
||||
sidebarAdapter.setOnItemClickListener(new OnItemClickListener<AnchorRecommendItemModel>() {
|
||||
@Override
|
||||
public void onItemClick(AnchorRecommendItemModel bean, int position) {
|
||||
gotoLive(bean.getUid());
|
||||
}
|
||||
});
|
||||
sidebarAdapter.setHasStableIds(true);
|
||||
sidebarList.setRecyclerViewAdapter(sidebarAdapter);
|
||||
|
||||
sidebarList.setDataHelperNew(new CommonRefreshView.DataHelperNew() {
|
||||
@Override
|
||||
public void loadData(int p) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
//推荐位
|
||||
MainNetManager.get(mContext)
|
||||
.anchorRecommend("10", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||
@Override
|
||||
public void onSuccess(AnchorRecommendModel data) {
|
||||
if (isFinishing()) return;
|
||||
|
||||
sidebarAdapter.addData(data.getList());
|
||||
sidebarList.onFinish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
sidebarList.initData();
|
||||
mBanner = findViewById(R.id.banner);
|
||||
mBanner.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@Override
|
||||
public void getOutline(View view, Outline outline) {
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
}
|
||||
});
|
||||
mBanner.setClipToOutline(true);
|
||||
//侧边栏
|
||||
MainNetManager.get(mContext)
|
||||
.getHot(1, new com.yunbao.common.http.base.HttpCallback<List<SlideInfoModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<SlideInfoModel> data) {
|
||||
onBanner(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//定时器
|
||||
@ -480,7 +581,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
logger.logEvent("FB_enterroom");
|
||||
|
||||
//观看1分钟
|
||||
if (obj.getIntValue("see_time") >= 60){
|
||||
if (obj.getIntValue("see_time") >= 60) {
|
||||
AdjustEvent good_user = new AdjustEvent("7zxuxz");
|
||||
Adjust.trackEvent(good_user);
|
||||
CommonHttpUtil.setAdvertisingChannels("7zxuxz", new HttpCallback() {
|
||||
@ -534,7 +635,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mLiveRoomViewHolder.setVotes(obj.getString("votestotal"));
|
||||
//真爱排行 数量
|
||||
mLiveRoomViewHolder.setMedaRankNum(obj.getString("medalRankNum"));
|
||||
isattention =obj.getIntValue("isattention");
|
||||
isattention = obj.getIntValue("isattention");
|
||||
if (isattention == 0) {
|
||||
if (countDownTimer != null) {
|
||||
countDownTimer.cancel();
|
||||
@ -669,7 +770,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel));
|
||||
}
|
||||
}
|
||||
// Constants.isSend = obj.getString("front_task");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1052,6 +1152,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
Bus.getOff(this);
|
||||
L.e("LiveAudienceActivity-------onDestroy------->");
|
||||
}
|
||||
|
||||
@ -1217,5 +1318,69 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 侧滑轮播
|
||||
*/
|
||||
public void onBanner(List<SlideInfoModel> data) {
|
||||
if (data == null || data.size() == 0 || mBanner == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mBanner.isStart()) {
|
||||
mBanner.update(data);
|
||||
} else {
|
||||
mBanner.setAutoPlay(true)
|
||||
.setPages(data, new SlideInBannerViewHolder())
|
||||
.setDelayTime(3000)
|
||||
.setOnBannerClickListener((datas, p) -> {
|
||||
if (p >= 0 && p < data.size()) {
|
||||
SlideInfoModel bean = data.get(p);
|
||||
if (bean != null) {
|
||||
String link = bean.getSlideUrl();
|
||||
if (link.contains("http")) {
|
||||
WebViewActivity.forward(mContext, link, true);
|
||||
} else {
|
||||
gotoLive(link);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 前往直播间
|
||||
*/
|
||||
private void gotoLive(final String liveId) {
|
||||
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||
if (liveBean1 == null) {
|
||||
return;
|
||||
}
|
||||
LiveAudienceActivity.forward(mContext, liveBean1, liveType, liveTypeVal, "", 0, liveSdk);
|
||||
finish();
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, liveId, 0);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onOpenDrawer(LiveAudienceEvent event) {
|
||||
//从右边打开侧边栏
|
||||
drawerLayout.openDrawer(GravityCompat.END);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.views.SidebarLiveItemViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 侧边栏列表
|
||||
*/
|
||||
public class SidebarAdapter extends RefreshAdapter<AnchorRecommendItemModel> {
|
||||
private int mHeight;
|
||||
private Context mContext;
|
||||
private List<AnchorRecommendItemModel> itemModelList = new ArrayList<>();
|
||||
|
||||
public SidebarAdapter(Context context, int height) {
|
||||
super(context);
|
||||
mHeight = height;
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
||||
return new SidebarLiveItemViewHolder(mInflater.inflate(R.layout.item_main_home_lives, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
if (holder instanceof SidebarLiveItemViewHolder) {
|
||||
((SidebarLiveItemViewHolder) holder).loadViewDate(mList.get(position ), position , mHeight, new SidebarLiveItemViewHolder.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AnchorRecommendItemModel bean, int position) {
|
||||
if (mOnItemClickListener!=null){
|
||||
mOnItemClickListener.onItemClick(bean,position);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加数据
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public void addData(List<AnchorRecommendItemModel> list) {
|
||||
refreshData(list);
|
||||
}
|
||||
}
|
@ -5,12 +5,6 @@ import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
@ -23,7 +17,11 @@ import android.widget.PopupWindow;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
@ -31,15 +29,12 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.bean.LiveGiftBean2;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
@ -68,7 +63,6 @@ import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
import static com.yunbao.live.presenter.LiveLinkMicPresenter.bean1;
|
||||
|
||||
//import cn.jmessage.support.qiniu.android.utils.Json;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/12.
|
||||
@ -172,9 +166,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
giftTopAdapter = new GiftTopAdapter(mContext);
|
||||
items.setAdapter(giftTopAdapter);
|
||||
items.setOnClickListener(this);
|
||||
giftTopAdapter.setOnItemClickListener(new OnItemClickListener<GiftTopBean>() {
|
||||
@Override
|
||||
public void onItemClick(GiftTopBean bean, int position) {
|
||||
giftTopAdapter.setOnItemClickListener((bean, position) -> {
|
||||
manager.scrollToPositionWithOffset(position, 0);
|
||||
giftTopAdapter.notifyDataSetChanged();
|
||||
type = position;
|
||||
@ -206,7 +198,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
mRGroupWrap.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
mViewPager.setOffscreenPageLimit(5);
|
||||
mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@ -287,7 +278,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
|
||||
private void loadGiftListData() {
|
||||
//根据变量,判断是否取缓存
|
||||
// List<LiveGiftBean> giftList = null;
|
||||
if (isGetNewWrap) {
|
||||
isGetNewWrap = false;
|
||||
} else {
|
||||
@ -325,41 +315,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
});
|
||||
} else {
|
||||
mLoading.setVisibility(View.INVISIBLE);
|
||||
// if(!type_name.equals("包裹")) {
|
||||
upData();
|
||||
// }else{
|
||||
// List<GiftTopBean> name = new ArrayList<>();
|
||||
// for (int i = 0; i < lsit.size(); i++) {
|
||||
// JSONObject data = lsit.getJSONObject(i);
|
||||
// GiftTopBean giftTopBean = new GiftTopBean();
|
||||
// giftTopBean.setName(data.getString("name"));
|
||||
// name.add(giftTopBean);
|
||||
// }
|
||||
// GiftTopBean data = new GiftTopBean();
|
||||
// data.setName("包裹");
|
||||
// name.add(data);
|
||||
//
|
||||
// giftTopAdapter.setList(name);
|
||||
// //从心愿单过来默认选中第一个
|
||||
// if (!TextUtils.isEmpty(mWishGiftId)) {
|
||||
// giftTopAdapter.choice = 0;
|
||||
// type = 0;
|
||||
// giftTopAdapter.notifyDataSetChanged();
|
||||
// }
|
||||
//
|
||||
// //点击包裹,展示包裹列表
|
||||
// mCurrentId = 1;
|
||||
// loadWrapListData();
|
||||
// if (mViewPager != null) {
|
||||
// mViewPager.setVisibility(View.GONE);
|
||||
// mRadioGroup.setVisibility(View.GONE);
|
||||
// }
|
||||
// if (mVPWrapList != null) {
|
||||
// mVPWrapList.setVisibility(View.VISIBLE);
|
||||
// mRGroupWrap.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
// }
|
||||
// showGiftList(giftList);
|
||||
LiveHttpUtil.getCoin(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
@ -384,12 +340,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
GiftTopBean data = new GiftTopBean();
|
||||
data.setName(WordUtil.getString(R.string.live_wrap));
|
||||
name.add(data);
|
||||
|
||||
// //从心愿单过来默认选中第一个
|
||||
// if (!TextUtils.isEmpty(mWishGiftId)) {
|
||||
// type = 0;
|
||||
// }
|
||||
|
||||
giftTopAdapter.setList(name);
|
||||
JSONObject obj2 = lsit.getJSONObject(type);
|
||||
String giftJson = obj2.getString("giftlist");
|
||||
@ -429,9 +379,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
|
||||
private void showGiftList(List<LiveGiftBean> list) {
|
||||
if (IMLoginManager.get(mContext).isNewUserGif() == true && type_name.equals("熱門")|| type_name.equals("Hot")) {
|
||||
if (IMLoginManager.get(mContext).isNewUserGif() == true && type_name.equals("熱門") || type_name.equals("Hot")) {
|
||||
list.add(0, bean1);
|
||||
if(mWishGiftId==null) {
|
||||
if (mWishGiftId == null) {
|
||||
mWishGiftId = "" + bean1.getId();
|
||||
}
|
||||
}
|
||||
@ -527,7 +477,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
} else if (i == R.id.goldCoin) {
|
||||
forwardMyCoin();
|
||||
} else if (i == R.id.go_charge) {
|
||||
// startActivity(new Intent(mContext,RechargeActivity.));
|
||||
forwardMyCoin();
|
||||
} else if (i == R.id.btn_luck_gift_tip) {
|
||||
dismiss();
|
||||
@ -536,33 +485,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
}
|
||||
|
||||
// //礼物列表局部刷新
|
||||
// private void refreshGiftListAfterSend() {
|
||||
// if (mObjGiftSendback != null) {
|
||||
// if (mGiftList != null) {
|
||||
// int size = mGiftList.size();
|
||||
// for (int j = 0; j < size; j++) {
|
||||
// LiveGiftBean bean = mGiftList.get(j);
|
||||
// if (mLiveGiftBean.getId() == bean.getId()) {
|
||||
// int wrapGiftNum = -1;
|
||||
// try {
|
||||
// wrapGiftNum = mObjGiftSendback.getIntValue("wrap_gift_num");
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// if (wrapGiftNum == -1) {
|
||||
// } else if (wrapGiftNum == 0) {
|
||||
// } else if (wrapGiftNum > 0) {
|
||||
// bean.setGiftNum(wrapGiftNum + "");
|
||||
// if (mLiveGiftPagerAdapter != null)
|
||||
// mLiveGiftPagerAdapter.notifyRefresh(j);
|
||||
// //礼物列表更新缓存
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//包裹列表局部刷新
|
||||
private void refreshWrapListAfterSend() {
|
||||
@ -660,19 +582,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
mBtnChooseCount.setText(DEFAULT_COUNT);
|
||||
}
|
||||
if (mBtnChooseCount != null) {
|
||||
// if (bean.getSwf().contains("svga")) {
|
||||
// if (mBtnChooseCount.getVisibility() == View.VISIBLE) {
|
||||
// mBtnChooseCount.setVisibility(View.INVISIBLE);
|
||||
// mArrow.setVisibility(View.INVISIBLE);
|
||||
// mBtnSend.setBackground(mDrawable2);
|
||||
// }
|
||||
// } else {
|
||||
// if (mBtnChooseCount.getVisibility() != View.VISIBLE) {
|
||||
mBtnChooseCount.setVisibility(View.VISIBLE);
|
||||
mArrow.setVisibility(View.VISIBLE);
|
||||
mBtnSend.setBackground(mDrawable1);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@ -794,8 +706,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
if (mContext != null && mGiftBean != null) {
|
||||
((LiveActivity) mContext).onCoinChanged(coin);//
|
||||
// ((LiveActivity) mContext).sendGiftMessage(mGiftBean, obj.getString("gifttoken"));
|
||||
|
||||
if (by != null) {
|
||||
((LiveActivity) mContext).sendGiftMessage(mGiftBean, obj.getString("gifttoken")
|
||||
, obj.getString("ancherName"), "1");
|
||||
@ -811,7 +721,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
//刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
||||
mObjGiftSendback = obj;
|
||||
isGetNewWrap = true;
|
||||
// refreshGiftListAfterSend();
|
||||
refreshWrapListAfterSend();
|
||||
}
|
||||
} else {
|
||||
@ -820,6 +729,4 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
package com.yunbao.live.event;
|
||||
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class LiveAudienceEvent extends BaseModel {
|
||||
}
|
@ -35,6 +35,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.GifCacheUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
@ -278,7 +279,7 @@ public class LiveEnterRoomAnimPresenter {
|
||||
}
|
||||
try {
|
||||
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
|
||||
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true,null,null);
|
||||
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true, null, null);
|
||||
} catch (Exception e) {
|
||||
Log.i("fff", e.getMessage());
|
||||
e.printStackTrace();
|
||||
@ -413,8 +414,11 @@ public class LiveEnterRoomAnimPresenter {
|
||||
colocNow = "#" + car.getCar_colour();
|
||||
playText = car.getUser_nicename() + mContext.getResources().getString(R.string.enter_room);
|
||||
}
|
||||
if (IMLoginManager.get(mContext).getUserInfo().isGiftEffect()){
|
||||
GifCacheUtil.getFile(Constants.GIF_CAR_PREFIX + id, url1, "0", mDownloadGifCallback);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (!needAnim) {
|
||||
getNextEnterRoom();
|
||||
|
@ -5,7 +5,6 @@ import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
@ -42,6 +41,7 @@ import com.yunbao.common.http.CommonHttpConsts;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.GifCacheUtil;
|
||||
import com.yunbao.common.utils.HtmlTagHandler;
|
||||
@ -66,11 +66,6 @@ import com.yunbao.live.views.LiveTitleAnimViewHolder;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -800,7 +795,8 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (bean.getGifUrl().contains("svga") || bean.getGifUrl().contains("gif")) {
|
||||
if ((bean.getGifUrl().contains("svga") || bean.getGifUrl().contains("gif")) &&
|
||||
IMLoginManager.get(mContext).getUserInfo().isGiftEffect()) {
|
||||
|
||||
//同一直播间,玩家自己送礼物,也能看到全服通知
|
||||
//同一直播间,其他玩家也能看到全服通知
|
||||
@ -1233,6 +1229,28 @@ public class LiveGiftAnimPresenter {
|
||||
mSvgaPlayTime = System.currentTimeMillis();
|
||||
mSVGAImageView.setVideoItem(svgaVideoEntity);
|
||||
mSVGAImageView.startAnimation();
|
||||
mSVGAImageView.setCallback(new SVGACallback() {
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinished() {
|
||||
mSVGAImageView.clear();
|
||||
mSVGAImageView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRepeat() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStep(int i, double v) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1264,7 +1282,7 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
try {
|
||||
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
|
||||
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true,null,null);
|
||||
mSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseCompletionCallback, true, null, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
mShowGif = false;
|
||||
@ -1300,7 +1318,7 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
try {
|
||||
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
|
||||
mIconSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseIconCompletionCallback, true,null,null);
|
||||
mIconSVGAParser.decodeFromInputStream(bis, file.getAbsolutePath(), mParseIconCompletionCallback, true, null, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
mShowAllServer = false;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.yunbao.live.socket;
|
||||
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
@ -13,11 +12,8 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
|
||||
import java.util.logging.SocketHandler;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/10/9.
|
||||
* 直播间发言
|
||||
@ -92,7 +88,7 @@ public class SocketChatUtil {
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal_honor", u.getMedal_no_display_src())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("uid", u.getId())
|
||||
.param("liangname", u.getGoodName())
|
||||
.param("vip_type", u.getVip().getType())
|
||||
@ -145,7 +141,7 @@ public class SocketChatUtil {
|
||||
.param("heart", heart)
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType)
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
@ -246,7 +242,7 @@ public class SocketChatUtil {
|
||||
.param("ct", giftToken)
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
.param("guard_type", guard_type + "")
|
||||
@ -261,25 +257,6 @@ public class SocketChatUtil {
|
||||
Log.i("tag", "禮物im");
|
||||
}
|
||||
});
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+liveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@ -305,7 +282,7 @@ public class SocketChatUtil {
|
||||
.param("vip_type", u.getVip().getType())
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("ct", giftToken)
|
||||
.param("ancherName", ancherName)
|
||||
.param("medal_name", u.getMedalName())
|
||||
@ -323,25 +300,6 @@ public class SocketChatUtil {
|
||||
Log.i("tag", "禮物im");
|
||||
}
|
||||
});
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+liveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@ -636,32 +594,13 @@ public class SocketChatUtil {
|
||||
.param("uid", u.getId())
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("uname", u.getUserNiceName())
|
||||
.param("uhead", u.getAvatar())
|
||||
.param("votestotal", votes)
|
||||
.param("guard_nums", guardNum)
|
||||
.param("guard_type", guardType);
|
||||
msg.create();
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@ -685,30 +624,9 @@ public class SocketChatUtil {
|
||||
.param("liveuid", liveId)
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType);
|
||||
msg.create();
|
||||
// Log.i("tx",mLiveUid+msg.mResult.toString());
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,9 +1,6 @@
|
||||
package com.yunbao.live.socket;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustEvent;
|
||||
@ -15,7 +12,6 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.views.LiveRoomViewHolder;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
@ -36,7 +32,7 @@ import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
||||
public class SocketRyChatUtil {
|
||||
|
||||
//关闭直播
|
||||
public static void closeLive(final String votes,final String length,final String nums,final String mLiveUid, SocketRyClient client) {
|
||||
public static void closeLive(final String votes, final String length, final String nums, final String mLiveUid, SocketRyClient client) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
final SocketSendBean msg = new SocketSendBean()
|
||||
.param("_method_", Constants.SOCKET_LIVE_END)
|
||||
@ -45,9 +41,9 @@ public class SocketRyChatUtil {
|
||||
.param("equipment", "app")
|
||||
.param("uname", u.getUserNiceName())
|
||||
.param("uid", u.getId())
|
||||
.param("length",length)
|
||||
.param("votes",votes)
|
||||
.param("nums",nums)
|
||||
.param("length", length)
|
||||
.param("votes", votes)
|
||||
.param("nums", nums)
|
||||
.param("roomnum", u.getId())
|
||||
.param("ct", "直播关闭");
|
||||
msg.create();
|
||||
@ -76,6 +72,7 @@ public class SocketRyChatUtil {
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 发言
|
||||
*/
|
||||
@ -97,7 +94,7 @@ public class SocketRyChatUtil {
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal_honor", u.getMedal_no_display_src())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("uid", u.getId())
|
||||
.param("liangname", u.getGoodName())
|
||||
.param("vip_type", u.getVip().getType())
|
||||
@ -121,14 +118,14 @@ public class SocketRyChatUtil {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Message message) {
|
||||
Log.i("tx", "发送成功"+mLiveUid);
|
||||
Log.i("tx", "发送成功" + mLiveUid);
|
||||
//首发言成功
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("j7isvr");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
CommonHttpUtil.setAdvertisingChannels("j7isvr", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
if (code == 0) {
|
||||
mFirebaseAnalytics.logEvent("FS_liveinteraction", null);
|
||||
logger.logEvent("FB_liveinteraction ");
|
||||
}
|
||||
@ -171,7 +168,7 @@ public class SocketRyChatUtil {
|
||||
.param("heart", heart)
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType)
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
@ -201,7 +198,7 @@ public class SocketRyChatUtil {
|
||||
LiveHttpUtil.setFrontTask("illumine", new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if(code == 0) {
|
||||
if (code == 0) {
|
||||
EventBus.getDefault().post("stop_svga_new_user_double1");
|
||||
}
|
||||
|
||||
@ -286,7 +283,7 @@ public class SocketRyChatUtil {
|
||||
.param("ct", giftToken)
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("medal_name", u.getMedalName())
|
||||
.param("medal_level", u.getMedalLevel())
|
||||
.param("guard_type", guard_type + "")
|
||||
@ -307,8 +304,7 @@ public class SocketRyChatUtil {
|
||||
/**
|
||||
* 发送礼物消息 增加主播名字
|
||||
*/
|
||||
public static void sendGiftMessage(int giftType, String giftToken,
|
||||
String liveUid, String ancherName, int guard_type, String by) {
|
||||
public static void sendGiftMessage(int giftType, String giftToken, String liveUid, String ancherName, int guard_type, String by) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u == null) {
|
||||
return;
|
||||
@ -326,7 +322,7 @@ public class SocketRyChatUtil {
|
||||
.param("vip_type", u.getVip().getType())
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("ct", giftToken)
|
||||
.param("ancherName", ancherName)
|
||||
.param("medal_name", u.getMedalName())
|
||||
@ -344,25 +340,6 @@ public class SocketRyChatUtil {
|
||||
Log.i("tag", "禮物im");
|
||||
}
|
||||
});
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+liveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@ -674,32 +651,13 @@ public class SocketRyChatUtil {
|
||||
.param("uid", u.getId())
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("uname", u.getUserNiceName())
|
||||
.param("uhead", u.getAvatar())
|
||||
.param("votestotal", votes)
|
||||
.param("guard_nums", guardNum)
|
||||
.param("guard_type", guardType);
|
||||
msg.create();
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@ -723,29 +681,9 @@ public class SocketRyChatUtil {
|
||||
.param("liveuid", liveId)
|
||||
.param("bubble", u.getDress().getBubble())
|
||||
.param("medal", u.getDress().getMedal())
|
||||
.param("medal_new",u.getDress().getMedal_new())
|
||||
.param("medal_new", u.getDress().getMedal_new())
|
||||
.param("guard_type", guardType);
|
||||
msg.create();
|
||||
// Log.i("tx",mLiveUid+msg.mResult.toString());
|
||||
// V2TIMManager.getInstance().sendGroupTextMessage(msg.mResult.toString(),"g"+mLiveUid, V2TIMMessage.V2TIM_PRIORITY_NORMAL, new V2TIMSendCallback<V2TIMMessage>() {
|
||||
// @Override
|
||||
// public void onProgress(int progress) {
|
||||
// Log.i("tx","发送中"+progress);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onSuccess(V2TIMMessage v2TIMMessage) {
|
||||
// Log.i("tx","发送成功");
|
||||
//// SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString()+"");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String desc) {
|
||||
// Log.i("tx",code+"发送失败"+desc);
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
@ -48,6 +49,7 @@ import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
@ -55,6 +57,7 @@ import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
@ -77,6 +80,7 @@ import com.yunbao.live.custom.TopGradual;
|
||||
import com.yunbao.live.dialog.LiveFansMedalDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||
import com.yunbao.live.dialog.LiveUserDialogFragment;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveDanmuPresenter;
|
||||
@ -103,7 +107,7 @@ import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer;
|
||||
* Created by cxf on 2018/10/9.
|
||||
* 直播间公共逻辑
|
||||
*/
|
||||
public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickListener {
|
||||
public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickListener{
|
||||
|
||||
public static Context Contexts;
|
||||
private int mOffsetY;
|
||||
@ -230,6 +234,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mSVGAImageView = svgaImageView;
|
||||
mLiveGiftPrizePoolContainer = liveGiftPrizePoolContainer;
|
||||
this.windowManager = windowManager;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -537,6 +542,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
|
||||
time = (TextView) findViewById(R.id.time);
|
||||
pkText1 = (TextView) findViewById(R.id.pk_text1);
|
||||
pkText2 = (TextView) findViewById(R.id.pk_text2);
|
||||
@ -786,6 +792,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
ft_hot_add = (FrameLayout) findViewById(R.id.ft_hot_add);
|
||||
img_hot_gif = (ImageView) findViewById(R.id.img_hot_gif);
|
||||
findViewById(R.id.ft_hot_add).setOnClickListener(this);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.open_sidebar), () -> Bus.get().post(new LiveAudienceEvent()));
|
||||
}
|
||||
|
||||
//点击头像
|
||||
@ -1865,4 +1872,5 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
CommonHttpUtil.cancel(CommonHttpConsts.SET_ATTENTION);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,160 @@
|
||||
package com.yunbao.live.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.jakewharton.rxbinding3.view.RxView;
|
||||
import com.squareup.picasso.Picasso;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.custom.RatioRoundImageView;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.formatBigNum;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.utils.MainIconUtil;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.Observer;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import kotlin.Unit;
|
||||
|
||||
/**
|
||||
* 直播页面布局
|
||||
*/
|
||||
public class SidebarLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar;
|
||||
private RatioRoundImageView bgs;
|
||||
private View views;
|
||||
private TextView mLiveState, mTitle, mName, mNum;
|
||||
|
||||
public SidebarLiveItemViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
//展示普通布局,隐藏周星榜布局
|
||||
itemView.findViewById(R.id.live_info_view).setVisibility(View.VISIBLE);
|
||||
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
|
||||
mCover = itemView.findViewById(R.id.cover);
|
||||
bgs = itemView.findViewById(R.id.bgs);
|
||||
liveType = itemView.findViewById(R.id.live_type);
|
||||
views = itemView.findViewById(R.id.views);
|
||||
mLiveIco = (ImageView) itemView.findViewById(R.id.tv_live_ico);
|
||||
mLiveState = (TextView) itemView.findViewById(R.id.tv_live_state);
|
||||
mType = (ImageView) itemView.findViewById(R.id.type);
|
||||
mTitle = (TextView) itemView.findViewById(R.id.title);
|
||||
mName = (TextView) itemView.findViewById(R.id.name);
|
||||
mNum = (TextView) itemView.findViewById(R.id.num);
|
||||
pkico = (ImageView) itemView.findViewById(R.id.pk_ico);
|
||||
drPkIco = (ImageView) itemView.findViewById(R.id.dr_pk_ico);
|
||||
pkAvatar = (ImageView) itemView.findViewById(R.id.pk_avatar);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置页面数据
|
||||
*
|
||||
* @param bean 数据类
|
||||
* @param position 下标
|
||||
*/
|
||||
public void loadViewDate(AnchorRecommendItemModel bean, int position, int height, OnItemClickListener listener) {
|
||||
Context mContext = itemView.getContext();
|
||||
itemView.setTag(position);
|
||||
liveType.setImageDrawable(null);
|
||||
if (bean.getContentPicSizeTwo() != null && !bean.getContentPicSizeTwo().equals("") && height <= 1920) {
|
||||
Picasso.with(mContext)
|
||||
.load(bean.getContentPicSizeTwo())
|
||||
.into(liveType);
|
||||
} else if (bean.getContentPicSizeThree() != null && !bean.getContentPicSizeThree().equals("") && height > 1920) {
|
||||
Picasso.with(mContext)
|
||||
.load(bean.getContentPicSizeThree())
|
||||
.into(liveType);
|
||||
}
|
||||
ImgLoader.display(itemView.getContext(), bean.getThumb(), mCover);
|
||||
bgs.setVisibility(View.VISIBLE);
|
||||
pkico.setVisibility(View.GONE);
|
||||
pkAvatar.setVisibility(View.GONE);
|
||||
drPkIco.setVisibility(View.GONE);
|
||||
if (bean.getDrpkStatus() != null && bean.getDrpkStatus().equals("1")) {
|
||||
drPkIco.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (bean.getPkAvatarThumb() != null && !bean.getPkAvatarThumb().equals("")) {
|
||||
ImgLoader.display(mContext, bean.getPkAvatarThumb(), pkAvatar);
|
||||
pkico.setVisibility(View.VISIBLE);
|
||||
pkAvatar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mName.setText(bean.getUserNicename());
|
||||
if (TextUtils.isEmpty(bean.getTitle())) {
|
||||
if (mTitle.getVisibility() == View.VISIBLE) {
|
||||
mTitle.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
if (mTitle.getVisibility() != View.VISIBLE) {
|
||||
mTitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mTitle.setText(bean.getTitle());
|
||||
}
|
||||
mNum.setText(formatBigNum.formatBigNum(bean.getHotNum()));
|
||||
views.setVisibility(View.GONE);
|
||||
if ("1".equals(bean.getIslive())) {
|
||||
views.setVisibility(View.VISIBLE);
|
||||
//直播中
|
||||
mType.setImageResource(MainIconUtil.getLiveTypeIcon(Integer.parseInt(bean.getType())));
|
||||
mType.setVisibility(View.VISIBLE);
|
||||
mLiveIco.setImageResource(R.mipmap.icon_main_rest_work);
|
||||
mNum.setVisibility(View.VISIBLE);
|
||||
liveType.setVisibility(View.VISIBLE);
|
||||
mLiveState.setText(R.string.lives_state);
|
||||
} else {
|
||||
views.setVisibility(View.VISIBLE);
|
||||
//休息中
|
||||
mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING));
|
||||
mType.setVisibility(View.GONE);
|
||||
mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot);
|
||||
mLiveState.setText(R.string.rest_state);
|
||||
liveType.setVisibility(View.GONE);
|
||||
mNum.setVisibility(View.GONE);
|
||||
}
|
||||
RxView.clicks(itemView)
|
||||
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
|
||||
.subscribe(new Observer<Unit>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(Unit unit) {
|
||||
if (listener != null) {
|
||||
listener.onItemClick(bean, position);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
views.setVisibility(View.GONE);
|
||||
mLiveIco.setVisibility(View.GONE);
|
||||
mLiveState.setVisibility(View.GONE);
|
||||
mNum.setVisibility(View.GONE);
|
||||
pkAvatar.setVisibility(View.GONE);
|
||||
pkico.setVisibility(View.GONE);
|
||||
mTitle.setVisibility(View.GONE);
|
||||
drPkIco.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onItemClick(AnchorRecommendItemModel bean, int position);
|
||||
}
|
||||
|
||||
}
|
7
live/src/main/res/drawable/bg_live_item_right.xml
Normal file
7
live/src/main/res/drawable/bg_live_item_right.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:topLeftRadius="10dp" />
|
||||
<solid android:color="#80000000" />
|
||||
</shape>
|
@ -1,39 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_back"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/live_bg">
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/live_bg" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#60000000" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/play_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<com.yunbao.common.custom.MyViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
/>
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/page_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_small_screen"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_gravity="right"
|
||||
android:padding="5dp"
|
||||
android:visibility="gone"
|
||||
android:src="@mipmap/icon_live_close"/>
|
||||
android:src="@mipmap/icon_live_close"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:id="@+id/left_drawer"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:background="@mipmap/live_bg"
|
||||
android:choiceMode="singleChoice"
|
||||
android:dividerHeight="0dp"
|
||||
android:orientation="vertical"
|
||||
|
||||
android:scrollbars="none">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sidebar_back"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#70000000" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="56dp"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<com.ms.banner.Banner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/recommended_for_you"
|
||||
android:textColor="#FFF6F7FB"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.yunbao.common.custom.CommonRefreshView
|
||||
android:id="@+id/sidebarList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
@ -224,9 +224,11 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_height="45dp">
|
||||
|
||||
<ImageView
|
||||
@ -427,8 +429,6 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.opensource.svgaplayer.SVGAImageView
|
||||
android:id="@+id/svga_new_user_gif"
|
||||
@ -473,8 +473,8 @@
|
||||
|
||||
<include
|
||||
android:id="@+id/station_horn_banner"
|
||||
android:visibility="gone"
|
||||
layout="@layout/view_whole_station_horn_layout" />
|
||||
layout="@layout/view_whole_station_horn_layout"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="45dp"
|
||||
|
||||
android:paddingTop="15dp">
|
||||
|
||||
<LinearLayout
|
||||
@ -61,7 +63,7 @@
|
||||
android:maxWidth="90dp"
|
||||
android:maxEms="4"
|
||||
android:singleLine="true"
|
||||
android:text="1222"
|
||||
android:text="@string/do_you_like_find"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
|
||||
@ -260,7 +262,7 @@
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!--热度-->
|
||||
<LinearLayout
|
||||
android:id="@+id/hot_btn"
|
||||
android:layout_width="wrap_content"
|
||||
@ -274,7 +276,8 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="5dp">
|
||||
android:paddingRight="5dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
@ -300,6 +303,34 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/open_sidebar"
|
||||
android:layout_width="69dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignTop="@id/btn_votes"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/bg_live_item_right"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/live_icon_leftt_sliding" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/recommended_for_you"
|
||||
android:textColor="#fff"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_noble"
|
||||
android:layout_width="45dp"
|
||||
@ -461,7 +492,7 @@
|
||||
<ImageView
|
||||
android:id="@+id/img_hot_gif"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
@ -912,7 +943,6 @@
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_look_buy_vip"
|
||||
android:layout_width="52dp"
|
||||
@ -1641,12 +1671,13 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="19dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginTop="120dp"
|
||||
android:layout_alignParentRight="true">
|
||||
android:layout_marginRight="19dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout android:id="@+id/mic_view"
|
||||
<RelativeLayout
|
||||
android:id="@+id/mic_view"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:visibility="gone">
|
||||
@ -1657,22 +1688,23 @@
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/m_chu_xia"
|
||||
app:riv_oval="true"/>
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/voice"/>
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@mipmap/voice" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout android:id="@+id/mic_view1"
|
||||
<RelativeLayout
|
||||
android:id="@+id/mic_view1"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="19dp">
|
||||
android:layout_marginTop="19dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/mic_ico1"
|
||||
@ -1680,18 +1712,19 @@
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/m_chu_xia"
|
||||
app:riv_oval="true"/>
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="@mipmap/voice"/>
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@mipmap/voice" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout android:id="@+id/mic_view2"
|
||||
<RelativeLayout
|
||||
android:id="@+id/mic_view2"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="19dp"
|
||||
@ -1703,13 +1736,14 @@
|
||||
android:layout_height="40dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/m_chu_xia"
|
||||
app:riv_oval="true"/>
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:src="@mipmap/voice"/>
|
||||
android:src="@mipmap/voice" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
12
live/src/main/res/layout/view_no_data_live.xml
Normal file
12
live/src/main/res/layout/view_no_data_live.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/img_no_anchor" />
|
||||
</LinearLayout>
|
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_leftt_sliding.png
Normal file
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_leftt_sliding.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -142,12 +142,6 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
}
|
||||
});
|
||||
// itemView.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
|
@ -3,9 +3,6 @@ package com.yunbao.main.views;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.graphics.Outline;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -13,6 +10,10 @@ import android.view.ViewGroup;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ms.banner.Banner;
|
||||
@ -403,7 +404,6 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
}
|
||||
|
@ -1,12 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/top_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="135dp"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -17,14 +15,14 @@
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp"
|
||||
app:delay_time="3000"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
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"/>
|
||||
app:indicator_width="8dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user