Browse Source

1.修改数据监控页面UI

王鹏鹏 2 years ago
parent
commit
678cecc900

+ 1 - 0
.idea/misc.xml

@@ -169,6 +169,7 @@
         <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/activity_train_content_details.xml" value="0.176" />
         <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/activity_train_data.xml" value="0.18655967903711135" />
         <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/activity_workbenches.xml" value="0.16455696202531644" />
+        <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/calendar_pick_view_layout.xml" value="0.23697916666666666" />
         <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/dialog_course_treatment.xml" value="0.1" />
         <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/dialog_purchase_services.xml" value="0.2962239583333333" />
         <entry key="..\:/workspace/hcp-pad/workbenches/src/main/res/layout/dialog_tips.xml" value="0.136" />

+ 329 - 0
workbenches/src/main/java/com/yingyang/workbenches/widget/CalendarCard.java

@@ -0,0 +1,329 @@
+package com.yingyang.workbenches.widget;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewConfiguration;
+
+/**
+ * 自定义日历卡
+ */
+public class CalendarCard extends View {
+
+    private static final int TOTAL_COL = 7; // 7列
+    private static final int TOTAL_ROW = 6; // 6行
+
+    private Paint mCirclePaint; // 绘制圆形的画笔
+    private Paint mCirclePaintClick;
+    private Paint mTextPaint; // 绘制文本的画笔
+    private int mViewWidth; // 视图的宽度
+    private int mViewHeight; // 视图的高度
+    private int mCellSpace; // 单元格间距
+    private Row rows[] = new Row[TOTAL_ROW]; // 行数组,每个元素代表一行
+    private static CustomDate mShowDate; // 自定义的日期,包括year,month,day
+    private OnCellClickListener mCellClickListener; // 单元格点击回调事件
+    private int touchSlop; //
+    private boolean callBackCellSpace;
+
+    private Cell mClickCell;
+    private float mDownX;
+    private float mDownY;
+
+    /**
+     * 单元格点击的回调接口
+     *
+     * @author wuwenjie
+     *
+     */
+    public interface OnCellClickListener {
+        void clickDate(CustomDate date, State state); // 回调点击的日期
+
+        void changeDate(CustomDate date); // 回调滑动ViewPager改变的日期
+    }
+
+    public CalendarCard(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init(context);
+    }
+
+    public CalendarCard(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init(context);
+    }
+
+    public CalendarCard(Context context) {
+        super(context);
+        init(context);
+    }
+
+    public CalendarCard(Context context, OnCellClickListener listener) {
+        super(context);
+        this.mCellClickListener = listener;
+        init(context);
+    }
+
+    private void init(Context context) {
+        mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+        mCirclePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+        mCirclePaint.setStyle(Paint.Style.FILL);
+        mCirclePaint.setColor(Color.parseColor("#ea7878")); // 红色圆形
+        mCirclePaintClick = new Paint(Paint.ANTI_ALIAS_FLAG);
+        mCirclePaintClick.setStyle(Paint.Style.FILL);
+        mCirclePaintClick.setColor(Color.parseColor("#F24949")); // 红色圆形
+        touchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
+
+        initDate();
+    }
+
+    private void initDate() {
+        mShowDate = new CustomDate();
+        fillDate();//
+    }
+
+    private void fillDate() {
+        int monthDay = DateUtil.getCurrentMonthDay(); // 今天
+        int lastMonthDays = DateUtil.getMonthDays(mShowDate.year, mShowDate.month - 1); // 上个月的天数
+        int currentMonthDays = DateUtil.getMonthDays(mShowDate.year, mShowDate.month); // 当前月的天数
+        int firstDayWeek = DateUtil.getWeekDayFromDate(mShowDate.year, mShowDate.month);
+        boolean isCurrentMonth = false;
+        if (DateUtil.isCurrentMonth(mShowDate)) {
+            isCurrentMonth = true;
+        }
+        int day = 0;
+        for (int j = 0; j < TOTAL_ROW; j++) {
+            rows[j] = new Row(j);
+            for (int i = 0; i < TOTAL_COL; i++) {
+                int position = i + j * TOTAL_COL; // 单元格位置
+                // 这个月的
+                if (position >= firstDayWeek
+                        && position < firstDayWeek + currentMonthDays) {
+                    day++;
+                    rows[j].cells[i] = new Cell(CustomDate.modifiDayForObject(
+                            mShowDate, day), State.CURRENT_MONTH_DAY, i, j);
+                    // 今天
+                    if (isCurrentMonth && day == monthDay ) {
+                        CustomDate date = CustomDate.modifiDayForObject(mShowDate, day);
+                        rows[j].cells[i] = new Cell(date, State.TODAY, i, j);
+                    }
+
+                    if (isCurrentMonth && day > monthDay) {
+                        // 如果比这个月的今天要大,表示还没到
+                        rows[j].cells[i] = new Cell(
+                                CustomDate.modifiDayForObject(mShowDate, day),
+                                State.UNREACH_DAY, i, j);
+                    }
+
+                    // 过去一个月
+                } else if (position < firstDayWeek) {
+                    rows[j].cells[i] = new Cell(new CustomDate(mShowDate.year,
+                            mShowDate.month - 1, lastMonthDays
+                            - (firstDayWeek - position - 1)),
+                            State.PAST_MONTH_DAY, i, j);
+                    // 下个月
+                } else if (position >= firstDayWeek + currentMonthDays) {
+                    rows[j].cells[i] = new Cell((new CustomDate(mShowDate.year,
+                            mShowDate.month + 1, position - firstDayWeek
+                            - currentMonthDays + 1)),
+                            State.NEXT_MONTH_DAY, i, j);
+                }
+            }
+        }
+        mCellClickListener.changeDate(mShowDate);
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        for (int i = 0; i < TOTAL_ROW; i++) {
+            if (rows[i] != null) {
+                rows[i].drawCells(canvas);
+            }
+        }
+    }
+
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        super.onSizeChanged(w, h, oldw, oldh);
+        Log.e("wpp", "w---------------->"+w);
+        Log.e("wpp", "h---------------->"+h);
+        mViewWidth = w;
+        mViewHeight = h;
+        mCellSpace = Math.min(mViewHeight / TOTAL_ROW, mViewWidth / TOTAL_COL);
+        if (!callBackCellSpace) {
+            callBackCellSpace = true;
+        }
+        mTextPaint.setTextSize(24);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        switch (event.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                mDownX = event.getX();
+                mDownY = event.getY();
+                break;
+            case MotionEvent.ACTION_UP:
+                float disX = event.getX() - mDownX;
+                float disY = event.getY() - mDownY;
+                if (Math.abs(disX) < touchSlop && Math.abs(disY) < touchSlop) {
+                    int col = (int) (mDownX / mCellSpace);
+                    int row = (int) (mDownY / mCellSpace);
+                    measureClickCell(col, row);
+                }
+                break;
+            default:
+                break;
+        }
+
+        return true;
+    }
+
+    /**
+     * 计算点击的单元格
+     * @param col
+     * @param row
+     */
+    private void measureClickCell(int col, int row) {
+        if (col >= TOTAL_COL || row >= TOTAL_ROW)
+            return;
+        if (mClickCell != null) {
+            rows[mClickCell.j].cells[mClickCell.i] = mClickCell;
+        }
+        if (rows[row] != null) {
+            mClickCell = new Cell(rows[row].cells[col].date,
+                    rows[row].cells[col].state, rows[row].cells[col].i,
+                    rows[row].cells[col].j);
+
+            CustomDate date = rows[row].cells[col].date;
+            date.week = col;
+            mCellClickListener.clickDate(date,rows[row].cells[col].state);
+            // 刷新界面
+            update();
+        }
+    }
+
+    /**
+     * 组元素
+     *
+     * @author wuwenjie
+     *
+     */
+    class Row {
+        public int j;
+
+        Row(int j) {
+            this.j = j;
+        }
+
+        public Cell[] cells = new Cell[TOTAL_COL];
+
+        // 绘制单元格
+        public void drawCells(Canvas canvas) {
+            for (int i = 0; i < cells.length; i++) {
+                if (cells[i] != null) {
+                    cells[i].drawSelf(canvas);
+                }
+            }
+        }
+
+    }
+
+    /**
+     * 单元格元素
+     *
+     * @author wuwenjie
+     *
+     */
+    class Cell {
+        public CustomDate date;
+        public State state;
+        public int i;
+        public int j;
+
+        public Cell(CustomDate date, State state, int i, int j) {
+            super();
+            this.date = date;
+            this.state = state;
+            this.i = i;
+            this.j = j;
+        }
+        public void drawSelf(Canvas canvas) {
+            switch (state) {
+                case TODAY: // 今天
+                    mTextPaint.setColor(Color.parseColor("#fffffe"));
+                    Paint currentDayPaint = mClickCell==null?mCirclePaintClick:mCirclePaint;
+                    canvas.drawCircle((float) (mCellSpace * (i + 0.5)),
+                            (float) ((j + 0.5) * mCellSpace), mCellSpace / 3,
+                            currentDayPaint);
+                    break;
+                case CURRENT_MONTH_DAY: // 当前月日期
+                case UNREACH_DAY:
+                    mTextPaint.setColor(Color.BLACK);
+                    break;
+                case PAST_MONTH_DAY: // 过去一个月
+                case NEXT_MONTH_DAY: // 下一个月
+//                    mTextPaint.setColor(Color.parseColor("#fffffe"));
+                    mTextPaint.setColor(Color.GRAY);
+                    break;
+                default:
+                    break;
+            }
+            //设置点击日期是背景颜色改变
+            if(mClickCell!=null && mClickCell.i == i && mClickCell.j == j){
+                mTextPaint.setColor(Color.parseColor("#fffffe"));
+                canvas.drawCircle((float) (mCellSpace * (i + 0.5)),
+                        (float) ((j + 0.5) * mCellSpace), mCellSpace / 3,
+                        mCirclePaintClick);
+            }
+            // 绘制文字
+            String content = date.day + "" ;
+            canvas.drawText(content,
+                    (float) ((i + 0.5) * mCellSpace - mTextPaint
+                            .measureText(content) / 2), (float) ((j + 0.7)
+                            * mCellSpace - mTextPaint
+                            .measureText(content, 0, 1) / 2), mTextPaint);
+
+        }
+    }
+
+    /**
+     *
+     * @author wuwenjie 单元格的状态 当前月日期,过去的月的日期,下个月的日期
+     */
+    public enum State {
+        TODAY,CURRENT_MONTH_DAY, PAST_MONTH_DAY, NEXT_MONTH_DAY, UNREACH_DAY;
+    }
+
+    // 从左往右划,上一个月
+    public void leftSlide() {
+        if (mShowDate.month == 1) {
+            mShowDate.month = 12;
+            mShowDate.year -= 1;
+        } else {
+            mShowDate.month -= 1;
+        }
+        update();
+    }
+
+    // 从右往左划,下一个月
+    public void rightSlide() {
+        if (mShowDate.month == 12) {
+            mShowDate.month = 1;
+            mShowDate.year += 1;
+        } else {
+            mShowDate.month += 1;
+        }
+        update();
+    }
+
+    public void update() {
+        fillDate();
+        invalidate();
+    }
+
+}

+ 142 - 0
workbenches/src/main/java/com/yingyang/workbenches/widget/CalendarPickView.java

@@ -0,0 +1,142 @@
+package com.yingyang.workbenches.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.widget.LinearLayout;
+
+import androidx.viewpager.widget.ViewPager;
+
+import com.yingyang.workbenches.R;
+
+/**
+ * Created by wangxingsheng on 16/6/24.
+ */
+public class CalendarPickView extends LinearLayout implements CalendarCard.OnCellClickListener {
+
+    private ViewPager mViewPager;
+    private int mCurrentIndex = 498;
+    private CalendarCard[] mShowViews;
+    private CalendarViewAdapter<CalendarCard> adapter;
+    private SildeDirection mDirection = SildeDirection.NO_SILDE;
+
+    public CalendarPickView(Context context) {
+        super(context);
+        init();
+    }
+
+    public CalendarPickView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    public CalendarPickView(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        init();
+    }
+
+    private void init() {
+        LayoutInflater.from(getContext()).inflate(R.layout.calendar_pick_view_layout, this, true);
+        mViewPager = this.findViewById(R.id.vp_calendar);
+        CalendarCard[] views = new CalendarCard[3];
+        for (int i = 0; i < 3; i++) {
+            views[i] = new CalendarCard(getContext(), this);
+        }
+        adapter = new CalendarViewAdapter<CalendarCard>(views);
+        setViewPager();
+    }
+
+    private void setViewPager() {
+        mViewPager.setAdapter(adapter);
+        mViewPager.setCurrentItem(498);
+        mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+
+            @Override
+            public void onPageSelected(int position) {
+                measureDirection(position);
+                updateCalendarView(position);
+            }
+
+            @Override
+            public void onPageScrolled(int arg0, float arg1, int arg2) {
+
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int arg0) {
+
+            }
+        });
+    }
+
+    public ViewPager getViewPager() {
+        return mViewPager;
+    }
+
+    @Override
+    public void clickDate(CustomDate date, CalendarCard.State state) {
+        if (mOnItemClickListener != null) {
+            mOnItemClickListener.onClick(date, state);
+        }
+    }
+
+    private CustomDate currentDate;
+
+    @Override
+    public void changeDate(CustomDate date) {
+        currentDate = date;
+        if (mOnItemClickListener != null) {
+            mOnItemClickListener.onChangeDate(date);
+        }
+    }
+
+    public CustomDate getCurrentDate() {
+        return currentDate == null ? new CustomDate() : currentDate;
+    }
+
+    /**
+     * 计算方向
+     *
+     * @param arg0
+     */
+    private void measureDirection(int arg0) {
+        if (arg0 > mCurrentIndex) {
+            mDirection = SildeDirection.RIGHT;
+        } else if (arg0 < mCurrentIndex) {
+            mDirection = SildeDirection.LEFT;
+        }
+        mCurrentIndex = arg0;
+    }
+
+    // 更新日历视图
+    private void updateCalendarView(int arg0) {
+        mShowViews = adapter.getAllItems();
+        if (mDirection == SildeDirection.RIGHT) {
+            mShowViews[arg0 % mShowViews.length].rightSlide();
+        } else if (mDirection == SildeDirection.LEFT) {
+            mShowViews[arg0 % mShowViews.length].leftSlide();
+        }
+        mDirection = SildeDirection.NO_SILDE;
+    }
+
+    enum SildeDirection {
+        RIGHT, LEFT, NO_SILDE;
+    }
+
+    public void setOnItemClickListener(OnItemClickListener onItemClickListener) {
+        this.mOnItemClickListener = onItemClickListener;
+    }
+
+    private OnItemClickListener mOnItemClickListener; // 单元格点击回调事件
+
+    /**
+     * 单元格点击的回调接口
+     *
+     * @author wuwenjie
+     */
+    public interface OnItemClickListener {
+        void onClick(CustomDate date, CalendarCard.State state); // 回调点击的日期
+
+        void onChangeDate(CustomDate date); // 回调滑动ViewPager改变的日期
+    }
+}

+ 49 - 0
workbenches/src/main/java/com/yingyang/workbenches/widget/CalendarViewAdapter.java

@@ -0,0 +1,49 @@
+package com.yingyang.workbenches.widget;
+
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.viewpager.widget.PagerAdapter;
+
+/**
+ * @author 王鹏鹏
+ */
+public class CalendarViewAdapter<V extends View> extends PagerAdapter {
+
+    private V[] views;
+
+    public CalendarViewAdapter(V[] views) {
+        super();
+        this.views = views;
+    }
+
+
+    @Override
+    public Object instantiateItem(ViewGroup container, int position) {
+        if (container.getChildCount() == views.length) {
+            container.removeView(views[position % views.length]);
+        }
+        container.addView(views[position % views.length], 0);
+        return views[position % views.length];
+    }
+
+    @Override
+    public int getCount() {
+        return Integer.MAX_VALUE;
+    }
+
+    @Override
+    public boolean isViewFromObject(View view, Object object) {
+        return view == ((View) object);
+    }
+
+    @Override
+    public void destroyItem(ViewGroup container, int position, Object object) {
+        container.removeView(container);
+    }
+
+    public V[] getAllItems() {
+        return views;
+    }
+
+}

+ 74 - 0
workbenches/src/main/java/com/yingyang/workbenches/widget/CustomDate.java

@@ -0,0 +1,74 @@
+package com.yingyang.workbenches.widget;
+
+import java.io.Serializable;
+
+public class CustomDate implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    public int year;
+    public int month;
+    public int day;
+    public int week;
+
+    public CustomDate(int year, int month, int day) {
+        if (month > 12) {
+            month = 1;
+            year++;
+        } else if (month < 1) {
+            month = 12;
+            year--;
+        }
+        this.year = year;
+        this.month = month;
+        this.day = day;
+    }
+
+    public CustomDate() {
+        this.year = DateUtil.getYear();
+        this.month = DateUtil.getMonth();
+        this.day = DateUtil.getCurrentMonthDay();
+    }
+
+    public static CustomDate modifiDayForObject(CustomDate date, int day) {
+        CustomDate modifiDate = new CustomDate(date.year, date.month, day);
+        return modifiDate;
+    }
+
+    @Override
+    public String toString() {
+        return year + "-" + month + "-" + day;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(int year) {
+        this.year = year;
+    }
+
+    public int getMonth() {
+        return month;
+    }
+
+    public void setMonth(int month) {
+        this.month = month;
+    }
+
+    public int getDay() {
+        return day;
+    }
+
+    public void setDay(int day) {
+        this.day = day;
+    }
+
+    public int getWeek() {
+        return week;
+    }
+
+    public void setWeek(int week) {
+        this.week = week;
+    }
+
+}

+ 119 - 0
workbenches/src/main/java/com/yingyang/workbenches/widget/DateUtil.java

@@ -0,0 +1,119 @@
+package com.yingyang.workbenches.widget;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * @author 王鹏鹏
+ */
+public class DateUtil {
+
+    public static String[] weekName = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
+
+    public static int getMonthDays(int year, int month) {
+        if (month > 12) {
+            month = 1;
+            year += 1;
+        } else if (month < 1) {
+            month = 12;
+            year -= 1;
+        }
+        int[] arr = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+        int days = 0;
+
+        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
+            arr[1] = 29; // 闰年2月29天
+        }
+
+        try {
+            days = arr[month - 1];
+        } catch (Exception e) {
+            e.getStackTrace();
+        }
+
+        return days;
+    }
+
+    public static int getYear() {
+        return Calendar.getInstance().get(Calendar.YEAR);
+    }
+
+    public static int getMonth() {
+        return Calendar.getInstance().get(Calendar.MONTH) + 1;
+    }
+
+    public static int getCurrentMonthDay() {
+        return Calendar.getInstance().get(Calendar.DAY_OF_MONTH);
+    }
+
+    public static int getWeekDay() {
+        return Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
+    }
+
+    public static int getHour() {
+        return Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
+    }
+
+    public static int getMinute() {
+        return Calendar.getInstance().get(Calendar.MINUTE);
+    }
+
+    public static CustomDate getNextSunday() {
+
+        Calendar c = Calendar.getInstance();
+        c.add(Calendar.DATE, 7 - getWeekDay() + 1);
+        CustomDate date = new CustomDate(c.get(Calendar.YEAR),
+                c.get(Calendar.MONTH) + 1, c.get(Calendar.DAY_OF_MONTH));
+        return date;
+    }
+
+    public static int[] getWeekSunday(int year, int month, int day, int pervious) {
+        int[] time = new int[3];
+        Calendar c = Calendar.getInstance();
+        c.set(Calendar.YEAR, year);
+        c.set(Calendar.MONTH, month);
+        c.set(Calendar.DAY_OF_MONTH, day);
+        c.add(Calendar.DAY_OF_MONTH, pervious);
+        time[0] = c.get(Calendar.YEAR);
+        time[1] = c.get(Calendar.MONTH) + 1;
+        time[2] = c.get(Calendar.DAY_OF_MONTH);
+        return time;
+
+    }
+
+    public static int getWeekDayFromDate(int year, int month) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(getDateFromString(year, month));
+        int week_index = cal.get(Calendar.DAY_OF_WEEK) - 1;
+        if (week_index < 0) {
+            week_index = 0;
+        }
+        return week_index;
+    }
+
+    public static Date getDateFromString(int year, int month) {
+        String dateString = year + "-" + (month > 9 ? month : (0 + month))
+                + "-01";
+        Date date = null;
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            date = sdf.parse(dateString);
+        } catch (ParseException e) {
+            System.out.println(e.getMessage());
+        }
+        return date;
+    }
+
+    public static boolean isToday(CustomDate date) {
+        return (date.year == DateUtil.getYear() &&
+                date.month == DateUtil.getMonth()
+                && date.day == DateUtil.getCurrentMonthDay());
+    }
+
+    public static boolean isCurrentMonth(CustomDate date) {
+        return (date.year == DateUtil.getYear() &&
+                date.month == DateUtil.getMonth());
+    }
+}

+ 61 - 0
workbenches/src/main/res/layout/calendar_pick_view_layout.xml

@@ -0,0 +1,61 @@
+<?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:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    tools:ignore="ResourceName">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/divider_26px"
+        android:orientation="horizontal">
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/sunday" />
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/monday" />
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/tuesday" />
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/wednesday" />
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/thursday" />
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/friday" />
+
+        <TextView
+            style="@style/data_monitor_week_text"
+            android:text="@string/saturday" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:gravity="center"
+        android:orientation="vertical">
+
+        <androidx.viewpager.widget.ViewPager
+            android:id="@+id/vp_calendar"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="center"
+            android:layout_marginTop="@dimen/divider_20px" />
+
+    </LinearLayout>
+
+
+</LinearLayout>

+ 1 - 0
workbenches/src/main/res/values/colors.xml

@@ -54,4 +54,5 @@
     <color name="color_FF92ACFF" tools:ignore="ResourceName">#FF92ACFF</color>
     <color name="color_FFFFB841" tools:ignore="ResourceName">#FFFFB841</color>
     <color name="color_FFA02C" tools:ignore="ResourceName">#FFA02C</color>
+    <color name="coloe_FF9FA5B4" tools:ignore="ResourceName">#FF9FA5B4</color>
 </resources>

+ 9 - 0
workbenches/src/main/res/values/themes.xml

@@ -157,4 +157,13 @@
         <item name="android:paddingEnd">@dimen/divider_18px</item>
         <item name="android:text">@string/there_is_currently_no_data_available</item>
     </style>
+
+    <style name="dateStyle" tools:ignore="ResourceName">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">match_parent</item>
+        <item name="android:layout_weight">1</item>
+        <item name="android:gravity">center</item>
+        <item name="android:textColor">@color/coloe_FF9FA5B4</item>
+        <item name="android:textSize">@dimen/divider_24px</item>
+    </style>
 </resources>