添加自定义加载状态状态控件、优化首页加载方式
This commit is contained in:
parent
974d31662c
commit
dd8fab4aa1
@ -0,0 +1,79 @@
|
||||
package com.tenlionsoft.baselib.core.widget.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.tenlionsoft.baselib.R;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2022/4/27 - 16:40
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class CustomStateView extends LinearLayout {
|
||||
public static final int STATE_LOAD = 0x123;
|
||||
public static final int STATE_EMPTY = 0x124;
|
||||
public static final int STATE_ERROR = 0x125;
|
||||
public static final int STATE_SUCCESS = 0x126;
|
||||
private int mState = STATE_LOAD;
|
||||
private ProgressBar mPbStateLoading;
|
||||
private ImageView mIvStateDate;
|
||||
private TextView mTvStateHint;
|
||||
|
||||
public CustomStateView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public CustomStateView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
View view = LayoutInflater.from(context).inflate(R.layout.layout_state_view, this, true);
|
||||
mPbStateLoading = view.findViewById(R.id.pb_state_loading);
|
||||
mIvStateDate = view.findViewById(R.id.iv_state_data);
|
||||
mTvStateHint = view.findViewById(R.id.tv_state_hint);
|
||||
setState(STATE_LOAD);
|
||||
}
|
||||
|
||||
public CustomStateView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
switch (state) {
|
||||
case STATE_LOAD://加载中
|
||||
mIvStateDate.setVisibility(View.GONE);
|
||||
mPbStateLoading.setVisibility(View.VISIBLE);
|
||||
mTvStateHint.setVisibility(View.VISIBLE);
|
||||
mTvStateHint.setText("加载中...");
|
||||
break;
|
||||
case STATE_EMPTY://没有数据
|
||||
mIvStateDate.setVisibility(View.VISIBLE);
|
||||
mIvStateDate.setBackgroundResource(R.drawable.ic_empty_data);
|
||||
mPbStateLoading.setVisibility(View.GONE);
|
||||
mTvStateHint.setVisibility(View.VISIBLE);
|
||||
mTvStateHint.setText("暂无数据");
|
||||
break;
|
||||
case STATE_ERROR:
|
||||
mIvStateDate.setVisibility(View.VISIBLE);
|
||||
mIvStateDate.setBackgroundResource(R.drawable.ic_load_error);
|
||||
mPbStateLoading.setVisibility(View.GONE);
|
||||
mTvStateHint.setVisibility(View.VISIBLE);
|
||||
mTvStateHint.setText("加载失败");
|
||||
break;
|
||||
case STATE_SUCCESS:
|
||||
mIvStateDate.setVisibility(GONE);
|
||||
mPbStateLoading.setVisibility(GONE);
|
||||
mTvStateHint.setVisibility(GONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
BIN
baselib/src/main/res/drawable-xhdpi/ic_arrow_down_black.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_arrow_down_black.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 240 B |
BIN
baselib/src/main/res/drawable-xhdpi/ic_empty_data.png
Executable file → Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_empty_data.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
BIN
baselib/src/main/res/drawable-xhdpi/ic_read_num_hint.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_read_num_hint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 515 B |
BIN
baselib/src/main/res/drawable-xhdpi/ic_schedule_hint_icon.png
Normal file
BIN
baselib/src/main/res/drawable-xhdpi/ic_schedule_hint_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 742 B |
Binary file not shown.
After Width: | Height: | Size: 561 B |
35
baselib/src/main/res/layout/layout_state_view.xml
Normal file
35
baselib/src/main/res/layout/layout_state_view.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ll_state_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/pb_state_loading"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:indeterminateBehavior="repeat"
|
||||
android:indeterminateDrawable="@drawable/anim_loading" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_state_data"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_centerInParent="true"
|
||||
tools:src="@drawable/ic_empty_data" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_state_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clickable="true"
|
||||
android:textColor="@color/gray_text"
|
||||
tools:text="加载数据失败" />
|
||||
|
||||
</LinearLayout>
|
@ -4,6 +4,7 @@ import android.graphics.Color;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.webkit.HttpAuthHandler;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.SslErrorHandler;
|
||||
@ -61,7 +62,12 @@ public class NoticeDetailActivity extends BaseActivity {
|
||||
RecyclerView mRlvFiles;
|
||||
@BindView(R2.id.nsw_web)
|
||||
NestedScrollWebView mNswWeb;
|
||||
@BindView(R2.id.ll_num)
|
||||
LinearLayout mLlNum;
|
||||
@BindView(R2.id.tv_read_state)
|
||||
TextView mTvReadState;
|
||||
private String mId;
|
||||
private NoticeListBean.RowsBean mBean;
|
||||
|
||||
@Override
|
||||
protected int setLayoutId() {
|
||||
@ -118,8 +124,9 @@ public class NoticeDetailActivity extends BaseActivity {
|
||||
*/
|
||||
private void setDataToView(NoticeListBean.RowsBean bean) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mBean = bean;
|
||||
mTvTitle.setText(bean.getNoticeTitle());
|
||||
mTvTime.setText("发布时间:" + bean.getGmtCreate());
|
||||
mTvTime.setText("发布时间:" + bean.getNoticeCheckTime());
|
||||
mTvNum.setText(bean.getNoticeReadCount() + "");
|
||||
mTvType.setText(bean.getNoticeTypeName());
|
||||
switch (bean.getNoticeLevel()) {
|
||||
@ -137,7 +144,16 @@ public class NoticeDetailActivity extends BaseActivity {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
//判断状态 1全部人员 2指定部门 3指定人员
|
||||
if (!"1".equals(bean.getNoticeRange())) {
|
||||
if ("1".equals(bean.getNoticeReadStatus())) {
|
||||
mTvReadState.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mTvReadState.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
mTvReadState.setVisibility(View.GONE);
|
||||
}
|
||||
WebSettings settings = mNswWeb.getSettings();
|
||||
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
|
||||
settings.setAppCacheEnabled(true);
|
||||
@ -202,6 +218,12 @@ public class NoticeDetailActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onNext(@NonNull BaseSuccessBean baseSuccessBean) {
|
||||
LogUtils.e("通知公告已读==" + mId);
|
||||
if (!"1".equals(mBean.getNoticeRange())) {
|
||||
mTvReadState.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mTvReadState.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -122,6 +122,9 @@ public class ScheduleActivity extends BaseActivity implements
|
||||
* 初始化页面
|
||||
*/
|
||||
private void initViews() {
|
||||
setTouchDelegate(mIvAdd, 30);
|
||||
setTouchDelegate(mIvSearch, 30);
|
||||
setTouchDelegate(mIvBack, 30);
|
||||
mCurrentYear = mCalendarView.getCurYear();
|
||||
mCurrentMonth = mCalendarView.getCurMonth();
|
||||
mCurrentDay = mCalendarView.getCurDay();
|
||||
|
@ -6,6 +6,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter;
|
||||
import com.tenlionsoft.baselib.utils.TimeUtils;
|
||||
import com.tenlionsoft.oamodule.R;
|
||||
import com.tenlionsoft.oamodule.beans.ScheduleDetailBean;
|
||||
import com.tenlionsoft.oamodule.holder.ScheduleHolder;
|
||||
@ -31,7 +32,14 @@ public class ScheduleAdapter extends BaseRecyclerAdapter<ScheduleDetailBean, Sch
|
||||
|
||||
@Override
|
||||
public void bindHolder(ScheduleHolder h, int i) {
|
||||
h.mTvInterval.setText("即将");
|
||||
ScheduleDetailBean b = mData.get(i);
|
||||
if ("1".equals(b.getScheduleMessageStatus())) {
|
||||
//已经提醒
|
||||
h.mTvInterval.setText("已提醒");
|
||||
} else {
|
||||
String fitTimeSpanByNow = TimeUtils.getFitTimeSpanByNow(b.getScheduleStart() + " " + b.getScheduleStartTime(), 3);
|
||||
h.mTvInterval.setText(fitTimeSpanByNow + "后");
|
||||
}
|
||||
h.mTvContent.setText(mData.get(i).getScheduleTitle());
|
||||
h.mTvStart.setText(mData.get(i).getScheduleStart());
|
||||
h.mTvEnd.setText(mData.get(i).getScheduleEnd());
|
||||
|
@ -8,7 +8,6 @@ import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@ -35,6 +34,7 @@ import com.tenlionsoft.baselib.core.retrofit_net.conver.RxTransformer;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseActivity;
|
||||
import com.tenlionsoft.baselib.core.widget.base.BaseFragment;
|
||||
import com.tenlionsoft.baselib.core.widget.base.FunctionTitleNumAdapter;
|
||||
import com.tenlionsoft.baselib.core.widget.views.CustomStateView;
|
||||
import com.tenlionsoft.baselib.utils.ExceptionHandler;
|
||||
import com.tenlionsoft.baselib.utils.LogUtils;
|
||||
import com.tenlionsoft.baselib.utils.UIUtil;
|
||||
@ -78,48 +78,49 @@ public class OaMainFragment extends BaseFragment {
|
||||
ImageView mIvUserIcon;
|
||||
@BindView(R2.id.fl_icon)
|
||||
FrameLayout mFlIcon;
|
||||
@BindView(R2.id.tv_user_dept)
|
||||
TextView mTvDept;
|
||||
@BindView(R2.id.tv_user_name)
|
||||
TextView mTvUserName;
|
||||
@BindView(R2.id.tv_user_dept)
|
||||
TextView mTvDept;
|
||||
@BindView(R2.id.iv_scan)
|
||||
ImageView mIvScan;
|
||||
@BindView(R2.id.rl_user_info)
|
||||
RelativeLayout mRlUserInfo;
|
||||
@BindView(R2.id.tv_todo)
|
||||
TextView mTvTodo;
|
||||
@BindView(R2.id.rl_todo)
|
||||
RelativeLayout mRlTodo;
|
||||
@BindView(R2.id.tv_to_read)
|
||||
TextView mTvToRead;
|
||||
@BindView(R2.id.rl_to_read)
|
||||
RelativeLayout mRlToRead;
|
||||
@BindView(R2.id.tv_supervise)
|
||||
TextView mTvSupervise;
|
||||
@BindView(R2.id.rl_supervise)
|
||||
RelativeLayout mRlSupervise;
|
||||
@BindView(R2.id.rl_title_bg)
|
||||
RelativeLayout mRlTitleBg;
|
||||
@BindView(R2.id.tv_notify)
|
||||
TextView mTvNotify;
|
||||
@BindView(R2.id.rlv_funcs)
|
||||
RecyclerView mRlvFuncs;
|
||||
@BindView(R2.id.rlv_notice)
|
||||
RecyclerView mRlvNotice;
|
||||
@BindView(R2.id.ll_empty)
|
||||
LinearLayout mLlEmpty;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.rl_todo)
|
||||
RelativeLayout mRlTodo;//我的待办
|
||||
@BindView(R2.id.rl_to_read)
|
||||
RelativeLayout mRlToRead;//我的待阅
|
||||
@BindView(R2.id.rl_supervise)
|
||||
RelativeLayout mRlSupervise;//我的督办
|
||||
@BindView(R2.id.rl_title_bg)
|
||||
RelativeLayout mRlTitleBg;
|
||||
@BindView(R2.id.tv_notice_more)
|
||||
TextView mTvNoticeMore;
|
||||
@BindView(R2.id.rl_user_info)
|
||||
RelativeLayout mRlUserInfo;
|
||||
@BindView(R2.id.ll_menu_hint)
|
||||
LinearLayout mLlMenuHint;
|
||||
@BindView(R2.id.iv_notice_icon)
|
||||
ImageView mIvNoticeIcon;
|
||||
@BindView(R2.id.iv_scan)
|
||||
ImageView mIvScan;
|
||||
|
||||
@BindView(R2.id.tv_notice_more)
|
||||
TextView mTvNoticeMore;
|
||||
@BindView(R2.id.rlv_notice)
|
||||
RecyclerView mRlvNotice;
|
||||
@BindView(R2.id.srl_content)
|
||||
SmartRefreshLayout mSrlContent;
|
||||
@BindView(R2.id.csv_funcs)
|
||||
CustomStateView mCsvFuncs;
|
||||
@BindView(R2.id.csv_notice)
|
||||
CustomStateView mCsvNotice;
|
||||
private List<FuncBean> mFuncBeans;
|
||||
private FunctionTitleNumAdapter mAdapter;
|
||||
private ActivityResultLauncher<Intent> mLauncher;
|
||||
private NoticeShowAdapter mNoticeShowAdapter;
|
||||
private List<NoticeListBean.RowsBean> mNoticeListBeanRows;
|
||||
|
||||
@Override
|
||||
protected int getContentViewId() {
|
||||
@ -132,8 +133,8 @@ public class OaMainFragment extends BaseFragment {
|
||||
setStateView(STATE_SUCCESS);
|
||||
mSrlView.setEnableRefresh(false);
|
||||
mSrlView.setEnableLoadMore(false);
|
||||
getNoticeList();
|
||||
initContentView();
|
||||
doRefresh();
|
||||
Glide.with(mActivity)
|
||||
.load(R.drawable.ic_main_title_bg)
|
||||
.apply(new RequestOptions()
|
||||
@ -152,47 +153,6 @@ public class OaMainFragment extends BaseFragment {
|
||||
});
|
||||
}
|
||||
|
||||
private void getNoticeList() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getNoticeList("", "", "", "1", "15", UserLgUtils.getToken())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<NoticeListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull NoticeListBean noticeListBean) {
|
||||
if (noticeListBean.getRows().size() > 0) {
|
||||
mRlvNotice.setVisibility(View.VISIBLE);
|
||||
mLlEmpty.setVisibility(View.GONE);
|
||||
NoticeShowAdapter adapter = new NoticeShowAdapter(mActivity, noticeListBean.getRows());
|
||||
mRlvNotice.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvNotice.setAdapter(adapter);
|
||||
adapter.addOnItemClickListener(rowsBean -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE_DETAIL)
|
||||
.withString("id", rowsBean.getNoticeId())
|
||||
.navigation());
|
||||
} else {
|
||||
mRlvNotice.setVisibility(View.GONE);
|
||||
mLlEmpty.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mRlvNotice.setVisibility(View.GONE);
|
||||
mLlEmpty.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化页面
|
||||
@ -205,8 +165,16 @@ public class OaMainFragment extends BaseFragment {
|
||||
mAdapter.addOnItemClickListener(this::choosePage);
|
||||
mSrlContent.setEnableLoadMore(false);
|
||||
mSrlContent.setOnRefreshListener(v -> doRefresh());
|
||||
|
||||
mSrlContent.setEnableOverScrollDrag(true);
|
||||
mNoticeListBeanRows = new ArrayList<>();
|
||||
mNoticeShowAdapter = new NoticeShowAdapter(mActivity, mNoticeListBeanRows);
|
||||
mRlvNotice.setLayoutManager(new LinearLayoutManager(mActivity));
|
||||
mRlvNotice.setAdapter(mNoticeShowAdapter);
|
||||
mNoticeShowAdapter.addOnItemClickListener(rowsBean -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE_DETAIL)
|
||||
.withString("id", rowsBean.getNoticeId())
|
||||
.navigation());
|
||||
|
||||
mTvNoticeMore.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE)
|
||||
.navigation());//通知公告更多
|
||||
@ -214,11 +182,18 @@ public class OaMainFragment extends BaseFragment {
|
||||
Intent intent = new Intent(mActivity, CaptureActivity.class);
|
||||
mLauncher.launch(intent);
|
||||
});
|
||||
getMainMenuList();
|
||||
|
||||
}
|
||||
|
||||
private void doRefresh() {
|
||||
mCsvNotice.setVisibility(View.VISIBLE);
|
||||
mCsvFuncs.setVisibility(View.VISIBLE);
|
||||
mCsvFuncs.setState(CustomStateView.STATE_LOAD);
|
||||
mCsvNotice.setState(CustomStateView.STATE_LOAD);
|
||||
mFuncBeans.clear();
|
||||
mAdapter.setData(mFuncBeans);
|
||||
mNoticeListBeanRows.clear();
|
||||
mNoticeShowAdapter.setData(mNoticeListBeanRows);
|
||||
//获取菜单
|
||||
getMainMenuList();
|
||||
//获取通知公告
|
||||
@ -245,16 +220,56 @@ public class OaMainFragment extends BaseFragment {
|
||||
if (docTypeBeans.size() > 0) {
|
||||
mFuncBeans = docTypeBeans;
|
||||
mAdapter.setData(mFuncBeans);
|
||||
mLlMenuHint.setVisibility(View.GONE);
|
||||
mCsvFuncs.setVisibility(View.GONE);
|
||||
} else {
|
||||
mLlMenuHint.setVisibility(View.VISIBLE);
|
||||
mCsvFuncs.setVisibility(View.VISIBLE);
|
||||
mCsvFuncs.setState(CustomStateView.STATE_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mCsvFuncs.setState(CustomStateView.STATE_ERROR);
|
||||
ExceptionHandler.handleException(e);
|
||||
mLlMenuHint.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getNoticeList() {
|
||||
RetrofitManager.getInstance()
|
||||
.create(OAApi.class)
|
||||
.getNoticeList("", "", "", "1", "15", UserLgUtils.getToken())
|
||||
.compose(RxTransformer.getTransformer())
|
||||
.subscribe(new Observer<NoticeListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull NoticeListBean noticeListBean) {
|
||||
if (noticeListBean.getRows().size() > 0) {
|
||||
mRlvNotice.setVisibility(View.VISIBLE);
|
||||
mCsvNotice.setVisibility(View.GONE);
|
||||
mNoticeListBeanRows = noticeListBean.getRows();
|
||||
mNoticeShowAdapter.setData(mNoticeListBeanRows);
|
||||
|
||||
} else {
|
||||
mRlvNotice.setVisibility(View.GONE);
|
||||
mCsvNotice.setVisibility(View.VISIBLE);
|
||||
mCsvNotice.setState(CustomStateView.STATE_EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
mRlvNotice.setVisibility(View.GONE);
|
||||
mCsvNotice.setState(CustomStateView.STATE_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,7 +31,7 @@
|
||||
android:textSize="@dimen/text_16"
|
||||
tools:text="通知公告通知公告通知公告通知公告通知公告通知公告通知公告通知公告" />
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
@ -44,17 +44,36 @@
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="发布时间:2022-22-22 12:12:12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="浏览量:129" />
|
||||
</LinearLayout>
|
||||
android:layout_toRightOf="@id/tv_time"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_read_num_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="129" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -78,6 +97,15 @@
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="等级" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_read_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="已读"
|
||||
android:textColor="@color/red_ff"
|
||||
android:textSize="@dimen/text_12" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/ic_back_black"
|
||||
@ -69,16 +69,17 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@drawable/ic_search_icon_black" />
|
||||
android:src="@drawable/ic_search_black_solid_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_icon_add" />
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_add_icon_solid" />
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@ -93,28 +94,58 @@
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_year"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight=".4"
|
||||
android:background="@color/gray_bg"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:background="@color/gray_dd"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="年" />
|
||||
android:orientation="horizontal"
|
||||
android:padding="7dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_month"
|
||||
<TextView
|
||||
android:id="@+id/tv_year"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:text="年"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:src="@drawable/ic_arrow_down_black" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight=".3"
|
||||
android:background="@color/gray_bg"
|
||||
android:drawableRight="@drawable/ic_arrow_gray_down"
|
||||
android:layout_weight=".4"
|
||||
android:background="@color/gray_dd"
|
||||
android:gravity="center"
|
||||
android:padding="5dp"
|
||||
android:text="月" />
|
||||
android:orientation="horizontal"
|
||||
android:padding="7dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_month"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:text="月"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/ic_arrow_down_black" />
|
||||
</LinearLayout>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_type"
|
||||
@ -122,9 +153,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight=".3"
|
||||
android:background="@color/gray_bg"
|
||||
android:background="@color/gray_dd"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
android:padding="2dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb_month"
|
||||
@ -136,7 +167,9 @@
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="月"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@ -149,7 +182,9 @@
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="年"
|
||||
android:textStyle="bold" />
|
||||
</RadioGroup>
|
||||
|
@ -265,26 +265,11 @@
|
||||
tools:listitem="@layout/item_main_func_title_num"
|
||||
tools:spanCount="4" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_menu_hint"
|
||||
<com.tenlionsoft.baselib.core.widget.views.CustomStateView
|
||||
android:id="@+id/csv_funcs"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_empty_data" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="暂无菜单" />
|
||||
</LinearLayout>
|
||||
android:layout_centerInParent="true" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -349,25 +334,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
tools:listitem="@layout/item_notice_show" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_empty"
|
||||
<com.tenlionsoft.baselib.core.widget.views.CustomStateView
|
||||
android:id="@+id/csv_notice"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/ic_empty_data" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="暂无数据"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
android:layout_centerInParent="true" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -40,13 +40,24 @@
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="2022-12-12 12:12:12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_notify_point_gray"
|
||||
android:gravity="right"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="999" />
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_read_num_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:textSize="@dimen/text_12"
|
||||
tools:text="999" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -7,21 +7,32 @@
|
||||
android:background="@drawable/shp_rectangle_white_5"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_interval"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/ic_notify"
|
||||
android:drawablePadding="5dp"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/text_14"
|
||||
tools:text="3天后" />
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="5dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_schedule_hint_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_interval"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/text_14"
|
||||
tools:text="3天后" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/gray_line" />
|
||||
android:background="@color/gray_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user