直播间修改底部菜单修改
@ -0,0 +1,50 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
|
import com.yunbao.common.views.FunGamesViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class FunGamesAdapter extends RecyclerView.Adapter {
|
||||||
|
private List<ActiveModel> activeModels = new ArrayList<>();
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View funGameView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_fun_games, parent, false);
|
||||||
|
return new FunGamesViewHolder(funGameView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
if (holder instanceof FunGamesViewHolder) {
|
||||||
|
FunGamesViewHolder funGamesViewHolder = (FunGamesViewHolder) holder;
|
||||||
|
funGamesViewHolder.showView(activeModels.get(position));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return activeModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置数据源
|
||||||
|
*
|
||||||
|
* @param mActiveModels
|
||||||
|
*/
|
||||||
|
public void addData(List<ActiveModel> mActiveModels) {
|
||||||
|
activeModels.clear();
|
||||||
|
activeModels.addAll(mActiveModels);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
72
common/src/main/java/com/yunbao/common/bean/ActiveModel.java
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动
|
||||||
|
*/
|
||||||
|
public class ActiveModel extends BaseModel {
|
||||||
|
/**
|
||||||
|
* active_id : 3
|
||||||
|
* active_name : 闖關熱戀
|
||||||
|
* active_img : https://qny.shayucm.com/chuangguan.png
|
||||||
|
* active_src : h5/activity/PassionateLove/index.html
|
||||||
|
* show_type : 0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@SerializedName("active_id")
|
||||||
|
private String activeId = "";
|
||||||
|
@SerializedName("active_name")
|
||||||
|
private String activeName = "";
|
||||||
|
@SerializedName("active_img")
|
||||||
|
private String activeImg = "";
|
||||||
|
@SerializedName("active_src")
|
||||||
|
private String activeSrc = "";
|
||||||
|
@SerializedName("show_type")
|
||||||
|
private String showType = "";
|
||||||
|
|
||||||
|
public String getActiveId() {
|
||||||
|
return activeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActiveModel setActiveId(String activeId) {
|
||||||
|
this.activeId = activeId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActiveName() {
|
||||||
|
return activeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActiveModel setActiveName(String activeName) {
|
||||||
|
this.activeName = activeName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActiveImg() {
|
||||||
|
return activeImg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActiveModel setActiveImg(String activeImg) {
|
||||||
|
this.activeImg = activeImg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActiveSrc() {
|
||||||
|
return activeSrc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActiveModel setActiveSrc(String activeSrc) {
|
||||||
|
this.activeSrc = activeSrc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShowType() {
|
||||||
|
return showType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActiveModel setShowType(String showType) {
|
||||||
|
this.showType = showType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.adapter.FunGamesAdapter;
|
||||||
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播间合计弹窗
|
||||||
|
*/
|
||||||
|
public class LiveTotalDialog extends AbsDialogFragment {
|
||||||
|
private RecyclerView funGamesList;
|
||||||
|
private FunGamesAdapter gamesAdapter;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.view_live_total;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getDialogStyle() {
|
||||||
|
return R.style.dialog2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canCancel() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
funGamesList = (RecyclerView) findViewById(R.id.fun_games_list);
|
||||||
|
gamesAdapter = new FunGamesAdapter();
|
||||||
|
funGamesList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||||
|
funGamesList.setAdapter(gamesAdapter);
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.getActiveList(new HttpCallback<List<ActiveModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<ActiveModel> data) {
|
||||||
|
if (!isDetached())
|
||||||
|
gamesAdapter.addData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setWindowAttributes(Window window) {
|
||||||
|
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||||
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
|
params.gravity = Gravity.BOTTOM;
|
||||||
|
window.setAttributes(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.common.http;
|
package com.yunbao.common.http;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.FaceBookUpModel;
|
import com.yunbao.common.bean.FaceBookUpModel;
|
||||||
@ -141,4 +142,10 @@ public interface PDLiveApi {
|
|||||||
Observable<ResponseModel<List<SlideInBannerModel>>> getHot(
|
Observable<ResponseModel<List<SlideInBannerModel>>> getHot(
|
||||||
@Query("p") int page
|
@Query("p") int page
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取活动
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Active.getActiveList")
|
||||||
|
Observable<ResponseModel<List<ActiveModel>>> getActiveList();
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,12 @@ package com.yunbao.common.http.live;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
import com.yunbao.common.http.API;
|
import com.yunbao.common.http.API;
|
||||||
import com.yunbao.common.http.ResponseModel;
|
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -136,4 +136,20 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取活动列表
|
||||||
|
*/
|
||||||
|
public void getActiveList(HttpCallback<List<ActiveModel>> callback) {
|
||||||
|
API.get().pdLiveApi(mContext).getActiveList()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
if (callback != null)
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}, throwable -> {
|
||||||
|
if (callback != null)
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ActiveModel;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
|
||||||
|
public class FunGamesViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private ImageView funGamePic;
|
||||||
|
private TextView funGameName;
|
||||||
|
|
||||||
|
public FunGamesViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
funGamePic = itemView.findViewById(R.id.fun_game_pic);
|
||||||
|
funGameName = itemView.findViewById(R.id.fun_game_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置数据
|
||||||
|
*
|
||||||
|
* @param model 数据模型
|
||||||
|
*/
|
||||||
|
public void showView(ActiveModel model) {
|
||||||
|
ImgLoader.display(itemView.getContext(), model.getActiveImg(), funGamePic);
|
||||||
|
funGameName.setText(model.getActiveName());
|
||||||
|
}
|
||||||
|
}
|
5
common/src/main/res/drawable/bg_live_tota.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:topLeftRadius="12dp" android:topRightRadius="12dp" />
|
||||||
|
<solid android:color="#98000000" />
|
||||||
|
</shape>
|
25
common/src/main/res/layout/view_fun_games.xml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/fun_game_pic"
|
||||||
|
android:padding="3dp"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_guard" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/fun_game_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/guard_guard"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
206
common/src/main/res/layout/view_live_total.xml
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
<?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:background="@drawable/bg_live_tota"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/fun_games"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/fun_games_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="62dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="10dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="@string/value_added_benefits"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_fans" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/fan_club"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_guard" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/guard_guard"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_aristocrat" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/noble"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_zhouxinglist" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_wks"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_events" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/activity_center"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:text="@string/basic_tools"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="20dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_connect" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/live_link_mic_2"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="23dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:src="@mipmap/live_more_icon_special" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:text="@string/effects_settings"
|
||||||
|
android:textColor="#FF9A9A9A"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_aristocrat.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_connect.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_events.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_fans.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_guard.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_more_icon_special.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 20 KiB |
@ -872,4 +872,10 @@
|
|||||||
<string name="anchor_more">更多</string>
|
<string name="anchor_more">更多</string>
|
||||||
<string name="wonderful_live">精彩直播</string>
|
<string name="wonderful_live">精彩直播</string>
|
||||||
<string name="recommended_for_you">為您推薦</string>
|
<string name="recommended_for_you">為您推薦</string>
|
||||||
|
<string name="fun_games">趣味游戏</string>
|
||||||
|
<string name="value_added_benefits">增值权益</string>
|
||||||
|
<string name="fan_club">粉絲團</string>
|
||||||
|
<string name="activity_center">活動中心</string>
|
||||||
|
<string name="basic_tools">基础工具</string>
|
||||||
|
<string name="effects_settings">特效設置</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
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",
|
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||||
|
@ -50,6 +50,7 @@ import com.yunbao.common.custom.CommonRefreshView;
|
|||||||
import com.yunbao.common.custom.ItemDecoration;
|
import com.yunbao.common.custom.ItemDecoration;
|
||||||
import com.yunbao.common.custom.MyViewPager;
|
import com.yunbao.common.custom.MyViewPager;
|
||||||
import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
import com.yunbao.common.dialog.LiveChargeDialogFragment;
|
||||||
|
import com.yunbao.common.dialog.LiveTotalDialog;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
@ -419,6 +420,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//定时器
|
//定时器
|
||||||
@ -1381,8 +1384,17 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onOpenDrawer(LiveAudienceEvent event) {
|
public void onOpenDrawer(LiveAudienceEvent event) {
|
||||||
//从右边打开侧边栏
|
switch (event.getType()) {
|
||||||
drawerLayout.openDrawer(GravityCompat.END);
|
case SIDEBAR:
|
||||||
|
//从右边打开侧边栏
|
||||||
|
drawerLayout.openDrawer(GravityCompat.END);
|
||||||
|
break;
|
||||||
|
case BOTTOMCOLLECTION:
|
||||||
|
LiveTotalDialog fragment = new LiveTotalDialog();
|
||||||
|
fragment.show(getSupportFragmentManager(), "LiveTotalDialog");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,4 +3,28 @@ package com.yunbao.live.event;
|
|||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
public class LiveAudienceEvent extends BaseModel {
|
public class LiveAudienceEvent extends BaseModel {
|
||||||
|
private LiveAudienceType type;
|
||||||
|
|
||||||
|
public LiveAudienceType getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveAudienceEvent setType(LiveAudienceType type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum LiveAudienceType {
|
||||||
|
SIDEBAR(1, "侧边栏"),
|
||||||
|
BOTTOMCOLLECTION(2, "底部合集");
|
||||||
|
|
||||||
|
private int type;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
LiveAudienceType(int type, String name) {
|
||||||
|
this.type = type;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,16 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
|
|||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
|
import com.yunbao.common.dialog.LiveTotalDialog;
|
||||||
import com.yunbao.common.event.MessageIMEvent;
|
import com.yunbao.common.event.MessageIMEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||||
@ -46,6 +49,7 @@ import com.yunbao.live.bean.LiveChatBean;
|
|||||||
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
import com.yunbao.live.dialog.LiveHDDialogFragment;
|
||||||
import com.yunbao.live.dialog.LiveMicUserDialogFragment;
|
import com.yunbao.live.dialog.LiveMicUserDialogFragment;
|
||||||
import com.yunbao.live.dialog.LivePromotionDialogFragment;
|
import com.yunbao.live.dialog.LivePromotionDialogFragment;
|
||||||
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@ -290,6 +294,15 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//底部改造
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.total_image), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.BOTTOMCOLLECTION));
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Handler handler = new Handler();
|
public static Handler handler = new Handler();
|
||||||
|
@ -8,7 +8,6 @@ import android.os.Message;
|
|||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
@ -107,7 +106,7 @@ import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer;
|
|||||||
* Created by cxf on 2018/10/9.
|
* 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;
|
public static Context Contexts;
|
||||||
private int mOffsetY;
|
private int mOffsetY;
|
||||||
@ -792,7 +791,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
ft_hot_add = (FrameLayout) findViewById(R.id.ft_hot_add);
|
ft_hot_add = (FrameLayout) findViewById(R.id.ft_hot_add);
|
||||||
img_hot_gif = (ImageView) findViewById(R.id.img_hot_gif);
|
img_hot_gif = (ImageView) findViewById(R.id.img_hot_gif);
|
||||||
findViewById(R.id.ft_hot_add).setOnClickListener(this);
|
findViewById(R.id.ft_hot_add).setOnClickListener(this);
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.open_sidebar), () -> Bus.get().post(new LiveAudienceEvent()));
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.open_sidebar), () -> Bus.get().post(new LiveAudienceEvent()
|
||||||
|
.setType(LiveAudienceEvent.LiveAudienceType.SIDEBAR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
//点击头像
|
//点击头像
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:layout_gravity="right"
|
android:layout_gravity="right"
|
||||||
android:layout_marginRight="15dp"
|
android:layout_marginRight="15dp"
|
||||||
android:layout_marginBottom="18dp"
|
android:layout_marginBottom="45dp"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
@ -228,8 +228,8 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_height="45dp"
|
||||||
android:layout_height="45dp">
|
android:layout_alignParentBottom="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btn_close"
|
android:id="@+id/btn_close"
|
||||||
@ -252,7 +252,8 @@
|
|||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@mipmap/img_bg"
|
android:background="@mipmap/img_bg"
|
||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:src="@mipmap/zg" />
|
android:src="@mipmap/zg"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@ -260,7 +261,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/btn_zg">
|
android:layout_toLeftOf="@id/btn_zg"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="32dp"
|
android:layout_width="32dp"
|
||||||
@ -300,7 +302,8 @@
|
|||||||
android:layout_toLeftOf="@id/btn_close"
|
android:layout_toLeftOf="@id/btn_close"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:background="@mipmap/img_bg"
|
android:background="@mipmap/img_bg"
|
||||||
android:src="@mipmap/live_lw" />
|
android:src="@mipmap/live_lw"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btn_link_mic"
|
android:id="@+id/btn_link_mic"
|
||||||
@ -318,7 +321,8 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:layout_toLeftOf="@id/btn_mic"
|
android:layout_toLeftOf="@id/btn_mic"
|
||||||
android:src="@mipmap/live_user_more" />
|
android:src="@mipmap/live_user_more"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -328,14 +332,58 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="5dp"
|
android:layout_marginRight="5dp"
|
||||||
android:layout_toLeftOf="@id/btn_zg1"
|
android:layout_toLeftOf="@id/btn_zg1"
|
||||||
android:src="@mipmap/lianmai" />
|
android:src="@mipmap/lianmai"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/btn_red_pack"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_toLeftOf="@id/btn_link_mic"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:src="@mipmap/icon_live_red_pack"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/message_layout"
|
||||||
|
android:layout_width="133dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="@drawable/bg_live_chat"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="25dp"
|
||||||
|
android:layout_height="25dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:src="@mipmap/icon_live_msg" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/et_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:alpha="0.5"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="@string/live_say_something"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textColorHint="@color/gray3"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/msg_view"
|
android:id="@+id/msg_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toLeftOf="@id/btn_more">
|
android:layout_toEndOf="@id/message_layout">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rt_msg"
|
android:id="@+id/rt_msg"
|
||||||
@ -385,48 +433,34 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btn_red_pack"
|
android:id="@+id/total_image"
|
||||||
android:layout_width="0dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_toLeftOf="@id/btn_link_mic"
|
|
||||||
android:padding="5dp"
|
|
||||||
android:src="@mipmap/icon_live_red_pack" />
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_toEndOf="@+id/msg_view"
|
||||||
android:layout_marginTop="5dp"
|
android:padding="5dp"
|
||||||
android:layout_marginRight="15dp"
|
android:src="@mipmap/live_icon_more" />
|
||||||
android:layout_toLeftOf="@+id/msg_view"
|
|
||||||
android:background="@drawable/bg_live_chat"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="25dp"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:src="@mipmap/icon_live_msg" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/et_input"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:alpha="0.5"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:hint="@string/live_say_something"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:textColor="@color/textColor"
|
|
||||||
android:textColorHint="@color/gray3"
|
|
||||||
android:textSize="12sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/gift_image"
|
||||||
|
android:layout_width="38dp"
|
||||||
|
android:layout_height="38dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
|
android:src="@mipmap/live_lw" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/live_new_people"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_toStartOf="@id/gift_image"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:src="@mipmap/live_icon_new_people_cn" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_more.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
live/src/main/res/mipmap-xxxhdpi/live_icon_new_people_cn.png
Normal file
After Width: | Height: | Size: 20 KiB |