主播消息中心功能构建
This commit is contained in:
parent
d86e16c9f5
commit
8d823f7a07
@ -0,0 +1,52 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
import com.yunbao.common.views.LiveSystemMessageViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播消息中心适配器
|
||||||
|
*/
|
||||||
|
public class LiveSystemMessageAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
private LayoutInflater mInflater;
|
||||||
|
private List<ListInfoMessageModel> listInfoMessageModels = new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveSystemMessageAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
mInflater = LayoutInflater.from(mContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new LiveSystemMessageViewHolder(mInflater.inflate(R.layout.view_live_system_message, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
LiveSystemMessageViewHolder messageViewHolder = (LiveSystemMessageViewHolder) holder;
|
||||||
|
messageViewHolder.setViewData(listInfoMessageModels.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return listInfoMessageModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addData(List<ListInfoMessageModel> list) {
|
||||||
|
listInfoMessageModels.addAll(list);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class ListInfoMessageModel extends BaseModel {
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("title")
|
||||||
|
private String title;
|
||||||
|
@SerializedName("banner")
|
||||||
|
private String banner;
|
||||||
|
@SerializedName("content")
|
||||||
|
private String content;
|
||||||
|
@SerializedName("link")
|
||||||
|
private String link;
|
||||||
|
@SerializedName("addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBanner() {
|
||||||
|
return banner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setBanner(String banner) {
|
||||||
|
this.banner = banner;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLink() {
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setLink(String link) {
|
||||||
|
this.link = link;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会话列表展示时间
|
||||||
|
*/
|
||||||
|
public String getLastDate(String type) {
|
||||||
|
if (!TextUtils.isEmpty(addtime) && !TextUtils.equals(addtime, "0")) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||||
|
Date currenTimeZone;
|
||||||
|
if (TextUtils.equals(type, "-1")) {
|
||||||
|
currenTimeZone = new Date(Long.parseLong(addtime));
|
||||||
|
} else {
|
||||||
|
currenTimeZone = new Date(Long.parseLong(addtime + "000"));
|
||||||
|
}
|
||||||
|
return sdf.format(currenTimeZone);
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -12,6 +12,7 @@ import com.yunbao.common.bean.HourRank;
|
|||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
@ -542,4 +543,9 @@ public interface PDLiveApi {
|
|||||||
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
Observable<ResponseModel<BaseModel>> jieshuDRPK(
|
||||||
@Query("roomid") String roomId,
|
@Query("roomid") String roomId,
|
||||||
@Query("uid") String uid);
|
@Query("uid") String uid);
|
||||||
|
|
||||||
|
@GET("/api/public/?service=Message.getListInfo")
|
||||||
|
Observable<ResponseModel<List<ListInfoMessageModel>>> getListInfo(
|
||||||
|
@Query("type") String type,
|
||||||
|
@Query("p") int p);
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ import com.yunbao.common.bean.EnterRoomNewModel;
|
|||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.bean.LinkMicUserBean;
|
import com.yunbao.common.bean.LinkMicUserBean;
|
||||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||||
import com.yunbao.common.bean.LiveInfoModel;
|
import com.yunbao.common.bean.LiveInfoModel;
|
||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
@ -1075,6 +1076,18 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getListInfo(String type, int p, HttpCallback<List<ListInfoMessageModel>> callback) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getListInfo(type, p)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(listResponseModel -> {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
}, throwable -> {
|
||||||
|
callback.onError(throwable.getMessage());
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直播间取消网络请求
|
* 直播间取消网络请求
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.adapter.LiveSystemMessageAdapter;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
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 LiveAnchorMessageCustomPopup extends BottomPopupView {
|
||||||
|
private LiveSystemMessageAdapter adapter;
|
||||||
|
private RecyclerView liveMessage;
|
||||||
|
|
||||||
|
public LiveAnchorMessageCustomPopup(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回自定义弹窗的布局
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return R.layout.dialog_live_anchor_message;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||||
|
@Override
|
||||||
|
protected void onCreate() {
|
||||||
|
super.onCreate();
|
||||||
|
initView();
|
||||||
|
initDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initDate() {
|
||||||
|
LiveNetManager.get(getContext())
|
||||||
|
.getListInfo("1", 1, new HttpCallback<List<ListInfoMessageModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<ListInfoMessageModel> data) {
|
||||||
|
adapter.addData(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
liveMessage = findViewById(R.id.live_message);
|
||||||
|
liveMessage.setHasFixedSize(false);
|
||||||
|
liveMessage.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||||
|
adapter = new LiveSystemMessageAdapter(getContext());
|
||||||
|
liveMessage.setAdapter(adapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.yunbao.common.views;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.cardview.widget.CardView;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
|
||||||
|
public class LiveSystemMessageViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView titleText, timeText, contextLayout, toView;
|
||||||
|
private CardView bannerCard;
|
||||||
|
private ImageView bannerImage;
|
||||||
|
|
||||||
|
public LiveSystemMessageViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
titleText = itemView.findViewById(R.id.title_text);
|
||||||
|
timeText = itemView.findViewById(R.id.time_text);
|
||||||
|
contextLayout = itemView.findViewById(R.id.context_layout);
|
||||||
|
toView = itemView.findViewById(R.id.to_view);
|
||||||
|
bannerCard = itemView.findViewById(R.id.banner_card);
|
||||||
|
bannerImage = itemView.findViewById(R.id.banner_image);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setViewData(ListInfoMessageModel model) {
|
||||||
|
titleText.setText(model.getTitle());
|
||||||
|
timeText.setText(model.getLastDate("1"));
|
||||||
|
if (TextUtils.isEmpty(model.getBanner())) {
|
||||||
|
bannerCard.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
bannerCard.setVisibility(View.VISIBLE);
|
||||||
|
ImgLoader.display(itemView.getContext(), model.getBanner(), bannerImage);
|
||||||
|
}
|
||||||
|
contextLayout.setText(model.getContent());
|
||||||
|
if (TextUtils.isEmpty(model.getLink())) {
|
||||||
|
toView.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
toView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
5
common/src/main/res/drawable/bg_live_anchor.xml
Normal file
5
common/src/main/res/drawable/bg_live_anchor.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:radius="13dp"/>
|
||||||
|
<solid android:color="#b3000000"/>
|
||||||
|
</shape>
|
7
common/src/main/res/drawable/bg_live_anchor_message.xml
Normal file
7
common/src/main/res/drawable/bg_live_anchor_message.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:topLeftRadius="8dp"
|
||||||
|
android:topRightRadius="8dp" />
|
||||||
|
<solid android:color="#F4F7FC" />
|
||||||
|
</shape>
|
21
common/src/main/res/layout/dialog_live_anchor_message.xml
Normal file
21
common/src/main/res/layout/dialog_live_anchor_message.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?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="400dp"
|
||||||
|
android:background="@drawable/bg_live_anchor_message"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="18dp"
|
||||||
|
android:text="@string/message"
|
||||||
|
android:textColor="@color/black3"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/live_message"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</LinearLayout>
|
@ -1,11 +1,110 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_live_anchor"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="6dp"
|
||||||
|
android:layout_height="6dp"
|
||||||
|
app:cardBackgroundColor="#FF4E4E"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="0dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
|
android:text="00:00"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:background="@drawable/bg_live_anchor"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:src="@mipmap/live_icon_data" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:text="@string/broadcast_data"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/message_linear"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:background="@drawable/bg_live_anchor"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingTop="4dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:paddingBottom="4dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="14dp"
|
||||||
|
android:layout_height="14dp"
|
||||||
|
android:src="@mipmap/live_icon_news" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:text="@string/message"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_live_tota"
|
android:background="@drawable/bg_live_tota"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -95,6 +194,7 @@
|
|||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/live_tool_robot"
|
android:id="@+id/live_tool_robot"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -213,6 +313,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -278,6 +379,7 @@
|
|||||||
android:textColor="#FF9A9A9A"
|
android:textColor="#FF9A9A9A"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/live_tool_random_pk"
|
android:id="@+id/live_tool_random_pk"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -325,5 +427,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
94
common/src/main/res/layout/view_live_system_message.xml
Normal file
94
common/src/main/res/layout/view_live_system_message.xml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
app:cardBackgroundColor="@color/white"
|
||||||
|
app:cardCornerRadius="15dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:text="通知標題標題通知標題標題"
|
||||||
|
android:textColor="#ff161616"
|
||||||
|
android:textSize="17sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/time_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginTop="19dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:text="2-24 17:00"
|
||||||
|
android:textColor="#ff8c8c8c"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/banner_card"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="102dp"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/banner_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:scaleType="centerCrop" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/context_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:text="內容內容內容內容內容內容內容內容內容內容內容
|
||||||
|
內容內容內容內容內容內容內容內容內容內容內容內容內容內容內容
|
||||||
|
內容內容內容內容內容內容內容內容內容內容內容內容
|
||||||
|
內容內容內容內容內容內容內容。"
|
||||||
|
android:textColor="#B1B1B1"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/to_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:drawableEnd="@mipmap/icon_more"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/click_to_view"
|
||||||
|
android:textColor="#ff8c8c8c"
|
||||||
|
android:textSize="13sp" />
|
||||||
|
</FrameLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
BIN
common/src/main/res/mipmap-xxhdpi/live_icon_data.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/live_icon_data.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/live_icon_news.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/live_icon_news.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -938,14 +938,14 @@ Limited ride And limited avatar frame</string>
|
|||||||
|
|
||||||
<string name="in_batch">In a batch</string>
|
<string name="in_batch">In a batch</string>
|
||||||
<string name="chat_chat">Chat</string>
|
<string name="chat_chat">Chat</string>
|
||||||
<string name="lucky_angel" >Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
|
<string name="lucky_angel">Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you!</string>
|
||||||
<string name="lucky_100" >Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
|
<string name="lucky_100">Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck!</string>
|
||||||
<string name="user_card_guard" >Guardian group %s people</string>
|
<string name="user_card_guard">Guardian group %s people</string>
|
||||||
<string name="to_receive" >receive</string>
|
<string name="to_receive">receive</string>
|
||||||
<string name="to_complete" >To complete</string>
|
<string name="to_complete">To complete</string>
|
||||||
<string name="already_collected" >Already collected</string>
|
<string name="already_collected">Already collected</string>
|
||||||
<string name="image_quality_selection" >Image quality selection</string>
|
<string name="image_quality_selection">Image quality selection</string>
|
||||||
<string name="more_settings" >More Settings</string>
|
<string name="more_settings">More Settings</string>
|
||||||
<string name="moer">view more</string>
|
<string name="moer">view more</string>
|
||||||
<string name="gift_way">The gift is on the way...</string>
|
<string name="gift_way">The gift is on the way...</string>
|
||||||
<string name="start_pk">The gift is on the way</string>
|
<string name="start_pk">The gift is on the way</string>
|
||||||
@ -955,52 +955,54 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="end_pk">End \nPK</string>
|
<string name="end_pk">End \nPK</string>
|
||||||
<string name="pk_time">Time %s</string>
|
<string name="pk_time">Time %s</string>
|
||||||
|
|
||||||
<string name="random_pk_dialog_apply" >accept</string>
|
<string name="random_pk_dialog_apply">accept</string>
|
||||||
<string name="random_pk_dialog_refuse" >refuse</string>
|
<string name="random_pk_dialog_refuse">refuse</string>
|
||||||
<string name="random_pk_dialog_refuse_again" >Persist in refusing</string>
|
<string name="random_pk_dialog_refuse_again">Persist in refusing</string>
|
||||||
<string name="random_pk_dialog_title" >Random PK hint</string>
|
<string name="random_pk_dialog_title">Random PK hint</string>
|
||||||
|
|
||||||
<string name="speech_robot_setup" >Automatic speech robot setup</string>
|
<string name="speech_robot_setup">Automatic speech robot setup</string>
|
||||||
<string name="robot_switch" >Robot switch</string>
|
<string name="robot_switch">Robot switch</string>
|
||||||
<string name="robot_name_setting" >Robot name setting</string>
|
<string name="robot_name_setting">Robot name setting</string>
|
||||||
<string name="word_limit" >The word limit is 2 to 8 word</string>
|
<string name="word_limit">The word limit is 2 to 8 word</string>
|
||||||
<string name="automatic_greeting_setting" >Automatic greeting setting</string>
|
<string name="automatic_greeting_setting">Automatic greeting setting</string>
|
||||||
<string name="configured_items" >Number of configured items</string>
|
<string name="configured_items">Number of configured items</string>
|
||||||
<string name="automatic_message_sending" >Set automatic message sending</string>
|
<string name="automatic_message_sending">Set automatic message sending</string>
|
||||||
<string name="robot_go_setting" >Go to set</string>
|
<string name="robot_go_setting">Go to set</string>
|
||||||
<string name="robot_hint" >Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization.</string>
|
<string name="robot_hint">Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization.</string>
|
||||||
<string name="robot_add_content" >Add content</string>
|
<string name="robot_add_content">Add content</string>
|
||||||
<string name="robot_add_content_hint1" >At regular intervals, the robot automatically says the following sentence at random。</string>
|
<string name="robot_add_content_hint1">At regular intervals, the robot automatically says the following sentence at random。</string>
|
||||||
<string name="robot_add_content_hint2" >Fill in the content recommendation, such as: send wish list, add fan group, etc</string>
|
<string name="robot_add_content_hint2">Fill in the content recommendation, such as: send wish list, add fan group, etc</string>
|
||||||
<string name="robot_automatic_speech_interval" >Automatic speech interval (minutes)</string>
|
<string name="robot_automatic_speech_interval">Automatic speech interval (minutes)</string>
|
||||||
<string name="robot_minimum_interval" >At least once every 5 minutes</string>
|
<string name="robot_minimum_interval">At least once every 5 minutes</string>
|
||||||
<string name="robot_add_content_hint3" >When a user enters the studio, the robot will @the user and automatically</string>
|
<string name="robot_add_content_hint3">When a user enters the studio, the robot will @the user and automatically</string>
|
||||||
<string name="robot_add_content_hint4" >The following sentence is random. Set a minimum of 1 to a maximum of 20.</string>
|
<string name="robot_add_content_hint4">The following sentence is random. Set a minimum of 1 to a maximum of 20.</string>
|
||||||
<string name="robot_setup" >Robot setup</string>
|
<string name="robot_setup">Robot setup</string>
|
||||||
<string name="high_definition" >High definition</string>
|
<string name="high_definition">High definition</string>
|
||||||
<string name="standard_clear" >fluency</string>
|
<string name="standard_clear">fluency</string>
|
||||||
<string name="ultra_hd" >Ultra hd</string>
|
<string name="ultra_hd">Ultra hd</string>
|
||||||
<string name="clarity_hint" >After determining the definition of the broadcast, you need to restart the broadcast to change</string>
|
<string name="clarity_hint">After determining the definition of the broadcast, you need to restart the broadcast to change</string>
|
||||||
<string name="confirmation_of_broadcast" >Confirmation of broadcast Settings</string>
|
<string name="confirmation_of_broadcast">Confirmation of broadcast Settings</string>
|
||||||
<string name="clarity" >clarity</string>
|
<string name="clarity">clarity</string>
|
||||||
<string name="live_class1" >Live channel</string>
|
<string name="live_class1">Live channel</string>
|
||||||
<string name="broadcast" >broadcast</string>
|
<string name="broadcast">broadcast</string>
|
||||||
<string name="robot" >robot</string>
|
<string name="robot">robot</string>
|
||||||
<string name="do_set" >set</string>
|
<string name="do_set">set</string>
|
||||||
<string name="not_set" >Not set</string>
|
<string name="not_set">Not set</string>
|
||||||
<string name="robot_no" >no</string>
|
<string name="robot_no">no</string>
|
||||||
<string name="robot_yes" >yes</string>
|
<string name="robot_yes">yes</string>
|
||||||
<string name="ultra_hd_hint" >Ultra HD hint</string>
|
<string name="ultra_hd_hint">Ultra HD hint</string>
|
||||||
<string name="ultra_hd_hint2" >In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection?</string>
|
<string name="ultra_hd_hint2">In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection?</string>
|
||||||
<string name="stick_to_choice" >Stick to choice</string>
|
<string name="stick_to_choice">Stick to choice</string>
|
||||||
<string name="net_hint" >Network prompt</string>
|
<string name="net_hint">Network prompt</string>
|
||||||
<string name="net_hint2" >The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity.</string>
|
<string name="net_hint2">The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity.</string>
|
||||||
<string name="check_the_new_version" >check version</string>
|
<string name="check_the_new_version">check version</string>
|
||||||
<string name="discover_a_new_version" >Update</string>
|
<string name="discover_a_new_version">Update</string>
|
||||||
<string name="latest_version" >Latest Version</string>
|
<string name="latest_version">Latest Version</string>
|
||||||
<string name="updating" >updating</string>
|
<string name="updating">updating</string>
|
||||||
<string name="live_user_ban_fhd" >There is no choice, the anchor is not turned on FHD live.</string>
|
<string name="live_user_ban_fhd">There is no choice, the anchor is not turned on FHD live.</string>
|
||||||
<string name="live_user_ban_hd" >There is no choice, the anchor is not turned on HD live.</string>
|
<string name="live_user_ban_hd">There is no choice, the anchor is not turned on HD live.</string>
|
||||||
<string name="function_is_suspended" >Sorry, this feature is on hold.</string>
|
<string name="function_is_suspended">Sorry, this feature is on hold.</string>
|
||||||
<string name="phone_number" >phone</string>
|
<string name="phone_number">phone</string>
|
||||||
|
<string name="broadcast_data">Broadcast</string>
|
||||||
|
<string name="click_to_view">Click To View</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -785,6 +785,7 @@
|
|||||||
<string name="encourage_list_nodata">暫時還沒有人給予作者鼓勵T_T</string>
|
<string name="encourage_list_nodata">暫時還沒有人給予作者鼓勵T_T</string>
|
||||||
<string name="click_moer">點擊查看更多</string>
|
<string name="click_moer">點擊查看更多</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="customer_service">客服</string>
|
<string name="customer_service">客服</string>
|
||||||
<string name="set_up">設定</string>
|
<string name="set_up">設定</string>
|
||||||
<string name="kefu_time">每日13:00PM-1:00AM</string>
|
<string name="kefu_time">每日13:00PM-1:00AM</string>
|
||||||
@ -1023,4 +1024,6 @@
|
|||||||
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
||||||
<string name="function_is_suspended" >抱歉,該功能暫停使用中。</string>
|
<string name="function_is_suspended" >抱歉,該功能暫停使用中。</string>
|
||||||
<string name="phone_number" >手機號</string>
|
<string name="phone_number" >手機號</string>
|
||||||
|
<string name="broadcast_data" >開播數據</string>
|
||||||
|
<string name="click_to_view">點擊查看</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
import static com.yunbao.common.Constants.*;
|
import static com.yunbao.common.Constants.LIVE_FUNC_BEAUTY;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_CAMERA;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_DR;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_LINK_MIC;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_MIC;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_RANDOM_PK;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_WISHLIST;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_WKS;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_ZG;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_FUNC_ZSLK;
|
||||||
|
import static com.yunbao.common.Constants.LIVE_ROBOT;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@ -10,10 +20,11 @@ import android.view.WindowManager;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.LiveAnchorMessageCustomPopup;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.interfaces.LiveFunctionClickListener;
|
import com.yunbao.live.interfaces.LiveFunctionClickListener;
|
||||||
@ -92,6 +103,8 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
mMultiPkView.setOnClickListener(this);
|
mMultiPkView.setOnClickListener(this);
|
||||||
mMicView.setOnClickListener(this);
|
mMicView.setOnClickListener(this);
|
||||||
mRandomPk.setOnClickListener(this);
|
mRandomPk.setOnClickListener(this);
|
||||||
|
findViewById(R.id.message_linear).setOnClickListener(this);
|
||||||
|
|
||||||
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
findViewById(R.id.live_tool_robot).setOnClickListener(this);
|
||||||
|
|
||||||
if (leave == 0) {
|
if (leave == 0) {
|
||||||
@ -146,9 +159,14 @@ public class LiveNewFunctionDialogFragment extends AbsDialogFragment implements
|
|||||||
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
|
mFunctionClickListener.onClick(LIVE_FUNC_MIC);
|
||||||
} else if (id == R.id.live_tool_random_pk) {
|
} else if (id == R.id.live_tool_random_pk) {
|
||||||
mFunctionClickListener.onClick(LIVE_FUNC_RANDOM_PK);
|
mFunctionClickListener.onClick(LIVE_FUNC_RANDOM_PK);
|
||||||
}else if (id==R.id.live_tool_robot){
|
} else if (id == R.id.live_tool_robot) {
|
||||||
mFunctionClickListener.onClick(LIVE_ROBOT);
|
mFunctionClickListener.onClick(LIVE_ROBOT);
|
||||||
dismiss();
|
dismiss();
|
||||||
|
} else if (id == R.id.message_linear) {
|
||||||
|
new XPopup.Builder(getContext())
|
||||||
|
.asCustom(new LiveAnchorMessageCustomPopup(getContext()))
|
||||||
|
.show();
|
||||||
|
dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user