Bläddra i källkod

crm,oa主页面UI调整

RaoMeng 9 år sedan
förälder
incheckning
d8d42c7e5f

+ 8 - 9
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/CalendarView.java

@@ -5,7 +5,6 @@ import android.graphics.Canvas;
 import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Path;
-import android.graphics.Typeface;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
 import android.view.View;
@@ -17,7 +16,7 @@ import java.util.Date;
  * 日历控件 功能:获得点选的日期区间
  * update by:Bitliker 2016/07/11
  */
-public class CalendarView extends View implements View.OnTouchListener {
+public class    CalendarView extends View implements View.OnTouchListener {
     private final static String TAG = "anCalendar";
     private Date selectedStartDate;
     private Date selectedEndDate;
@@ -192,10 +191,10 @@ public class CalendarView extends View implements View.OnTouchListener {
         int y = getYByIndex(index);
         float cellY = surface.monthHeight + surface.weekHeight + (y - 1)
                 * surface.cellHeight + //当前日期框最上方
-                surface.cellHeight / 2;//当前框的中心Y
+                surface.cellHeight * 9 / 16f;//当前框的中心Y
         float cellX = (surface.cellWidth * (x - 1)) //当前日期框左边框
                 + surface.cellWidth / 2;//当前中心X
-        float radius = Math.min(surface.cellHeight, surface.cellWidth) / 2 - 10;//获取最短的长度的
+        float radius = Math.min(surface.cellHeight, surface.cellWidth) * (3 / 8f);//获取最短的长度的
 // 绘制圆,参数一是中心点的x轴,参数二是中心点的y轴,参数三是半径,参数四是paint对象;
         canvas.drawCircle(cellX, cellY, radius, surface.circlePaint);
     }
@@ -237,10 +236,10 @@ public class CalendarView extends View implements View.OnTouchListener {
 //                - surface.borderWidth, surface.cellBgPaint);
         float cellY = surface.monthHeight + surface.weekHeight + (y - 1)
                 * surface.cellHeight + //当前日期框最上方
-                surface.cellHeight / 2;//当前框的中心Y
+                surface.cellHeight * 9 / 16f;//当前框的中心Y
         float cellX = (surface.cellWidth * (x - 1)) //当前日期框左边框
                 + surface.cellWidth / 2;//当前中心X
-        float radius = Math.min(surface.cellHeight, surface.cellWidth) / 2 - 10;//获取最短的长度的
+        float radius = Math.min(surface.cellHeight, surface.cellWidth) * (3 / 8f);//获取最短的长度的
 // 绘制圆,参数一是中心点的x轴,参数二是中心点的y轴,参数三是半径,参数四是paint对象;
         canvas.drawCircle(cellX, cellY, radius, surface.cellBgPaint);
 
@@ -426,13 +425,13 @@ public class CalendarView extends View implements View.OnTouchListener {
             monthPaint.setAntiAlias(true);
             float textSize = cellHeight * 0.4f;
             monthPaint.setTextSize(textSize);
-            monthPaint.setTypeface(Typeface.DEFAULT_BOLD);
+            //monthPaint.setTypeface(Typeface.DEFAULT_BOLD);
             weekPaint = new Paint();
             weekPaint.setColor(textColor);
             weekPaint.setAntiAlias(true);
             float weekTextSize = weekHeight * 0.6f;
             weekPaint.setTextSize(weekTextSize);
-            weekPaint.setTypeface(Typeface.DEFAULT_BOLD);
+            //weekPaint.setTypeface(Typeface.DEFAULT_BOLD);
             datePaint = new Paint();
 
             datePaint.setColor(textColor);
@@ -445,7 +444,7 @@ public class CalendarView extends View implements View.OnTouchListener {
             circlePaint.setStrokeWidth(3);
             float cellTextSize = cellHeight * 0.5f;
             datePaint.setTextSize(cellTextSize);
-            datePaint.setTypeface(Typeface.DEFAULT_BOLD);
+            //datePaint.setTypeface(Typeface.DEFAULT_BOLD);
             boxPath = new Path();
             boxPath.rLineTo(width, 0);
             boxPath.moveTo(0, monthHeight + weekHeight);

+ 13 - 13
WeiChat/src/main/res/layout/activity_client.xml

@@ -30,12 +30,12 @@
 
                 <ImageButton
                     android:id="@+id/ib_business"
-                    android:layout_width="50dp"
-                    android:layout_height="50dp"
-                    android:background="@drawable/shape_crm_round"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:background="@null"
                     android:layout_gravity="center_horizontal"
                     android:layout_margin="10dp"
-                    android:src="@drawable/tab_icon4" />
+                    android:src="@drawable/tab_icon4"/>
 
                 <TextView
                     android:layout_width="wrap_content"
@@ -53,9 +53,9 @@
 
                 <ImageButton
                     android:id="@+id/ib_customer"
-                    android:layout_width="50dp"
-                    android:layout_height="50dp"
-                    android:background="@drawable/shape_crm_round"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:background="@null"
                     android:layout_margin="10dp"
                     android:layout_gravity="center_horizontal"
                     android:src="@drawable/tab_icon1"  />
@@ -76,9 +76,9 @@
 
                 <ImageButton
                     android:id="@+id/ib_customer_vistor"
-                    android:layout_width="50dp"
-                    android:layout_height="50dp"
-                    android:background="@drawable/shape_crm_round"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:background="@null"
                     android:layout_margin="10dp"
                     android:layout_gravity="center_horizontal"
                     android:src="@drawable/tab_icon2"  />
@@ -99,9 +99,9 @@
 
                 <ImageButton
                     android:id="@+id/ib_waller"
-                    android:layout_width="50dp"
-                    android:layout_height="50dp"
-                    android:background="@drawable/shape_crm_round"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:background="@null"
                     android:layout_margin="10dp"
                     android:layout_gravity="center_horizontal"
                     android:src="@drawable/tab_icon3"  />

+ 10 - 1
WeiChat/src/main/res/layout/activity_oa.xml

@@ -6,6 +6,7 @@
     android:layout_height="match_parent"
     android:focusable="true"
     android:focusableInTouchMode="true"
+    android:background="@color/white"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.ClientActivity">
 
     <LinearLayout
@@ -383,10 +384,18 @@
             android:numColumns="7"
             android:visibility="gone" />
 
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="10dp"
+            android:background="@color/white" />
         <com.xzjmyk.pm.activity.view.CalendarView
             android:id="@+id/oa_picker"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
+            android:layout_height="wrap_content"/>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="10dp"
+            android:background="@color/white" />
 
         <View
             android:layout_width="match_parent"