优化细节
This commit is contained in:
@@ -70,26 +70,21 @@ public interface ApiService {
|
||||
@GET("/api/home/index/today-matches")
|
||||
Observable<Result<List<TodayMatchesBean>>> todayMatches(@Query("pageSize") int pageSize);
|
||||
|
||||
|
||||
@GET("/api/home/index/advertisement")
|
||||
Observable<Result<List<AdvertisementBean>>> advertisement();
|
||||
|
||||
@GET("/api/home/index/hot-anchors")
|
||||
Observable<Result<List<RecommendUserBean>>> hotAnchors();
|
||||
|
||||
|
||||
@GET("/api/home/index/match/category")
|
||||
Observable<Result<List<CategoryBean>>> category(@Query("dictTypeFromFront") String dictTypeFromFront, @Query("pageSize") int pageSize);
|
||||
|
||||
|
||||
@GET("/api/live/assetVideos/homePagelist")
|
||||
Observable<Result<List<HomePagelistBean>>> homePagelist(@Query("pageNum") int pageNum, @Query("pageSize") int pageSize);
|
||||
|
||||
|
||||
@GET("/api/live/matches/batch")
|
||||
Observable<Result<List<TodayMatchesBean>>> matchesBatch(@Query("date") long date, @Query("typeEnName") String typeEnName, @Query("matchType") String matchType);
|
||||
|
||||
|
||||
@GET("/api/captchaImage")
|
||||
Observable<Result> captchaImage();
|
||||
|
||||
@@ -101,27 +96,19 @@ public interface ApiService {
|
||||
|
||||
@POST("/api/reset/sendSmsCode")
|
||||
Observable<Result<SendSmsCodeBean>> sendSmsCode(@Body Map<String, Object> requestBody);
|
||||
//{"phone":"601999999999","phonenumber":"601999999999","lang":"zh","code":"ae3a","uuid":"d6bb6813124d43e6991bfc0f8aa7a916"}
|
||||
|
||||
|
||||
@POST("/api/register")
|
||||
Observable<Result> register(@Body Map<String, Object> requestBody);
|
||||
//{"username":"fdgdsfgds","nickname":"gggg","password":"11111111","phonenumber":"601999999999","region":"60","code":"111111","uuid":"ff05ff27-392d-43a2-970d-e6e6f9c70511"}
|
||||
|
||||
@POST("/api/login")
|
||||
Observable<Result> login(@Body Map<String, Object> requestBody);
|
||||
//{"uuid":"55624290682b4d77915b92935d6cbbd7","username":"woshimingzi","password":"juelie88","code":"n588"}
|
||||
|
||||
@POST("/api/phoneLogin")
|
||||
Observable<Result> phoneLogin(@Body Map<String, Object> requestBody);
|
||||
|
||||
// {"phone":"601897513909","region":"60","code":"639875","uuid":"985f4cb9-a2be-4d4d-afc5-5fbfb1e1c6df"}
|
||||
|
||||
|
||||
@GET("/api/getInfo")
|
||||
Observable<Result<Boolean>> getInfo();
|
||||
|
||||
|
||||
@Multipart
|
||||
@POST("/api/system/user/profile/avatar")
|
||||
Observable<Result> profileAvatar(@Part MultipartBody.Part serialNumber);
|
||||
@@ -129,44 +116,37 @@ public interface ApiService {
|
||||
@GET("/api/system/user/profile")
|
||||
Observable<Result<UserBean>> userProfile();
|
||||
|
||||
|
||||
@PUT("/api/system/user/profile")
|
||||
Observable<Result<UserBean>> putUserProfile(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
@POST("/api/reset/sendSmsCode2")
|
||||
Observable<Result<SendSmsCodeBean>> sendSmsCode2(@Body Map<String, Object> requestBody);
|
||||
//{"phone":"601897513909"}
|
||||
|
||||
|
||||
@POST("/api/reset/PasswordBySms")
|
||||
Observable<Result> PasswordBySms(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
@PUT("/api/system/user/profile/update/phone")
|
||||
Observable<Result<Integer>> updatePhone(@Body Map<String, Object> requestBody);
|
||||
//{"phonenumber":"601890000000","code":"639877","uuid":"376ae321-732f-42be-8573-e201685e8c99","region":"60"}
|
||||
|
||||
@GET("/api/home/index/notice-page")
|
||||
Observable<Result<List<NoticeBean>>> noticeByType(@Query("type") String type,@Query("pageNum") int pageNum,@Query("pageSize") int pageSize);
|
||||
|
||||
@GET("/api/home/index/notice-page")
|
||||
Observable<Result<List<NoticeBean>>> noticeByType(@Query("pageNum") int pageNum,@Query("pageSize") int pageSize);
|
||||
|
||||
@GET("/api/home/index/notice")
|
||||
Observable<Result<List<NoticeBean>>> notice(@Query("type") String type);
|
||||
|
||||
|
||||
Observable<Result<List<NoticeBean>>> notice();
|
||||
@GET("/api/live/tv/geth5link")
|
||||
Observable<Result<Geth5linkBeran>> geth5link(@Query("fs") String fs, @Query("matchid") String matchid, @Query("lang") String lang);
|
||||
|
||||
|
||||
@GET("/api/home/chat/history")
|
||||
Observable<Result<List<ChatMessageBean>>> chatHistory(@Query("roomId") String roomId);
|
||||
|
||||
@GET("/api/home/index/type-lives-anchor")
|
||||
Observable<Result<List<TodayMatchesBean1>>> typeLivesAnchor(@Query("dto") String dto, @Query("type") String type);
|
||||
|
||||
|
||||
|
||||
|
||||
@POST("/api/live/follow/follow")
|
||||
Observable<Result> follow(@Body Map<String, Object> requestBody);
|
||||
// {anchormanId: 230, fansId: 276, isFollow: 1}
|
||||
|
||||
@GET("/api/live/follow/list")
|
||||
Observable<Result<List<FollowListBean>>> followList(@Query("anchormanId") int anchormanId, @Query("fansId") int fansId, @Query("isFollow") int isFollow);
|
||||
@@ -174,8 +154,6 @@ public interface ApiService {
|
||||
@GET("/api/live/follow/list")
|
||||
Observable<Result<List<FollowListBean>>> followMeList(@Query("anchormanId") int anchormanId,@Query("isFollow") int isFollow,@Query("pageNumber") int pageNumber,@Query("pageSize") int pageSize);
|
||||
|
||||
|
||||
|
||||
@GET("/api/live/follow/list")
|
||||
Observable<Result<List<FollowListBean>>> meFollowList(@Query("fansId") int fansId,@Query("isFollow") int isFollow,@Query("pageNumber") int pageNumber,@Query("pageSize") int pageSize);
|
||||
|
||||
@@ -185,35 +163,25 @@ public interface ApiService {
|
||||
@DELETE("/api/live/reminder/cancel/{liveId}")
|
||||
Observable<Result<List<FollowListBean>>> reminderCancel(@Path("liveId") int liveId);
|
||||
|
||||
|
||||
@GET("/api/live/reminder/mine")
|
||||
Observable<Result<List<ReminderBean>>> reminderMine();
|
||||
|
||||
@GET("/api/home/index/list/pin")
|
||||
Observable<Result<List<PinBean>>> pin();
|
||||
|
||||
|
||||
|
||||
@GET("/api/live/anchor_info/{userId}")
|
||||
Observable<Result<RecommendUserBean>> anchorInfo(@Path("userId") String userId);
|
||||
|
||||
@PUT("/api/live/anchor_info")
|
||||
Observable<Result> chagneInfo(@Body RecommendUserBean recommendUserBean);
|
||||
|
||||
|
||||
|
||||
@POST("/api/live/anchor_info")
|
||||
Observable<Result> anchorInfo(@Body RecommendUserBean recommendUserBean);
|
||||
|
||||
|
||||
|
||||
@Multipart
|
||||
@POST("/api/common/niuqi/uploadImg")
|
||||
Observable<Result<String>> uploadImg(@Part MultipartBody.Part serialNumber);
|
||||
|
||||
|
||||
|
||||
|
||||
@GET("/api/live/code/streamCode")
|
||||
Observable<Result<StreamCodeBean>> streamCode();
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.xyz.babelive.bean;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.xyz.babelive.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
@@ -11,9 +15,9 @@ package com.xyz.babelive.bean;
|
||||
public class NoticeBean {
|
||||
|
||||
private String createBy;
|
||||
private String createTime;
|
||||
private Long createTime;
|
||||
private String updateBy;
|
||||
private String updateTime;
|
||||
private Long updateTime;
|
||||
private String remark;
|
||||
private int noticeId;
|
||||
private String noticeTitle;
|
||||
@@ -30,11 +34,11 @@ public class NoticeBean {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
public Long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@@ -46,11 +50,11 @@ public class NoticeBean {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
public Long getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
public void setUpdateTime(Long updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
@@ -98,6 +102,28 @@ public class NoticeBean {
|
||||
return publishTime;
|
||||
}
|
||||
|
||||
|
||||
public String getShowTime() {
|
||||
if(updateTime!=null){
|
||||
return StringUtils.stringLauchDay1(updateTime);
|
||||
}
|
||||
if(createTime!=null){
|
||||
return StringUtils.stringLauchDay1(createTime);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
public Long getShowTimeLong() {
|
||||
if(updateTime!=null){
|
||||
return updateTime;
|
||||
}
|
||||
if(createTime!=null){
|
||||
return createTime;
|
||||
}
|
||||
return 0l;
|
||||
}
|
||||
|
||||
public void setPublishTime(String publishTime) {
|
||||
this.publishTime = publishTime;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ public class GameAliPortraitActivity extends BaseActivity<MainViewModel, Activit
|
||||
|
||||
geth5linkBeran = new Geth5linkBeran();
|
||||
geth5linkBeran.setH5LINKROW(ApiService.LivePLayerStartUrl + todayMatchesBean.getCode());
|
||||
if (todayMatchesBean.isIsLiving()) {
|
||||
// if (todayMatchesBean.isIsLiving()) {
|
||||
// dataBinding.actionV.backButton.setVisibility(View.INVISIBLE);
|
||||
// dataBinding.fullIv.setVisibility(View.GONE);
|
||||
initPlayerBody();
|
||||
@@ -357,10 +357,10 @@ public class GameAliPortraitActivity extends BaseActivity<MainViewModel, Activit
|
||||
|
||||
viewModel.pin();
|
||||
|
||||
}else{
|
||||
// }else{
|
||||
// dataBinding.xiaboLy.setVisibility(View.VISIBLE);
|
||||
viewModel.typeLivesAnchorByLive("");
|
||||
}
|
||||
// viewModel.typeLivesAnchorByLive("");
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -566,7 +566,7 @@ public class GameAliPortraitActivity extends BaseActivity<MainViewModel, Activit
|
||||
private void toSend() {
|
||||
HideKeyboard(dataBinding.messageEt);
|
||||
hideSoftInput();
|
||||
if (todayMatchesBean.isIsLiving()) {
|
||||
// if (todayMatchesBean.isIsLiving()) {
|
||||
|
||||
try {
|
||||
userBean = InitApp.getUserBean();
|
||||
@@ -601,7 +601,7 @@ public class GameAliPortraitActivity extends BaseActivity<MainViewModel, Activit
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.PermissionChecker;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
@@ -30,15 +31,19 @@ import com.azhon.basic.base.BaseActivity;
|
||||
import com.hjq.permissions.Permission;
|
||||
import com.xyz.babelive.InitApp;
|
||||
import com.xyz.babelive.R;
|
||||
import com.xyz.babelive.bean.NoticeBean;
|
||||
import com.xyz.babelive.databinding.ActivityMainBinding;
|
||||
import com.xyz.babelive.ui.activity.live.LiveActivity;
|
||||
import com.xyz.babelive.ui.activity.user.AccountActivity;
|
||||
import com.xyz.babelive.ui.dialog.ActivityDialog;
|
||||
import com.xyz.babelive.ui.fragment.home.HomeFragment;
|
||||
import com.xyz.babelive.ui.fragment.live.LiveFragment;
|
||||
import com.xyz.babelive.ui.fragment.match.MatchFragment;
|
||||
import com.xyz.babelive.utils.DeviceUtil;
|
||||
import com.xyz.babelive.utils.GsonUtils;
|
||||
import com.xyz.babelive.utils.HasPermissions;
|
||||
import com.xyz.babelive.utils.LogUtils;
|
||||
import com.xyz.babelive.utils.StringUtils;
|
||||
import com.xyz.babelive.viewModel.home.MainViewModel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -79,6 +84,32 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMainBindin
|
||||
// startActivity(new Intent(this, LiveActivity.class));
|
||||
|
||||
getUserInfo();
|
||||
|
||||
|
||||
viewModel.getNoticeListMutableLiveData().observe(this, noticeBeans -> {
|
||||
if (noticeBeans != null && noticeBeans.size() > 0) {
|
||||
if(noticeBeans.get(0).getShowTimeLong()>InitApp.getLong("noti_time",0l)){
|
||||
dataBinding.messageDot.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
dataBinding.messageDot.setVisibility(View.GONE);
|
||||
}
|
||||
}else{
|
||||
dataBinding.messageDot.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
viewModel.noticeActivity();
|
||||
viewModel.getNoticeActivityMutableLiveData().observe(this, noticeBean -> {
|
||||
if(noticeBean!=null){
|
||||
//活动弹窗 每天只弹一次
|
||||
LogUtils.i("活动是啥:"+ GsonUtils.beanToJSONString(noticeBean));
|
||||
if(!InitApp.getBoolean(StringUtils.getFileNameByDaya(System.currentTimeMillis())+"act",false)){
|
||||
new ActivityDialog(MainActivity.this,noticeBean).show();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +127,7 @@ public class MainActivity extends BaseActivity<MainViewModel, ActivityMainBindin
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
changeTopBan();
|
||||
viewModel.noticeByList(1, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.azhon.basic.base.BaseActivity;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.xyz.babelive.InitApp;
|
||||
import com.xyz.babelive.R;
|
||||
import com.xyz.babelive.adapter.comm.CommonAdapter;
|
||||
import com.xyz.babelive.adapter.comm.ViewHolder;
|
||||
@@ -22,6 +23,8 @@ import com.xyz.babelive.ui.activity.user.ChangeBindPhoneActivity;
|
||||
import com.xyz.babelive.ui.activity.user.ChangePasswordActivity;
|
||||
import com.xyz.babelive.ui.activity.user.H5WebActivity;
|
||||
import com.xyz.babelive.ui.view.CircleImageView;
|
||||
import com.xyz.babelive.utils.GsonUtils;
|
||||
import com.xyz.babelive.utils.LogUtils;
|
||||
import com.xyz.babelive.utils.StringUtils;
|
||||
import com.xyz.babelive.viewModel.home.MainViewModel;
|
||||
|
||||
@@ -30,12 +33,15 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 主页
|
||||
* @author
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
public class NoticeActivity extends BaseActivity<MainViewModel, ActivityNoticeBinding> {
|
||||
CommonAdapter commonHotLiveAdapter;
|
||||
List<NoticeBean> liveList = new ArrayList<>();
|
||||
|
||||
int page = 1;
|
||||
int pageSize = 20;
|
||||
long oldTime;
|
||||
@Override
|
||||
protected int initLayout() {
|
||||
return R.layout.activity_notice;
|
||||
@@ -47,22 +53,52 @@ public class NoticeActivity extends BaseActivity<MainViewModel, ActivityNoticeBi
|
||||
dataBinding.actionV.titleTv.setText(getString(R.string.system_announcement));
|
||||
dataBinding.actionV.backButton.setOnClickListener(v -> finish());
|
||||
initHotGame();
|
||||
viewModel.notice();
|
||||
viewModel.noticeByList(page, pageSize);
|
||||
|
||||
viewModel.getNoticeListMutableLiveData().observe(this, noticeBeans -> {
|
||||
if(noticeBeans!=null&¬iceBeans.size()>0){
|
||||
liveList = noticeBeans;
|
||||
commonHotLiveAdapter.setDates(liveList);
|
||||
dataBinding.recyclerview.setVisibility(View.VISIBLE);
|
||||
dataBinding.nodateLy.setVisibility(View.GONE);
|
||||
}else{
|
||||
dataBinding.recyclerview.setVisibility(View.GONE);
|
||||
dataBinding.nodateLy.setVisibility(View.VISIBLE);
|
||||
if (noticeBeans != null && noticeBeans.size() > 0) {
|
||||
if (page == 1) {
|
||||
liveList = noticeBeans;
|
||||
commonHotLiveAdapter.setDates(liveList);
|
||||
} else {
|
||||
liveList.addAll(noticeBeans);
|
||||
commonHotLiveAdapter.setDates(liveList);
|
||||
}
|
||||
}
|
||||
dataBinding.refreshLayout.finishRefresh();
|
||||
dataBinding.refreshLayout.finishLoadMore();
|
||||
if (liveList != null && liveList.size() % pageSize != 0) {
|
||||
dataBinding.refreshLayout.finishRefreshWithNoMoreData();
|
||||
}
|
||||
showErrors();
|
||||
});
|
||||
initRefreshLayout();
|
||||
oldTime = InitApp.getLong("noti_time",0);
|
||||
InitApp.saveLong("noti_time",System.currentTimeMillis());
|
||||
}
|
||||
|
||||
private void showErrors() {
|
||||
if (liveList != null && liveList.size() > 0) {
|
||||
dataBinding.recyclerview.setVisibility(View.VISIBLE);
|
||||
dataBinding.nodateLy.setVisibility(View.GONE);
|
||||
} else {
|
||||
dataBinding.recyclerview.setVisibility(View.GONE);
|
||||
dataBinding.nodateLy.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void initRefreshLayout() {
|
||||
dataBinding.refreshLayout.setOnRefreshListener(refreshlayout -> {
|
||||
page = 1;
|
||||
viewModel.noticeByList(page, pageSize);
|
||||
});
|
||||
dataBinding.refreshLayout.setOnLoadMoreListener(refreshLayout -> {
|
||||
page += 1;
|
||||
viewModel.noticeByList(page, pageSize);
|
||||
});
|
||||
}
|
||||
|
||||
private void initHotGame() {
|
||||
|
||||
@@ -71,12 +107,19 @@ public class NoticeActivity extends BaseActivity<MainViewModel, ActivityNoticeBi
|
||||
commonHotLiveAdapter = new CommonAdapter<NoticeBean>(NoticeActivity.this, R.layout.notice_item_child, liveList) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, NoticeBean s, int index) {
|
||||
holder.setText(R.id.title_tv,s.getNoticeTitle());
|
||||
holder.setText(R.id.title_tv, s.getNoticeTitle());
|
||||
TextView textView = holder.getView(R.id.des_tv);
|
||||
textView.setText(Html.fromHtml(s.getNoticeContent()));
|
||||
holder.setText(R.id.time_tv,s.getPublishTime()+"");
|
||||
holder.getView(R.id.main_content1).setOnClickListener(v -> NoticeInfoActivity.startH5WebActivityWhitBody(NoticeActivity.this,s.getNoticeTitle(),s.getNoticeContent()));
|
||||
|
||||
holder.setText(R.id.time_tv, s.getShowTime() + "");
|
||||
holder.getView(R.id.main_content1).setOnClickListener(v -> NoticeInfoActivity.startH5WebActivityWhitBody(NoticeActivity.this, s.getNoticeTitle(), s.getNoticeContent()));
|
||||
if(oldTime<s.getShowTimeLong()){
|
||||
holder.getView(R.id.message_dot).setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
holder.getView(R.id.message_dot).setVisibility(View.GONE);
|
||||
}
|
||||
if(index == liveList.size()-1){
|
||||
LogUtils.i("消息是啥:"+ GsonUtils.beanToJSONString(s.getNoticeContent()));
|
||||
}
|
||||
}
|
||||
};
|
||||
dataBinding.recyclerview.setAdapter(commonHotLiveAdapter);
|
||||
@@ -89,7 +132,6 @@ public class NoticeActivity extends BaseActivity<MainViewModel, ActivityNoticeBi
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
dataBinding.setModel(viewModel);
|
||||
|
||||
@@ -115,6 +115,17 @@ public class NoticeInfoActivity extends BaseActivity<MainViewModel, ActivityNoti
|
||||
}
|
||||
|
||||
|
||||
private void upsetImage() {
|
||||
dataBinding.webview.loadUrl("javascript:(function(){" +
|
||||
"var objs = document.getElementsByTagName('img'); " +
|
||||
"for(var i=0;i<objs.length;i++) " +
|
||||
"{"
|
||||
+ "var img = objs[i]; " +
|
||||
" img.style.maxWidth = '100%'; img.style.height = 'auto'; " +
|
||||
"}" +
|
||||
"})()");
|
||||
|
||||
}
|
||||
public String gethtmlConentDrak(String body){
|
||||
String content = "<!DOCTYPE html>" +
|
||||
"<html>" +
|
||||
@@ -180,7 +191,9 @@ public class NoticeInfoActivity extends BaseActivity<MainViewModel, ActivityNoti
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
// 重新测量
|
||||
view.measure(w, h);
|
||||
|
||||
dataBinding.ryV.setVisibility(View.GONE);
|
||||
dataBinding.webview.setVisibility(View.VISIBLE);
|
||||
upsetImage();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -94,8 +94,7 @@ import java.util.List;
|
||||
*/
|
||||
public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBinding> {
|
||||
UserBean userBean;
|
||||
// String mPushUrl = "rtmp://stream.bab3live.com/live/channel_230?auth_key=1770023776404-0-0-8d821d2aca1951bdc97840a9c6c34dd0";
|
||||
String mPushUrl = "rrtmp://live2.bab3live.com/live/%s?auth_key=%s";
|
||||
String mPushUrl = "";
|
||||
String mPushUrlType = "rtmp://stream.bab3live.com/live/%s";
|
||||
|
||||
List<CategoryBean> categoryBeans = new ArrayList<>();
|
||||
@@ -224,7 +223,6 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
.isEnableCrop(true)
|
||||
.withAspectRatio(345,196)
|
||||
.hideBottomControls(true)
|
||||
// .rotateEnabled(true) // 裁剪是否可旋转图片
|
||||
.scaleEnabled(true)// 裁剪是否可放大缩小图片
|
||||
.imageEngine(new GlideImageEngine())
|
||||
.selectionMode(PictureConfig.SINGLE)
|
||||
@@ -232,18 +230,6 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
}
|
||||
});
|
||||
|
||||
//
|
||||
// viewModel.getUploadFilePathMutableLiveData().observe(this, new Observer<Result>() {
|
||||
// @Override
|
||||
// public void onChanged(Result result) {
|
||||
// dismissDialog();
|
||||
// if (result != null) {
|
||||
// ToastUtils.showShort(getString(R.string.upload_success_tip));
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
viewModel.getStreamCodeBeanMutableLiveData().observe(this, new Observer<StreamCodeBean>() {
|
||||
@Override
|
||||
public void onChanged(StreamCodeBean streamCodeBean) {
|
||||
@@ -255,7 +241,6 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void changeAnchorInfo() {
|
||||
@@ -356,15 +341,6 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
|
||||
|
||||
private void toLive() {
|
||||
// if (FastClickUtil.isProcessing()) {
|
||||
// return;
|
||||
// }
|
||||
// Intent intent = new Intent(LiveActivity.this, PushConfigActivity.class);
|
||||
// if (!TextUtils.isEmpty(mPushUrl)) {
|
||||
// intent.putExtra("pushUrl", mPushUrl);
|
||||
// }
|
||||
// startActivity(intent);
|
||||
// finish();
|
||||
|
||||
if (FastClickUtil.isProcessing()) {
|
||||
return;
|
||||
@@ -388,32 +364,8 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
|
||||
private void checkModelAndRun(final Runnable runnable) {
|
||||
runnable.run();
|
||||
// BeautyMenuMaterial.getInstance().checkModelReady(this, new OnDownloadUICallback() {
|
||||
// @Override
|
||||
// public void onDownloadStart(@StringRes int tipsResId) {
|
||||
// showProgressDialog(tipsResId);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onDownloadProgress(final float v) {
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onDownloadSuccess() {
|
||||
// hideProgressDialog();
|
||||
// runnable.run();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onDownloadError(@StringRes int tipsResId) {
|
||||
// hideProgressDialog();
|
||||
// showErrorTips(tipsResId);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private AlivcResolutionEnum mDefinition = AlivcResolutionEnum.RESOLUTION_540P;
|
||||
|
||||
private AlivcLivePushConfig mAlivcLivePushConfig;
|
||||
|
||||
private AlivcLivePushConfig getPushConfig() {
|
||||
@@ -432,7 +384,6 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
mAlivcLivePushConfig.setEnableRemoteVideoFrameCallback(false);
|
||||
mAlivcLivePushConfig.setEnableVideoCodecDowngrade(true);
|
||||
mAlivcLivePushConfig.setExternMainStream(false);
|
||||
// mAlivcLivePushConfig.setExtras":{},
|
||||
mAlivcLivePushConfig.setH5CompatibleMode(false);
|
||||
mAlivcLivePushConfig.setAlivcExternMainImageFormat(AlivcImageFormat.IMAGE_FORMAT_YUV420P);
|
||||
mAlivcLivePushConfig.setAlivcExternMainSoundFormat(AlivcSoundFormat.SOUND_FORMAT_S16);
|
||||
@@ -449,13 +400,11 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
mAlivcLivePushConfig.setConnectRetryCount(5);
|
||||
mAlivcLivePushConfig.setConnectRetryInterval(1000);
|
||||
mAlivcLivePushConfig.setExposure(0);
|
||||
// mAlivcLivePushConfig.setMExtras":{},
|
||||
mAlivcLivePushConfig.setFlash(false);
|
||||
mAlivcLivePushConfig.setFocusBySensor(false);
|
||||
mAlivcLivePushConfig.setFps(AlivcFpsEnum.FPS_20);
|
||||
mAlivcLivePushConfig.setInitialVideoBitrate(800);
|
||||
mAlivcLivePushConfig.setLivePushMode(AlivcLiveMode.AlivcLiveBasicMode);
|
||||
// mAlivcLivePushConfig.setMaxTimeoutCount(DEFAULT_MAX_TIMEOUT_COUNT);
|
||||
mAlivcLivePushConfig.setMinVideoBitrate(200);
|
||||
mAlivcLivePushConfig.setNetworkPoorPushImage("/data/user/0/com.xyz.babelive/files/alivc_resource/poor_network.png");
|
||||
mAlivcLivePushConfig.setPausePushImage("/data/user/0/com.xyz.babelive/files/alivc_resource/background_push.png");
|
||||
@@ -463,7 +412,6 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
mAlivcLivePushConfig.setPreviewMirror(false);
|
||||
mAlivcLivePushConfig.setPreviewOrientation(AlivcPreviewOrientationEnum.ORIENTATION_PORTRAIT);
|
||||
mAlivcLivePushConfig.setPreviewRotation(AlivcPreviewRotationEnum.ROTATION_0);
|
||||
// mAlivcLivePushConfig.setPtsMaxDiff(300);
|
||||
mAlivcLivePushConfig.setPushMirror(false);
|
||||
mAlivcLivePushConfig.setResolution(AlivcResolutionEnum.RESOLUTION_540P);
|
||||
mAlivcLivePushConfig.setTargetVideoBitrate(800);
|
||||
@@ -485,29 +433,8 @@ public class LiveActivity extends BaseActivity<MainViewModel, ActivityLiveBindin
|
||||
alivcLivePushVideoConfig.resolution = AlivcResolutionEnum.RESOLUTION_540P;
|
||||
alivcLivePushVideoConfig.targetBitrate = 800;
|
||||
mAlivcLivePushConfig.setVideoConfig(alivcLivePushVideoConfig);
|
||||
|
||||
|
||||
// mAlivcLivePushConfig.setResolution(mDefinition);
|
||||
// mAlivcLivePushConfig.setInitialVideoBitrate(Integer.parseInt(mLivePushSettingView.getInitVideoBitrate()));
|
||||
// mAlivcLivePushConfig.setAudioBitRate(1000 * Integer.parseInt(mLivePushSettingView.getAudioBitrate()));
|
||||
|
||||
// mAlivcLivePushConfig.setMinVideoBitrate(Integer.parseInt(mLivePushSettingView.getMinVideoBitrate()));
|
||||
SharedPreferenceUtils.setMinBit(LiveActivity.this, 200);
|
||||
|
||||
// mAlivcLivePushConfig.setTargetVideoBitrate(Integer.parseInt(mLivePushSettingView.getTargetVideoBitrate()));
|
||||
SharedPreferenceUtils.setTargetBit(getApplicationContext(), 800);
|
||||
|
||||
// mAlivcLivePushConfig.setConnectRetryCount(mLivePushSettingView.getRetryCount());
|
||||
// mAlivcLivePushConfig.setConnectRetryInterval(mLivePushSettingView.getRetryInterval());
|
||||
//
|
||||
// mAuthTimeStr = mLivePushSettingView.getAuthTime();
|
||||
// mPrivacyKeyStr = mLivePushSettingView.getPrivacyKey();
|
||||
// Uri uri = Uri.parse(mUrl.getText().toString().trim());
|
||||
// String keys = uri.getQueryParameter("auth_key");
|
||||
// mPrivacyKeyStr =keys;
|
||||
// Log.i("BIKAOVIDEO","BIKAOVIDEO:"+mPrivacyKeyStr);
|
||||
|
||||
|
||||
return mAlivcLivePushConfig;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,12 +62,6 @@ public class FollowListActivity extends BaseActivity<MainViewModel, ActivityFoll
|
||||
}else{
|
||||
liveList.addAll(noticeBeans);
|
||||
}
|
||||
dataBinding.recyclerview.setVisibility(View.VISIBLE);
|
||||
dataBinding.nodateLy.setVisibility(View.GONE);
|
||||
|
||||
}else{
|
||||
dataBinding.recyclerview.setVisibility(View.GONE);
|
||||
dataBinding.nodateLy.setVisibility(View.VISIBLE);
|
||||
}
|
||||
dataBinding.refreshLayout.finishRefresh();
|
||||
dataBinding.refreshLayout.finishLoadMore();
|
||||
|
||||
262
app/src/main/java/com/xyz/babelive/ui/dialog/ActivityDialog.java
Normal file
262
app/src/main/java/com/xyz/babelive/ui/dialog/ActivityDialog.java
Normal file
@@ -0,0 +1,262 @@
|
||||
package com.xyz.babelive.ui.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.webkit.GeolocationPermissions;
|
||||
import android.webkit.JavascriptInterface;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.azhon.basic.base.BaseActivity;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.xyz.babelive.InitApp;
|
||||
import com.xyz.babelive.R;
|
||||
import com.xyz.babelive.bean.NoticeBean;
|
||||
import com.xyz.babelive.bean.TodayMatchesBean;
|
||||
import com.xyz.babelive.bean.UserBean;
|
||||
import com.xyz.babelive.databinding.DialogActivityBinding;
|
||||
import com.xyz.babelive.databinding.DialogAnchorBinding;
|
||||
import com.xyz.babelive.ui.activity.NoticeInfoActivity;
|
||||
import com.xyz.babelive.ui.activity.user.LoginActivity;
|
||||
import com.xyz.babelive.utils.LogUtils;
|
||||
import com.xyz.babelive.utils.StringUtils;
|
||||
import com.xyz.babelive.viewModel.home.MainViewModel;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ActivityDialog extends Dialog {
|
||||
NoticeBean todayMatchesBean;
|
||||
DialogActivityBinding dataBinding;
|
||||
Window window;
|
||||
public ActivityDialog(Context context, NoticeBean todayMatchesBean) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
this.todayMatchesBean = todayMatchesBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
dataBinding = DialogActivityBinding.inflate(LayoutInflater.from(getContext()));
|
||||
setContentView(dataBinding.getRoot());
|
||||
|
||||
WebSettings mWebSettings = dataBinding.webview.getSettings();
|
||||
mWebSettings.setSupportZoom(true);
|
||||
mWebSettings.setLoadWithOverviewMode(true);
|
||||
mWebSettings.setUseWideViewPort(true);
|
||||
mWebSettings.setDefaultTextEncodingName("utf-8");
|
||||
mWebSettings.setLoadsImagesAutomatically(true);
|
||||
mWebSettings.setBuiltInZoomControls(false);
|
||||
dataBinding.webview.setVerticalScrollBarEnabled(true);
|
||||
|
||||
/** 自适应屏幕 */
|
||||
mWebSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
|
||||
/** 不使用缓存: */
|
||||
mWebSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
|
||||
//调用JS方法.安卓版本大于17,加上注解 @JavascriptInterface
|
||||
mWebSettings.setJavaScriptEnabled(true);
|
||||
mWebSettings.setJavaScriptCanOpenWindowsAutomatically(true);//允许js弹出窗口
|
||||
mWebSettings.setAllowFileAccess(true);
|
||||
;//否允许访问文件,默认允许访问
|
||||
mWebSettings.setAllowFileAccessFromFileURLs(true);//一个文件被允许访问其他文件中的内容
|
||||
mWebSettings.setAllowUniversalAccessFromFileURLs(true);//可以是否访问任何原始起点内容
|
||||
// saveData(mWebSettings);
|
||||
// newWin(mWebSettings);
|
||||
dataBinding.webview.setWebChromeClient(webChromeClient);
|
||||
dataBinding.webview.setWebViewClient(webViewClient);
|
||||
|
||||
// dataBinding.webview.loadDataWithBaseURL(null, BaseActivity.isUIMODENIGHTNO ? gethtmlConent(todayMatchesBean.getNoticeContent()) : gethtmlConentDrak(todayMatchesBean.getNoticeContent()), "text/html", "utf-8", null);
|
||||
dataBinding.webview.loadDataWithBaseURL(null, todayMatchesBean.getNoticeContent(), "text/html", "utf-8", null);
|
||||
|
||||
|
||||
dataBinding.coloseIv.setOnClickListener(v -> dismiss());
|
||||
InitApp.saveBoolean(StringUtils.getFileNameByDaya(System.currentTimeMillis())+"act",true);
|
||||
window = getWindow();
|
||||
initWH();
|
||||
}
|
||||
|
||||
private void initWH() {
|
||||
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||
wlp.gravity = Gravity.CENTER;
|
||||
wlp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
wlp.height = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
window.setAttributes(wlp);
|
||||
}
|
||||
|
||||
public String gethtmlConent(String body){
|
||||
String content = "<!DOCTYPE html>" +
|
||||
"<html>" +
|
||||
"<head>" +
|
||||
"<meta charset=\"utf-8\">" +
|
||||
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" +
|
||||
"</head>" +
|
||||
"<body style=\"padding: 0;margin: 0; background-color: #FFFFFF;\">" +
|
||||
"<a style=\"color: #16243c;\">"+
|
||||
"<p style=\"line-height: 150%;\">"+
|
||||
body+
|
||||
"</p>"+
|
||||
"</a>"+
|
||||
"</body>" +
|
||||
"</html>";
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
public String gethtmlConentDrak(String body){
|
||||
String content = "<!DOCTYPE html>" +
|
||||
"<html>" +
|
||||
"<head>" +
|
||||
"<meta charset=\"utf-8\">" +
|
||||
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" +
|
||||
"</head>" +
|
||||
"<body style=\"padding: 0;margin: 0; background-color: #16243C;\">" +
|
||||
"<a style=\"color: #FFF;\">"+
|
||||
"<p style=\"line-height: 150%;\">"+
|
||||
body+
|
||||
"</p>"+
|
||||
"</a>"+
|
||||
"</body>" +
|
||||
"</html>";
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
public class JavaScriptinterface {
|
||||
Context context;
|
||||
|
||||
public JavaScriptinterface(Context c) {
|
||||
context = c;
|
||||
}
|
||||
|
||||
/**
|
||||
* 与js交互时用到的方法,在js里直接调用的
|
||||
*/
|
||||
@JavascriptInterface
|
||||
public void doShareCallbackAndroid(String image, String title, String desc, String url) {
|
||||
|
||||
}
|
||||
}
|
||||
WebViewClient webViewClient = new WebViewClient() {
|
||||
/**
|
||||
* 多页面在同一个WebView中打开,就是不新建activity或者调用系统浏览器打开
|
||||
*/
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageStarted(WebView view, String url, Bitmap favicon) {
|
||||
super.onPageStarted(view, url, favicon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
|
||||
int w = View.MeasureSpec.makeMeasureSpec(0,
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
int h = View.MeasureSpec.makeMeasureSpec(0,
|
||||
View.MeasureSpec.UNSPECIFIED);
|
||||
// 重新测量
|
||||
view.measure(w, h);
|
||||
// dataBinding.ryV.setVisibility(View.GONE);
|
||||
upsetImage();
|
||||
dataBinding.webview.setVisibility(View.VISIBLE);
|
||||
dataBinding.ryV.setVisibility(View.GONE);
|
||||
initWH();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
private void upsetImage() {
|
||||
dataBinding.webview.loadUrl("javascript:(function(){" +
|
||||
"var objs = document.getElementsByTagName('img'); " +
|
||||
"for(var i=0;i<objs.length;i++) " +
|
||||
"{"
|
||||
+ "var img = objs[i]; " +
|
||||
" img.style.maxWidth = '100%'; img.style.height = 'auto'; " +
|
||||
"}" +
|
||||
"})()");
|
||||
|
||||
}
|
||||
|
||||
WebChromeClient webChromeClient = new WebChromeClient() {
|
||||
//=========HTML5定位==========================================================
|
||||
@Override
|
||||
public void onReceivedIcon(WebView view, Bitmap icon) {
|
||||
super.onReceivedIcon(view, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGeolocationPermissionsHidePrompt() {
|
||||
super.onGeolocationPermissionsHidePrompt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedTitle(WebView view, String title) {
|
||||
super.onReceivedTitle(view, title);
|
||||
// 设置title
|
||||
// try {
|
||||
// dataBinding.tvTitle.setText(title);
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgressChanged(WebView view, int newProgress) {
|
||||
super.onProgressChanged(view, newProgress);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
|
||||
// CurrencyWarningDialog currencyWarningDialog=new CurrencyWarningDialog(WebViewActivity.this, WalletApplication.getAppContext().getString(R.string.tip_str),message);
|
||||
// currencyWarningDialog.show();
|
||||
// currencyWarningDialog.setCancelGONE();
|
||||
// result.cancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGeolocationPermissionsShowPrompt(final String origin, final GeolocationPermissions.Callback callback) {
|
||||
callback.invoke(origin, true, false);//注意个函数,第二个参数就是是否同意定位权限,第三个是是否希望内核记住
|
||||
super.onGeolocationPermissionsShowPrompt(origin, callback);
|
||||
}
|
||||
//=========HTML5定位==========================================================
|
||||
|
||||
|
||||
//=========多窗口的问题==========================================================
|
||||
@Override
|
||||
public boolean onCreateWindow(WebView view, boolean isDialog, boolean isUserGesture, Message resultMsg) {
|
||||
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
|
||||
transport.setWebView(dataBinding.webview);
|
||||
resultMsg.sendToTarget();
|
||||
return true;
|
||||
}
|
||||
//=========多窗口的问题==========================================================
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -216,7 +216,7 @@ public class ChatFragment extends BaseLazyFragment<MainViewModel, FragmentChatBi
|
||||
private void toSend() {
|
||||
HideKeyboard(dataBinding.messageEt);
|
||||
hideSoftInput();
|
||||
if (todayMatchesBean.isIsLiving()) {
|
||||
// if (todayMatchesBean.isIsLiving()) {
|
||||
|
||||
try {
|
||||
userBean = InitApp.getUserBean();
|
||||
@@ -253,7 +253,7 @@ public class ChatFragment extends BaseLazyFragment<MainViewModel, FragmentChatBi
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -465,10 +465,10 @@ public class ChatFragment extends BaseLazyFragment<MainViewModel, FragmentChatBi
|
||||
rooms = todayMatchesBean.getChannelName();
|
||||
}
|
||||
|
||||
if (todayMatchesBean.isIsLiving()) {
|
||||
// if (todayMatchesBean.isIsLiving()) {
|
||||
viewModel.chatHistory(rooms);
|
||||
viewModel.pin();
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.xyz.babelive.bean.TodayMatchesBean;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -70,6 +71,14 @@ public class StringUtils {
|
||||
}
|
||||
|
||||
|
||||
public static String getFileNameByDaya(long time) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
|
||||
// format.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||
// LogUtils.i("获取到时间戳:"+time);
|
||||
return format.format(time);
|
||||
}
|
||||
|
||||
|
||||
public static String stringLauchDayTime(long time) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("HH:mm");
|
||||
// format.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||
|
||||
@@ -190,6 +190,13 @@ public class MainViewModel extends BaseViewModel {
|
||||
}
|
||||
|
||||
|
||||
protected MutableLiveData<NoticeBean> noticeActivityMutableLiveData = new MutableLiveData<>();
|
||||
|
||||
public MutableLiveData<NoticeBean> getNoticeActivityMutableLiveData() {
|
||||
return noticeActivityMutableLiveData;
|
||||
}
|
||||
|
||||
|
||||
protected MutableLiveData<Geth5linkBeran> geth5linkBeranMutableLiveData = new MutableLiveData<>();
|
||||
|
||||
public MutableLiveData<Geth5linkBeran> geth5linkBeranMutableLiveData() {
|
||||
@@ -752,9 +759,51 @@ public class MainViewModel extends BaseViewModel {
|
||||
}
|
||||
});
|
||||
}
|
||||
public void noticeByList(int pageNum,int pageSize) {
|
||||
Api.getInstance().noticeByType("1",pageNum,pageSize)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<List<NoticeBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<NoticeBean>> feedbackResp) {
|
||||
|
||||
getNoticeListMutableLiveData().postValue(feedbackResp.rows);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
getNoticeListMutableLiveData().postValue(null);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void noticeActivity() {
|
||||
Api.getInstance().noticeByType("2",1,1)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<List<NoticeBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<List<NoticeBean>> feedbackResp) {
|
||||
if(feedbackResp.rows!=null&&feedbackResp.rows.size()>0) {
|
||||
getNoticeActivityMutableLiveData().postValue(feedbackResp.rows.get(0));
|
||||
}else{
|
||||
getNoticeActivityMutableLiveData().postValue(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
getNoticeActivityMutableLiveData().postValue(null);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
public void notice() {
|
||||
Api.getInstance().notice("1")
|
||||
Api.getInstance().notice()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<List<NoticeBean>>>() {
|
||||
|
||||
21
app/src/main/res/drawable/button_ture_bg_big.xml
Normal file
21
app/src/main/res/drawable/button_ture_bg_big.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="@color/text_true_color"
|
||||
android:startColor="@color/text_true_color"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp20"
|
||||
android:bottomRightRadius="@dimen/dp20"
|
||||
android:topLeftRadius="@dimen/dp20"
|
||||
android:topRightRadius="@dimen/dp20" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
|
||||
|
||||
18
app/src/main/res/drawable/dot_bg.xml
Normal file
18
app/src/main/res/drawable/dot_bg.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="@dimen/dp10" android:height="10dp">
|
||||
<shape android:shape="oval">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FF4000"
|
||||
android:startColor="#FF4000"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
24
app/src/main/res/drawable/input_message_bg.xml
Normal file
24
app/src/main/res/drawable/input_message_bg.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="@color/bantou_bg_color"
|
||||
android:startColor="@color/bantou_bg_color"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<!-- <stroke android:width="1dp" android:color="@color/line_color"/>-->
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp20"
|
||||
android:bottomRightRadius="@dimen/dp20"
|
||||
android:topLeftRadius="@dimen/dp20"
|
||||
android:topRightRadius="@dimen/dp20" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,13 @@
|
||||
android:layout_marginEnd="@dimen/dp10"
|
||||
android:layout_toLeftOf="@id/user_iv"
|
||||
android:src="@mipmap/home_message" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/dot_bg"
|
||||
android:id="@+id/message_dot"
|
||||
android:visibility="gone"
|
||||
android:layout_alignRight="@id/message_iv"/>
|
||||
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -70,7 +70,13 @@
|
||||
android:layout_marginEnd="@dimen/dp10"
|
||||
android:layout_toLeftOf="@id/user_iv"
|
||||
android:src="@mipmap/home_message" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/dot_bg"
|
||||
android:id="@+id/message_dot"
|
||||
android:visibility="gone"
|
||||
android:layout_alignRight="@id/message_iv"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_iv"
|
||||
|
||||
@@ -19,39 +19,64 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/main_color" />
|
||||
<include layout="@layout/layout_action_bar"
|
||||
android:id="@+id/action_v"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
<include
|
||||
android:id="@+id/action_v"
|
||||
layout="@layout/layout_action_bar" />
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none" />
|
||||
android:layout_height="match_parent"
|
||||
app:srlAccentColor="@color/main_color">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/nodate_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="@dimen/dp200"
|
||||
android:visibility="gone">
|
||||
<com.xyz.babelive.ui.view.BezierCircleHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scrollbars="none" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/nodate_ly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp200"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/noti_nodata" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wdbd_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/no_announcements"
|
||||
android:textColor="@color/des_txt_color"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<com.scwang.smart.refresh.footer.BallPulseFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/noti_nodata" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wdbd_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/no_announcements"
|
||||
android:textColor="@color/des_txt_color"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
app:srlAccentColor="@color/des_txt_color" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -35,11 +35,28 @@
|
||||
android:background="@color/line_color"
|
||||
android:layout_below="@id/actio_ly"
|
||||
android:id="@+id/lines1"/>
|
||||
<WebView
|
||||
|
||||
<android.webkit.WebView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/lines1"
|
||||
android:visibility="invisible"
|
||||
android:id="@+id/webview"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ry_v"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_centerInParent="true">
|
||||
<ImageView
|
||||
android:layout_width="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/logo_left"
|
||||
android:layout_centerInParent="true"/>
|
||||
<com.xyz.babelive.utils.BabeLiveRingLoadingView
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="300dp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
|
||||
59
app/src/main/res/layout/dialog_activity.xml
Normal file
59
app/src/main/res/layout/dialog_activity.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="30dp"
|
||||
android:minHeight="@dimen/dp200"
|
||||
android:id="@+id/varcc"
|
||||
app:cardCornerRadius="@dimen/dp10"
|
||||
app:cardBackgroundColor="@color/main_color">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<android.webkit.WebView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/webview"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ry_v"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_centerInParent="true">
|
||||
<ImageView
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/logo_left"
|
||||
android:layout_centerInParent="true"/>
|
||||
<com.xyz.babelive.utils.BabeLiveRingLoadingView
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:id="@+id/colose_iv"
|
||||
android:layout_margin="@dimen/dp10"
|
||||
android:src="@mipmap/dialog_colose"
|
||||
android:layout_alignParentEnd="true"/>
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -16,7 +16,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp40"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/card_bord_bantou_bg1"
|
||||
android:background="@drawable/input_message_bg"
|
||||
android:hint="@string/send_message"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLength="50"
|
||||
@@ -31,7 +31,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp40"
|
||||
android:layout_marginStart="@dimen/dp10"
|
||||
android:background="@drawable/button_ture_bg"
|
||||
android:background="@drawable/button_ture_bg_big"
|
||||
android:paddingStart="@dimen/dp10"
|
||||
android:paddingEnd="@dimen/dp10"
|
||||
android:text="@string/send"
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp40"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/card_bord_bantou_bg1"
|
||||
android:background="@drawable/input_message_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="@string/send_message"
|
||||
android:maxLength="50"
|
||||
@@ -124,7 +124,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp40"
|
||||
android:layout_marginStart="@dimen/dp10"
|
||||
android:background="@drawable/button_ture_bg"
|
||||
android:background="@drawable/button_ture_bg_big"
|
||||
android:paddingStart="@dimen/dp10"
|
||||
android:paddingEnd="@dimen/dp10"
|
||||
android:text="@string/send"
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/tab_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="118dp" />
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp10">
|
||||
android:layout_marginTop="@dimen/dp20">
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="114dp"
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main_content1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="118dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp10">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="190dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:background="@drawable/card_bord_org_bg1"
|
||||
android:layout_height="98dp">
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp20"
|
||||
@@ -39,15 +39,15 @@
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp10"
|
||||
android:layout_below="@id/live_name">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="@dimen/dp80"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.xyz.babelive.ui.view.CircleImageView
|
||||
@@ -62,15 +62,16 @@
|
||||
android:lines="1"
|
||||
android:id="@+id/zhudu_tv"
|
||||
android:ellipsize="end"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:layout_marginTop="@dimen/dp5"
|
||||
android:paddingStart="@dimen/dp10"
|
||||
android:paddingEnd="@dimen/dp10"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/live_tag_lys"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="@dimen/dp50"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
@@ -107,9 +108,9 @@
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="@dimen/dp80"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.xyz.babelive.ui.view.CircleImageView
|
||||
@@ -124,8 +125,9 @@
|
||||
android:lines="1"
|
||||
android:id="@+id/kedui_tv"
|
||||
android:ellipsize="end"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:layout_marginTop="@dimen/dp5"
|
||||
android:paddingStart="@dimen/dp10"
|
||||
android:paddingEnd="@dimen/dp10"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
android:id="@+id/main_content1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="120dp"
|
||||
android:paddingStart="@dimen/dp10"
|
||||
android:paddingEnd="@dimen/dp10">
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -24,16 +24,30 @@
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="14dp"
|
||||
android:orientation="horizontal">
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/noti_img"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="@dimen/dp25"
|
||||
android:layout_height="@dimen/dp25">
|
||||
<ImageView
|
||||
android:layout_width="23dp"
|
||||
android:layout_height="23dp"
|
||||
android:scaleType="fitXY"
|
||||
android:id="@+id/noti_iv"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@mipmap/noti_img"/>
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/dot_bg"
|
||||
android:id="@+id/message_dot"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentRight="true"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_tv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/dp20"
|
||||
android:minHeight="@dimen/dp25"
|
||||
android:layout_marginStart="@dimen/dp5"
|
||||
android:layout_marginEnd="@dimen/dp5"
|
||||
android:layout_weight="1"
|
||||
@@ -45,7 +59,7 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="20dp"
|
||||
android:minHeight="25dp"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@+id/time_tv"
|
||||
android:text="2025-07-20"
|
||||
@@ -56,7 +70,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="[Important Reminder] Recently, there are many telecom frauds, so don't be cheated!"
|
||||
android:text="dfgdfgd"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:layout_marginBottom="@dimen/dp15"
|
||||
android:id="@+id/des_tv"
|
||||
|
||||
@@ -10,164 +10,171 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="110dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/card_bord_org_bg1"
|
||||
android:layout_height="110dp">
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp20"
|
||||
android:layout_height="@dimen/dp20"
|
||||
android:id="@+id/game_iv"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:layout_marginStart="@dimen/dp10"
|
||||
android:src="@color/main_color"
|
||||
app:es_shape_type="round"/>
|
||||
android:background="@drawable/card_bord_org_bg1">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/game_iv"
|
||||
android:layout_width="@dimen/dp20"
|
||||
android:layout_height="@dimen/dp20"
|
||||
android:layout_marginStart="@dimen/dp10"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:src="@color/main_color"
|
||||
app:es_shape_type="round" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="@dimen/dp4"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:layout_marginEnd="@dimen/dp10"
|
||||
android:layout_marginBottom="@dimen/dp10"
|
||||
android:layout_toRightOf="@id/game_iv"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:lines="1"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/live_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="@dimen/dp4"
|
||||
android:layout_toRightOf="@id/game_iv"
|
||||
android:layout_marginTop="@dimen/dp10"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginEnd="@dimen/dp10"
|
||||
android:layout_marginBottom="@dimen/dp10"
|
||||
android:lines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp" />
|
||||
<LinearLayout
|
||||
android:id="@+id/live_ly"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:background="@drawable/button_ture_bg2"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="@dimen/dp5"
|
||||
android:layout_marginTop="@dimen/dp5"
|
||||
android:layout_marginEnd="@dimen/dp5"
|
||||
android:layout_marginBottom="@dimen/dp5"
|
||||
android:background="@drawable/button_ture_bg2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:layout_alignParentEnd="true"
|
||||
|
||||
android:orientation="horizontal">
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/live_tag"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
/>
|
||||
android:layout_alignParentEnd="true" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/dp3"
|
||||
android:lines="1"
|
||||
android:text="@string/live"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/yuyue_iv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="@dimen/dp5"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp5"
|
||||
android:layout_marginEnd="@dimen/dp5"
|
||||
android:layout_marginBottom="@dimen/dp5"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:src="@mipmap/home_messge_smaill"/>
|
||||
android:src="@mipmap/home_messge_smaill"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/live_name"
|
||||
android:layout_marginBottom="@dimen/dp10">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="@dimen/dp10"
|
||||
android:layout_below="@id/live_name">
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.xyz.babelive.ui.view.CircleImageView
|
||||
android:layout_width="@dimen/dp32"
|
||||
android:layout_height="@dimen/dp32"
|
||||
android:src="@mipmap/player_img"
|
||||
android:id="@+id/zhudui_iv"
|
||||
app:es_shape_type="round"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:lines="1"
|
||||
android:id="@+id/zhudu_tv"
|
||||
android:ellipsize="end"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:layout_marginTop="@dimen/dp6"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
<com.xyz.babelive.ui.view.CircleImageView
|
||||
android:id="@+id/zhudui_iv"
|
||||
android:layout_width="@dimen/dp32"
|
||||
android:layout_height="@dimen/dp32"
|
||||
android:src="@mipmap/player_img"
|
||||
app:es_shape_type="round" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/zhudu_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="进行中"
|
||||
android:lines="1"
|
||||
android:id="@+id/status_tv"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/des_txt_color"
|
||||
android:textSize="10sp"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="VS"
|
||||
android:lines="1"
|
||||
android:textStyle="bold"
|
||||
android:id="@+id/jieguo_tv"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.xyz.babelive.ui.view.CircleImageView
|
||||
android:layout_width="@dimen/dp32"
|
||||
android:layout_height="@dimen/dp32"
|
||||
android:src="@mipmap/player_img"
|
||||
android:id="@+id/kedui_iv"
|
||||
app:es_shape_type="round"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:lines="1"
|
||||
android:id="@+id/kedui_tv"
|
||||
android:layout_marginTop="@dimen/dp6"
|
||||
android:ellipsize="end"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp6"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:text="进行中"
|
||||
android:textColor="@color/des_txt_color"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/jieguo_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:text="VS"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xyz.babelive.ui.view.CircleImageView
|
||||
android:id="@+id/kedui_iv"
|
||||
android:layout_width="@dimen/dp32"
|
||||
android:layout_height="@dimen/dp32"
|
||||
android:src="@mipmap/player_img"
|
||||
app:es_shape_type="round" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/kedui_tv"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp6"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:paddingStart="@dimen/dp5"
|
||||
android:paddingEnd="@dimen/dp5"
|
||||
android:textColor="@color/body_txt_color"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
Reference in New Issue
Block a user