Browse Source

提交分类: 测试版本;
提交内容: 解决部分字体bug
当前版本: 正式版本6.3.7
是否冲突: 否

RaoMeng 7 năm trước cách đây
mục cha
commit
259dd4e0d3

+ 43 - 56
WeiChat/src/main/res/layout/activity_expense_reimbursement.xml

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:whatever="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
+                xmlns:whatever="http://schemas.android.com/apk/res-auto"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+    >
 
     <ScrollView
         android:layout_width="match_parent"
@@ -22,38 +23,29 @@
             <RelativeLayout
                 style="@style/IMTbleLine2"
                 android:background="@color/white"
-                android:minHeight="40dp">
+                android:padding="10dp">
 
                 <TextView
                     android:id="@+id/name_tv"
                     style="@style/form_relative_left_text"
+                    android:layout_centerVertical="true"
                     android:layout_marginLeft="0dp"
                     android:text="@string/common_title"
                     android:textColor="@color/text_main"
                     android:textSize="15sp" />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="1dp"
-                    android:layout_marginTop="19dp"
-                    android:layout_toRightOf="@id/name_tv"
-                    android:text="*"
-                    android:textColor="@color/red" />
-
                 <com.andreabaccega.widget.FormEditText
                     android:id="@+id/reimbursement_title_fet"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_alignBaseline="@+id/name_tv"
-                    android:layout_alignBottom="@+id/name_tv"
                     android:layout_alignParentEnd="true"
                     android:layout_alignParentRight="true"
+                    android:layout_centerVertical="true"
+                    android:layout_toRightOf="@id/name_tv"
                     android:background="@null"
                     android:gravity="center_vertical|right"
-                    android:hint="@string/common_input2"
+                    android:hint="@string/common_input"
                     android:maxLength="30"
-                    android:padding="10dp"
                     android:textColor="@color/dark_dark_grey"
                     android:textSize="15sp"
                     whatever:customRegexp="^[A-Za-z\u4e00-\u9fa5]{1,30}+$"
@@ -68,8 +60,9 @@
 
             <RelativeLayout
                 style="@style/IMTbleLine2"
-                android:layout_height="40dp"
-                android:background="@color/white">
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:padding="10dp">
 
                 <TextView
                     android:id="@+id/type_left"
@@ -79,17 +72,9 @@
                     android:textColor="@color/text_main"
                     android:textSize="15sp" />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="1dp"
-                    android:layout_marginTop="8dp"
-                    android:layout_toRightOf="@id/type_left"
-                    android:text="*"
-                    android:textColor="@color/red" />
-
-                <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                <com.andreabaccega.widget.FormEditText
                     android:id="@+id/reimbursement_type_fet"
+                    xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_alignParentRight="true"
@@ -97,8 +82,7 @@
                     android:background="@null"
                     android:ellipsize="end"
                     android:gravity="center_vertical|right"
-                    android:hint="@string/common_select1"
-                    android:padding="10dp"
+                    android:hint="@string/common_select"
                     android:singleLine="true"
                     android:textColor="@color/dark_dark_grey"
                     android:textSize="15sp" />
@@ -118,28 +102,19 @@
             <RelativeLayout
                 android:id="@+id/currency_rl"
                 style="@style/IMTbleLine2"
-                android:layout_height="40dp"
-                android:background="@color/white">
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:padding="10dp">
 
 
                 <TextView
-                    android:id="@+id/reimbursement_type"
                     style="@style/form_relative_left_text"
                     android:layout_marginLeft="0dp"
                     android:text="@string/currency"
                     android:textColor="@color/text_main"
                     android:textSize="15sp" />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="1dp"
-                    android:layout_marginTop="8dp"
-                    android:layout_toRightOf="@id/reimbursement_type"
-                    android:text="*"
-                    android:textColor="@color/red" />
-
-                <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                <com.andreabaccega.widget.FormEditText
                     android:id="@+id/reimbursement_currency_fet"
                     android:layout_width="100dp"
                     android:layout_height="wrap_content"
@@ -147,7 +122,6 @@
                     android:layout_centerVertical="true"
                     android:background="@null"
                     android:gravity="center_vertical|right"
-                    android:padding="10dp"
                     android:text="RMB"
                     android:textColor="@color/dark_dark_grey"
                     android:textSize="15sp" />
@@ -170,7 +144,8 @@
 
             <RelativeLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content">
+                android:layout_height="wrap_content"
+                >
 
                 <TextView
                     android:layout_width="wrap_content"
@@ -210,14 +185,16 @@
                     android:layout_marginRight="10dp"
                     android:orientation="vertical">
 
-                    <View style="@style/expense_table_h_1dp" />
+                    <View
+                        style="@style/expense_table_h_1dp" />
 
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="horizontal">
 
-                        <View style="@style/expense_table_v_1dp" />
+                        <View
+                            style="@style/expense_table_v_1dp" />
 
                         <TextView
                             android:layout_width="0dp"
@@ -227,7 +204,8 @@
                             android:paddingLeft="10dp"
                             android:text="@string/type" />
 
-                        <View style="@style/expense_table_v_1dp" />
+                        <View
+                            style="@style/expense_table_v_1dp" />
 
                         <TextView
                             android:layout_width="0dp"
@@ -235,9 +213,11 @@
                             android:layout_gravity="center_vertical"
                             android:layout_weight="2"
                             android:paddingLeft="10dp"
-                            android:text="@string/Amount_of_money" />
+                            android:text="@string/Amount_of_money"
+                            />
 
-                        <View style="@style/expense_table_v_1dp" />
+                        <View
+                            style="@style/expense_table_v_1dp" />
 
                         <TextView
                             android:layout_width="0dp"
@@ -247,10 +227,13 @@
                             android:gravity="center"
                             android:text="@string/common_delete" />
 
-                        <View style="@style/expense_table_v_1dp" />
+                        <View
+                            style="@style/expense_table_v_1dp"
+                            />
                     </LinearLayout>
 
-                    <View style="@style/expense_table_h_1dp" />
+                    <View
+                        style="@style/expense_table_h_1dp" />
                 </LinearLayout>
 
                 <com.core.widget.MyListView
@@ -258,7 +241,9 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="10dp"
-                    android:layout_marginRight="10dp"></com.core.widget.MyListView>
+                    android:layout_marginRight="10dp"
+                    >
+                </com.core.widget.MyListView>
 
                 <LinearLayout
                     android:id="@+id/detail_table_bottom_ll"
@@ -301,7 +286,8 @@
                             android:layout_toRightOf="@id/automatic_calculation_tv"
                             android:text="@string/calculator_name"
                             android:textColor="@color/blue"
-                            android:visibility="gone" />
+                            android:visibility="gone"
+                            />
 
                         <TextView
                             android:id="@+id/sum_money_tv"
@@ -323,7 +309,8 @@
                             android:textColor="@color/text_main" />
                     </RelativeLayout>
 
-                    <View style="@style/expense_table_h_1dp" />
+                    <View
+                        style="@style/expense_table_h_1dp" />
                 </LinearLayout>
 
             </LinearLayout>

+ 18 - 19
WeiChat/src/main/res/layout/activity_meet_details.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/white">
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@color/white">
 
 
     <LinearLayout
@@ -45,19 +45,19 @@
         android:layout_height="wrap_content"
         android:layout_below="@id/top"
         android:background="@color/white"
-        android:paddingRight="10dp"
-        android:paddingLeft="10dp"
         android:paddingBottom="10dp"
+        android:paddingLeft="10dp"
+        android:paddingRight="10dp"
         android:paddingTop="@dimen/padding">
 
         <TextView
             android:id="@+id/name_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:textColor="#333333"
-            android:textStyle="bold"
             android:text="标题"
-            android:textSize="@dimen/text_main" />
+            android:textColor="#333333"
+            android:textSize="@dimen/text_main"
+            android:textStyle="bold" />
 
         <TextView
             android:id="@+id/status_tv"
@@ -172,6 +172,7 @@
             android:layout_alignLeft="@id/addr_tv"
             android:layout_alignTop="@id/user"
             android:textColor="@color/text_hine" />
+
         <TextView
             android:id="@+id/tag"
             android:layout_width="wrap_content"
@@ -191,6 +192,7 @@
             android:layout_alignTop="@id/tag"
             android:text="无"
             android:textColor="#666666" />
+
         <TextView
             android:id="@+id/sub"
             android:layout_width="wrap_content"
@@ -215,8 +217,6 @@
             android:textColor="#666666" />
 
 
-
-
     </RelativeLayout>
 
     <Button
@@ -256,32 +256,31 @@
             android:textColor="#1084D1" />
     </LinearLayout>
 
-    <RelativeLayout
+    <LinearLayout
         android:id="@+id/baidu_ll"
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_below="@+id/click_ll"
         android:layout_marginLeft="10dp"
-        android:layout_marginTop="10dp">
+        android:layout_marginTop="10dp"
+        android:layout_marginRight="10dp"
+        android:orientation="horizontal">
 
         <TextView
             android:id="@+id/location_tv"
-            android:layout_width="wrap_content"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_marginRight="10dp"
-            android:ellipsize="end"
-            android:lines="1" />
+            android:layout_weight="1" />
 
         <TextView
             android:id="@+id/location_tag"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginRight="30dp"
-            android:layout_toRightOf="@id/location_tv"
             android:clickable="true"
             android:text="@string/agare"
             android:textColor="#1084D1" />
-    </RelativeLayout>
+    </LinearLayout>
 
     <TextView
         android:id="@+id/end_meet_tv"

+ 5 - 5
WeiChat/src/main/res/layout/activity_work.xml

@@ -103,7 +103,7 @@
                 android:drawablePadding="8dp"
                 android:text="@string/this_position"
                 android:textColor="#000000"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/office_addr"
@@ -113,7 +113,7 @@
                 android:drawablePadding="5dp"
                 android:gravity="center_horizontal"
                 android:textColor="@color/text_hine"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
         </LinearLayout>
 
         <LinearLayout
@@ -131,7 +131,7 @@
                 android:drawablePadding="8dp"
                 android:text="@string/long_company"
                 android:textColor="#000000"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/unoffice_mm"
@@ -140,7 +140,7 @@
                 android:layout_gravity="center"
                 android:layout_weight="1"
                 android:textColor="@color/text_hine"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/unoffice_"
@@ -150,7 +150,7 @@
                 android:layout_marginRight="10dp"
                 android:text="@string/unoffice"
                 android:textColor="#f17e21"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
         </LinearLayout>
 
 

+ 4 - 4
WeiChat/src/main/res/values/dimens.xml

@@ -35,10 +35,10 @@
     <dimen name="item_me_height">80.0dip</dimen>
     <dimen name="item_img_height">48dp</dimen>
     <dimen name="item_img_width">48dp</dimen>
-    <dimen name="BigTextSize">17.0dip</dimen>
-    <dimen name="NormalTextSize">16.0dip</dimen>
-    <dimen name="HintTextSize">14.0dip</dimen>
-    <dimen name="SmallerTextSize">13.0dip</dimen>
+    <dimen name="BigTextSize">17.0dp</dimen>
+    <dimen name="NormalTextSize">16.0dp</dimen>
+    <dimen name="HintTextSize">14.0dp</dimen>
+    <dimen name="SmallerTextSize">13.0sp</dimen>
     <dimen name="emotion_height">180dp</dimen>
     <dimen name="padding">8dp</dimen>
     <dimen name="paddingApp">8dp</dimen>

+ 451 - 392
app_core/common/src/main/java/com/common/system/SystemUtil.java

@@ -21,6 +21,12 @@ import android.provider.Settings;
 import android.support.v4.app.ActivityCompat;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
+import android.util.DisplayMetrics;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.PopupWindow;
+import android.widget.TextView;
 
 import com.afollestad.materialdialogs.MaterialDialog;
 import com.common.LogUtil;
@@ -47,396 +53,449 @@ import java.util.UUID;
  */
 public class SystemUtil {
 
-	public static void turn2SetIntent(Context ct) {
-		Uri packageURI = Uri.parse("package:" + getCurrentPkgName(ct));
-		Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageURI);
-		ct.startActivity(intent);
-	}
-
-	/*判断是否手机插入Sd卡*/
-	public static boolean sdCardUseable() {
-		return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
-	}
-
-	/*复制文本到剪切板*/
-	public static void copyText(Context context, String text) {
-		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
-			android.content.ClipboardManager clipboardManager = (android.content.ClipboardManager) context
-					.getSystemService(Context.CLIPBOARD_SERVICE);
-			ClipData clipData = ClipData.newPlainText("label", text);
-			clipboardManager.setPrimaryClip(clipData);
-		} else {
-			android.text.ClipboardManager clipboardManager = (android.text.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
-			clipboardManager.setText(text);
-		}
-	}
-
-	/*获取Sd卡的总容量*/
-	@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
-	public static long getSdCardTotalSize() {
-		if (!sdCardUseable()) {
-			return 0;
-		}
-		// 取得SD卡文件路径
-		File path = Environment.getExternalStorageDirectory();
-		StatFs sf = new StatFs(path.getPath());
-		// 获取单个数据块的大小(Byte)
-		long blockSize = sf.getBlockSizeLong();
-		// 获取所有数据块数
-		long allBlocks = sf.getBlockCountLong();
-		// 返回SD卡大小
-		return (allBlocks * blockSize) / 1024 / 1024; // 单位MB
-	}
-
-	/*获取Sd卡的可用容量*/
-	@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
-	public static long getSdCardFreeSize() {
-		if (!sdCardUseable()) {
-			return 0;
-		}
-		// 取得SD卡文件路径
-		File path = Environment.getExternalStorageDirectory();
-		StatFs sf = new StatFs(path.getPath());
-		// 获取单个数据块的大小(Byte)
-		long blockSize = sf.getBlockSizeLong();
-		// 空闲的数据块的数量
-		long freeBlocks = sf.getAvailableBlocksLong();
-		// 返回SD卡空闲大小
-		// return freeBlocks * blockSize; //单位Byte
-		// return (freeBlocks * blockSize)/1024; //单位KB
-		return (freeBlocks * blockSize) / 1024 / 1024; // 单位MB
-	}
-
-	/*获取 开机时间*/
-	public static String getBootTimeString() {
-		long ut = SystemClock.elapsedRealtime() / 1000;
-		int h = (int) ((ut / 3600));
-		int m = (int) ((ut / 60) % 60);
-		LogUtil.i("ApiUtil", h + ":" + m);
-		return h + ":" + m;
-	}
-
-	/*获取 系统信息*/
-	public static String getSystemInfo() {
-		Date date = new Date(System.currentTimeMillis());
-		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		String time = dateFormat.format(date);
-		StringBuilder sb = new StringBuilder();
-		sb.append("_______  系统信息  ").append(time).append(" ______________");
-		sb.append("\nID                 :").append(Build.ID);
-		sb.append("\nBRAND              :").append(Build.BRAND);
-		sb.append("\nMODEL              :").append(Build.MODEL);
-		sb.append("\nRELEASE            :").append(Build.VERSION.RELEASE);
-		sb.append("\nSDK                :").append(Build.VERSION.SDK);
-
-		sb.append("\n_______ OTHER _______");
-		sb.append("\nBOARD              :").append(Build.BOARD);
-		sb.append("\nPRODUCT            :").append(Build.PRODUCT);
-		sb.append("\nDEVICE             :").append(Build.DEVICE);
-		sb.append("\nFINGERPRINT        :").append(Build.FINGERPRINT);
-		sb.append("\nHOST               :").append(Build.HOST);
-		sb.append("\nTAGS               :").append(Build.TAGS);
-		sb.append("\nTYPE               :").append(Build.TYPE);
-		sb.append("\nTIME               :").append(Build.TIME);
-		sb.append("\nINCREMENTAL        :").append(Build.VERSION.INCREMENTAL);
-
-		sb.append("\n_______ CUPCAKE-3 _______");
-		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
-			sb.append("\nDISPLAY            :").append(Build.DISPLAY);
-		}
-
-		sb.append("\n_______ DONUT-4 _______");
-		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.DONUT) {
-			sb.append("\nSDK_INT            :").append(Build.VERSION.SDK_INT);
-			sb.append("\nMANUFACTURER       :").append(Build.MANUFACTURER);
-			sb.append("\nBOOTLOADER         :").append(Build.BOOTLOADER);
-			sb.append("\nCPU_ABI            :").append(Build.CPU_ABI);
-			sb.append("\nCPU_ABI2           :").append(Build.CPU_ABI2);
-			sb.append("\nHARDWARE           :").append(Build.HARDWARE);
-			sb.append("\nUNKNOWN            :").append(Build.UNKNOWN);
-			sb.append("\nCODENAME           :").append(Build.VERSION.CODENAME);
-		}
-
-		sb.append("\n_______ GINGERBREAD-9 _______");
-		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
-			sb.append("\nSERIAL             :").append(Build.SERIAL);
-		}
-		LogUtil.d(sb.toString());
-		return sb.toString();
-	}
-
-	public static String getMac(Context ct) {
-		return MacUtil.getMac(ct);
-	}
-
-	/* 获取手机唯一序列号 */
-	public static String getDeviceId(Context context) {
-		try {
-			TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
-			String deviceId = tm.getDeviceId();// 手机设备ID,这个ID会被用为用户访问统计
-			if (deviceId == null) {
-				deviceId = UUID.randomUUID().toString().replaceAll("-", "");
-			}
-			return deviceId;
-		} catch (Exception e) {
-			e.printStackTrace();
-			return null;
-		}
-	}
-
-	/* 获取操作系统版本号 */
-	public static String getOsVersion() {
-		return android.os.Build.VERSION.RELEASE;
-	}
-
-	/* 获取操作系统版本号 */
-	public static int getSdkVersion() {
-		return android.os.Build.VERSION.SDK_INT;
-	}
-
-	/* 获取手机型号 */
-	public static String getModel() {
-		return android.os.Build.MODEL;
-	}
-
-	/* 获取app的版本信息 */
-	public static int getVersionCode(Context context) {
-		PackageManager manager = context.getPackageManager();
-		try {
-			PackageInfo packageInfo = manager.getPackageInfo(context.getPackageName(), 0);
-			return packageInfo.versionCode;// 系统版本号
-		} catch (PackageManager.NameNotFoundException e) {
-			e.printStackTrace();
-		}
-		return 0;
-	}
-
-	/* 获取app的版本名 */
-	public static String getVersionName(Context context) {
-		PackageManager manager = context.getPackageManager();
-		try {
-			PackageInfo packageInfo = manager.getPackageInfo(context.getPackageName(), 0);
-			return packageInfo.versionName;// 系统版本名
-		} catch (PackageManager.NameNotFoundException e) {
-			e.printStackTrace();
-		}
-		return "";
-	}
-
-	public static String getDeviceInfo() {
-		try {
-			org.json.JSONObject json = new org.json.JSONObject();
-			android.telephony.TelephonyManager tm = (android.telephony.TelephonyManager) BaseConfig.getContext()
-					.getSystemService(Context.TELEPHONY_SERVICE);
-			String device_id = null;
-			if (PermissionUtil.lacksPermissions(BaseConfig.getContext(), Manifest.permission.READ_PHONE_STATE)) {
-				device_id = tm.getDeviceId();
-			}
-			String mac = null;
-			FileReader fstream = null;
-			try {
-				fstream = new FileReader("/sys/class/net/wlan0/address");
-			} catch (FileNotFoundException e) {
-				fstream = new FileReader("/sys/class/net/eth0/address");
-			}
-			BufferedReader in = null;
-			if (fstream != null) {
-				try {
-					in = new BufferedReader(fstream, 1024);
-					mac = in.readLine();
-				} catch (IOException e) {
-				} finally {
-					if (fstream != null) {
-						try {
-							fstream.close();
-						} catch (IOException e) {
-							e.printStackTrace();
-						}
-					}
-					if (in != null) {
-						try {
-							in.close();
-						} catch (IOException e) {
-							e.printStackTrace();
-						}
-					}
-				}
-			}
-			json.put("mac", mac);
-			if (TextUtils.isEmpty(device_id)) {
-				device_id = mac;
-			}
-			if (TextUtils.isEmpty(device_id)) {
-				device_id = android.provider.Settings.Secure.getString(BaseConfig.getContext().getContentResolver(),
-						android.provider.Settings.Secure.ANDROID_ID);
-			}
-			json.put("device_id", device_id);
-			return json.toString();
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return null;
-	}
-
-
-	/**
-	 *   附:Wifi状态有以下几种:(括号内为所对应的的int值)
-	 *   1. WifiManager.WIFI_STATE_DISABLED (1)   //禁用WiFi状态
-	 *   2. WifiManager.WIFI_STATE_ENABLED (3)  //WiFi启用状态
-	 *   3. WifiManager.WIFI_STATE_DISABLING (0)  //禁用WiFi状态
-	 *   4  WifiManager.WIFI_STATE_ENABLING  (2)    //可以启动wifi
-	 *
-	 * @param context
-	 * @return
-	 */
-	public static int getWifiStatus(Context context) {
-		WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-		if (wifiManager != null) {
-			return wifiManager.getWifiState();
-		}
-		return 0;
-	}
-
-	public static boolean isBackground(Context context) {
-		ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
-		List<ActivityManager.RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
-		for (ActivityManager.RunningAppProcessInfo appProcess : appProcesses) {
-			if (appProcess.processName.equals(context.getPackageName())) {
-				if (appProcess.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_BACKGROUND) {
-					return true;
-				} else {
-					return false;
-				}
-			}
-		}
-		return false;
-	}
-
-	public static boolean isNetWorkConnected(Context context) {
-		if (context != null) {
-			ConnectivityManager mConnectivityManager = (ConnectivityManager) context
-					.getSystemService(Context.CONNECTIVITY_SERVICE);
-			NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo();
-			if (mNetworkInfo != null) {
-				return mNetworkInfo.isAvailable();
-			}
-		}
-		return false;
-	}
-
-	public static void phoneAction(final BaseActivity mContext, final String phone) {
-		if (mContext == null) {
-			return;
-		}
-		if (!StringUtil.isMobileNumber(phone)) {
-			ToastUtil.showToast(mContext, R.string.phone_number_format_error);
-			return;
-		}
-		MaterialDialog dialog = new MaterialDialog.Builder(mContext).title(R.string.dialog_confim_phone).content(mContext.getString(R.string.dialog_phone) + phone)
-				.positiveText(R.string.dialog_phone_action).negativeText(R.string.common_cancel).autoDismiss(false).callback(new MaterialDialog.ButtonCallback() {
-					@Override
-					public void onPositive(MaterialDialog dialog) {
-						mContext.requestPermission(Manifest.permission.CALL_PHONE, new Runnable() {
-							@Override
-							public void run() {
-								// 用intent启动拨打电话
-								Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));
-								if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
-									//预防万一
-									return;
-								}
-								mContext.startActivity(intent);
-							}
-						}, new Runnable() {
-							@Override
-							public void run() {
-								ToastUtil.showToast(mContext, R.string.not_system_permission);
-							}
-						});
-						dialog.dismiss();
-					}
-
-					@Override
-					public void onNegative(MaterialDialog dialog) {
-						super.onNegative(dialog);
-						dialog.dismiss();
-					}
-				}).build();
-
-		dialog.show();
-	}
-
-	@Deprecated
-	public static void phoneAction(final Context mContext, final String phone) {
-		if (mContext == null) return;
-		if (mContext instanceof BaseActivity) {
-			phoneAction((BaseActivity) mContext, phone);
-		} else {
-			if (!PermissionUtil.lacksPermissions(mContext, Manifest.permission.CALL_PHONE)) {
-				MaterialDialog dialog = new MaterialDialog.Builder(mContext).title(R.string.dialog_confim_phone).content(mContext.getString(R.string.dialog_phone) + phone)
-						.positiveText(R.string.dialog_phone_action).negativeText(R.string.common_cancel).autoDismiss(false).callback(new MaterialDialog.ButtonCallback() {
-							@Override
-							public void onPositive(MaterialDialog dialog) {
-								// 用intent启动拨打电话
-								Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));
-								if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
-									return;
-								}
-								mContext.startActivity(intent);
-								dialog.dismiss();
-							}
-
-							@Override
-							public void onNegative(MaterialDialog dialog) {
-								super.onNegative(dialog);
-								dialog.dismiss();
-							}
-						}).build();
-
-				dialog.show();
-			} else if (mContext instanceof Activity) {
-				PermissionUtil.requestPermission((Activity) mContext, PermissionUtil.DEFAULT_REQUEST, Manifest.permission.CALL_PHONE);
-			}
-		}
-	}
-
-	/**
-	 * android 5.0之后如何获取当前运行的应用包名?
-	 *
-	 * @param context
-	 * @return
-	 */
-	public static String getCurrentPkgName(Context context) {
-		ActivityManager.RunningAppProcessInfo currentInfo = null;
-		Field field = null;
-		int START_TASK_TO_FRONT = 2;
-		String pkgName = null;
-		try {
-			field = ActivityManager.RunningAppProcessInfo.class.getDeclaredField("processState");
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
-		List appList = am.getRunningAppProcesses();
-		List<ActivityManager.RunningAppProcessInfo> processes = ((ActivityManager) context.getSystemService(
-				Context.ACTIVITY_SERVICE)).getRunningAppProcesses();
-		for (ActivityManager.RunningAppProcessInfo app : processes) {
-			if (app.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {
-				Integer state = null;
-				try {
-					state = field.getInt(app);
-				} catch (Exception e) {
-					e.printStackTrace();
-				}
-				if (state != null && state == START_TASK_TO_FRONT) {
-					currentInfo = app;
-					break;
-				}
-			}
-		}
-		if (currentInfo != null) {
-			pkgName = currentInfo.processName;
-		}
-		return pkgName;
-	}
+    public static void turn2SetIntent(Context ct) {
+        Uri packageURI = Uri.parse("package:" + getCurrentPkgName(ct));
+        Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, packageURI);
+        ct.startActivity(intent);
+    }
+
+    /*判断是否手机插入Sd卡*/
+    public static boolean sdCardUseable() {
+        return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
+    }
+
+    /*复制文本到剪切板*/
+    public static void copyText(Context context, String text) {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+            android.content.ClipboardManager clipboardManager = (android.content.ClipboardManager) context
+                    .getSystemService(Context.CLIPBOARD_SERVICE);
+            ClipData clipData = ClipData.newPlainText("label", text);
+            clipboardManager.setPrimaryClip(clipData);
+        } else {
+            android.text.ClipboardManager clipboardManager = (android.text.ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
+            clipboardManager.setText(text);
+        }
+    }
+
+    /*获取Sd卡的总容量*/
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
+    public static long getSdCardTotalSize() {
+        if (!sdCardUseable()) {
+            return 0;
+        }
+        // 取得SD卡文件路径
+        File path = Environment.getExternalStorageDirectory();
+        StatFs sf = new StatFs(path.getPath());
+        // 获取单个数据块的大小(Byte)
+        long blockSize = sf.getBlockSizeLong();
+        // 获取所有数据块数
+        long allBlocks = sf.getBlockCountLong();
+        // 返回SD卡大小
+        return (allBlocks * blockSize) / 1024 / 1024; // 单位MB
+    }
+
+    /*获取Sd卡的可用容量*/
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
+    public static long getSdCardFreeSize() {
+        if (!sdCardUseable()) {
+            return 0;
+        }
+        // 取得SD卡文件路径
+        File path = Environment.getExternalStorageDirectory();
+        StatFs sf = new StatFs(path.getPath());
+        // 获取单个数据块的大小(Byte)
+        long blockSize = sf.getBlockSizeLong();
+        // 空闲的数据块的数量
+        long freeBlocks = sf.getAvailableBlocksLong();
+        // 返回SD卡空闲大小
+        // return freeBlocks * blockSize; //单位Byte
+        // return (freeBlocks * blockSize)/1024; //单位KB
+        return (freeBlocks * blockSize) / 1024 / 1024; // 单位MB
+    }
+
+    /*获取 开机时间*/
+    public static String getBootTimeString() {
+        long ut = SystemClock.elapsedRealtime() / 1000;
+        int h = (int) ((ut / 3600));
+        int m = (int) ((ut / 60) % 60);
+        LogUtil.i("ApiUtil", h + ":" + m);
+        return h + ":" + m;
+    }
+
+    /*获取 系统信息*/
+    public static String getSystemInfo() {
+        Date date = new Date(System.currentTimeMillis());
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        String time = dateFormat.format(date);
+        StringBuilder sb = new StringBuilder();
+        sb.append("_______  系统信息  ").append(time).append(" ______________");
+        sb.append("\nID                 :").append(Build.ID);
+        sb.append("\nBRAND              :").append(Build.BRAND);
+        sb.append("\nMODEL              :").append(Build.MODEL);
+        sb.append("\nRELEASE            :").append(Build.VERSION.RELEASE);
+        sb.append("\nSDK                :").append(Build.VERSION.SDK);
+
+        sb.append("\n_______ OTHER _______");
+        sb.append("\nBOARD              :").append(Build.BOARD);
+        sb.append("\nPRODUCT            :").append(Build.PRODUCT);
+        sb.append("\nDEVICE             :").append(Build.DEVICE);
+        sb.append("\nFINGERPRINT        :").append(Build.FINGERPRINT);
+        sb.append("\nHOST               :").append(Build.HOST);
+        sb.append("\nTAGS               :").append(Build.TAGS);
+        sb.append("\nTYPE               :").append(Build.TYPE);
+        sb.append("\nTIME               :").append(Build.TIME);
+        sb.append("\nINCREMENTAL        :").append(Build.VERSION.INCREMENTAL);
+
+        sb.append("\n_______ CUPCAKE-3 _______");
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) {
+            sb.append("\nDISPLAY            :").append(Build.DISPLAY);
+        }
+
+        sb.append("\n_______ DONUT-4 _______");
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.DONUT) {
+            sb.append("\nSDK_INT            :").append(Build.VERSION.SDK_INT);
+            sb.append("\nMANUFACTURER       :").append(Build.MANUFACTURER);
+            sb.append("\nBOOTLOADER         :").append(Build.BOOTLOADER);
+            sb.append("\nCPU_ABI            :").append(Build.CPU_ABI);
+            sb.append("\nCPU_ABI2           :").append(Build.CPU_ABI2);
+            sb.append("\nHARDWARE           :").append(Build.HARDWARE);
+            sb.append("\nUNKNOWN            :").append(Build.UNKNOWN);
+            sb.append("\nCODENAME           :").append(Build.VERSION.CODENAME);
+        }
+
+        sb.append("\n_______ GINGERBREAD-9 _______");
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
+            sb.append("\nSERIAL             :").append(Build.SERIAL);
+        }
+        LogUtil.d(sb.toString());
+        return sb.toString();
+    }
+
+    public static String getMac(Context ct) {
+        return MacUtil.getMac(ct);
+    }
+
+    /* 获取手机唯一序列号 */
+    public static String getDeviceId(Context context) {
+        try {
+            TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+            String deviceId = tm.getDeviceId();// 手机设备ID,这个ID会被用为用户访问统计
+            if (deviceId == null) {
+                deviceId = UUID.randomUUID().toString().replaceAll("-", "");
+            }
+            return deviceId;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    /* 获取操作系统版本号 */
+    public static String getOsVersion() {
+        return android.os.Build.VERSION.RELEASE;
+    }
+
+    /* 获取操作系统版本号 */
+    public static int getSdkVersion() {
+        return android.os.Build.VERSION.SDK_INT;
+    }
+
+    /* 获取手机型号 */
+    public static String getModel() {
+        return android.os.Build.MODEL;
+    }
+
+    /* 获取app的版本信息 */
+    public static int getVersionCode(Context context) {
+        PackageManager manager = context.getPackageManager();
+        try {
+            PackageInfo packageInfo = manager.getPackageInfo(context.getPackageName(), 0);
+            return packageInfo.versionCode;// 系统版本号
+        } catch (PackageManager.NameNotFoundException e) {
+            e.printStackTrace();
+        }
+        return 0;
+    }
+
+    /* 获取app的版本名 */
+    public static String getVersionName(Context context) {
+        PackageManager manager = context.getPackageManager();
+        try {
+            PackageInfo packageInfo = manager.getPackageInfo(context.getPackageName(), 0);
+            return packageInfo.versionName;// 系统版本名
+        } catch (PackageManager.NameNotFoundException e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+
+    public static String getDeviceInfo() {
+        try {
+            org.json.JSONObject json = new org.json.JSONObject();
+            android.telephony.TelephonyManager tm = (android.telephony.TelephonyManager) BaseConfig.getContext()
+                    .getSystemService(Context.TELEPHONY_SERVICE);
+            String device_id = null;
+            if (PermissionUtil.lacksPermissions(BaseConfig.getContext(), Manifest.permission.READ_PHONE_STATE)) {
+                device_id = tm.getDeviceId();
+            }
+            String mac = null;
+            FileReader fstream = null;
+            try {
+                fstream = new FileReader("/sys/class/net/wlan0/address");
+            } catch (FileNotFoundException e) {
+                fstream = new FileReader("/sys/class/net/eth0/address");
+            }
+            BufferedReader in = null;
+            if (fstream != null) {
+                try {
+                    in = new BufferedReader(fstream, 1024);
+                    mac = in.readLine();
+                } catch (IOException e) {
+                } finally {
+                    if (fstream != null) {
+                        try {
+                            fstream.close();
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                    if (in != null) {
+                        try {
+                            in.close();
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            }
+            json.put("mac", mac);
+            if (TextUtils.isEmpty(device_id)) {
+                device_id = mac;
+            }
+            if (TextUtils.isEmpty(device_id)) {
+                device_id = android.provider.Settings.Secure.getString(BaseConfig.getContext().getContentResolver(),
+                        android.provider.Settings.Secure.ANDROID_ID);
+            }
+            json.put("device_id", device_id);
+            return json.toString();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+
+    /**
+     *   附:Wifi状态有以下几种:(括号内为所对应的的int值)
+     *   1. WifiManager.WIFI_STATE_DISABLED (1)   //禁用WiFi状态
+     *   2. WifiManager.WIFI_STATE_ENABLED (3)  //WiFi启用状态
+     *   3. WifiManager.WIFI_STATE_DISABLING (0)  //禁用WiFi状态
+     *   4  WifiManager.WIFI_STATE_ENABLING  (2)    //可以启动wifi
+     *
+     * @param context
+     * @return
+     */
+    public static int getWifiStatus(Context context) {
+        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
+        if (wifiManager != null) {
+            return wifiManager.getWifiState();
+        }
+        return 0;
+    }
+
+    public static boolean isBackground(Context context) {
+        ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+        List<ActivityManager.RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
+        for (ActivityManager.RunningAppProcessInfo appProcess : appProcesses) {
+            if (appProcess.processName.equals(context.getPackageName())) {
+                if (appProcess.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_BACKGROUND) {
+                    return true;
+                } else {
+                    return false;
+                }
+            }
+        }
+        return false;
+    }
+
+    public static boolean isNetWorkConnected(Context context) {
+        if (context != null) {
+            ConnectivityManager mConnectivityManager = (ConnectivityManager) context
+                    .getSystemService(Context.CONNECTIVITY_SERVICE);
+            NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo();
+            if (mNetworkInfo != null) {
+                return mNetworkInfo.isAvailable();
+            }
+        }
+        return false;
+    }
+
+    public static void phoneAction(final BaseActivity mContext, final String phone) {
+        if (mContext == null) {
+            return;
+        }
+        if (!StringUtil.isMobileNumber(phone)) {
+            ToastUtil.showToast(mContext, R.string.phone_number_format_error);
+            return;
+        }
+
+        final PopupWindow window = new PopupWindow(mContext);
+        View view = LayoutInflater.from(mContext).inflate(R.layout.item_select_alert_pop, null);
+        window.setContentView(view);
+        window.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.pop_round_bg));
+        DisplayUtil.backgroundAlpha(mContext, 0.4f);
+        window.setTouchable(true);
+        setPopupWindowHW((Activity) mContext, window);
+        window.setOutsideTouchable(false);
+        window.setFocusable(true);
+        TextView title_tv = (TextView) view.findViewById(R.id.title_tv);
+        TextView message_tv = (TextView) view.findViewById(R.id.message_tv);
+        TextView sure_tv = (TextView) view.findViewById(R.id.sure_tv);
+        title_tv.setText(mContext.getString(R.string.dialog_confim_phone));
+        message_tv.setText(mContext.getString(R.string.dialog_phone) + phone);
+        sure_tv.setText(R.string.dialog_phone_action);
+
+        window.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                DisplayUtil.backgroundAlpha(mContext, 1f);
+            }
+        });
+        view.findViewById(R.id.goto_tv).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                window.dismiss();
+            }
+        });
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mContext.requestPermission(Manifest.permission.CALL_PHONE, new Runnable() {
+                    @Override
+                    public void run() {
+                        // 用intent启动拨打电话
+                        Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));
+                        if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
+                            //预防万一
+                            return;
+                        }
+                        mContext.startActivity(intent);
+                    }
+                }, new Runnable() {
+                    @Override
+                    public void run() {
+                        ToastUtil.showToast(mContext, R.string.not_system_permission);
+                    }
+                });
+                window.dismiss();
+            }
+        });
+        window.showAtLocation(view, Gravity.CENTER, 0, 0);
+    }
+
+    @Deprecated
+    public static void phoneAction(final Context mContext, final String phone) {
+        if (mContext == null) return;
+        if (mContext instanceof BaseActivity) {
+            phoneAction((BaseActivity) mContext, phone);
+        } else {
+            if (!PermissionUtil.lacksPermissions(mContext, Manifest.permission.CALL_PHONE)) {
+                final PopupWindow window = new PopupWindow(mContext);
+                View view = LayoutInflater.from(mContext).inflate(R.layout.item_select_alert_pop, null);
+                window.setContentView(view);
+                window.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.pop_round_bg));
+                DisplayUtil.backgroundAlpha(mContext, 0.4f);
+                window.setTouchable(true);
+                setPopupWindowHW((Activity) mContext, window);
+                window.setOutsideTouchable(false);
+                window.setFocusable(true);
+                TextView title_tv = (TextView) view.findViewById(R.id.title_tv);
+                TextView message_tv = (TextView) view.findViewById(R.id.message_tv);
+                TextView sure_tv = (TextView) view.findViewById(R.id.sure_tv);
+                title_tv.setText(mContext.getString(R.string.dialog_confim_phone));
+                message_tv.setText(mContext.getString(R.string.dialog_phone) + phone);
+                sure_tv.setText(R.string.dialog_phone_action);
+
+                window.setOnDismissListener(new PopupWindow.OnDismissListener() {
+                    @Override
+                    public void onDismiss() {
+                        DisplayUtil.backgroundAlpha(mContext, 1f);
+                    }
+                });
+                view.findViewById(R.id.goto_tv).setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        window.dismiss();
+                    }
+                });
+                sure_tv.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        // 用intent启动拨打电话
+                        Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phone));
+                        if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
+                            return;
+                        }
+                        mContext.startActivity(intent);
+                        window.dismiss();
+                    }
+                });
+                window.showAtLocation(view, Gravity.CENTER, 0, 0);
+            } else if (mContext instanceof Activity) {
+                PermissionUtil.requestPermission((Activity) mContext, PermissionUtil.DEFAULT_REQUEST, Manifest.permission.CALL_PHONE);
+            }
+        }
+    }
+
+    public static void setPopupWindowHW(Activity ct, PopupWindow window) {
+        window.getContentView().measure(0, 0);
+        window.setHeight(window.getContentView().getMeasuredHeight() + 30);
+        window.setWidth(getWidth(ct));
+    }
+
+    private static int getWidth(Activity ct) {
+        DisplayMetrics dm = new DisplayMetrics();
+        ct.getWindowManager().getDefaultDisplay().getMetrics(dm);
+        return (int) (dm.widthPixels * (0.8));
+    }
+
+    /**
+     * android 5.0之后如何获取当前运行的应用包名?
+     *
+     * @param context
+     * @return
+     */
+    public static String getCurrentPkgName(Context context) {
+        ActivityManager.RunningAppProcessInfo currentInfo = null;
+        Field field = null;
+        int START_TASK_TO_FRONT = 2;
+        String pkgName = null;
+        try {
+            field = ActivityManager.RunningAppProcessInfo.class.getDeclaredField("processState");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+        List appList = am.getRunningAppProcesses();
+        List<ActivityManager.RunningAppProcessInfo> processes = ((ActivityManager) context.getSystemService(
+                Context.ACTIVITY_SERVICE)).getRunningAppProcesses();
+        for (ActivityManager.RunningAppProcessInfo app : processes) {
+            if (app.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {
+                Integer state = null;
+                try {
+                    state = field.getInt(app);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                if (state != null && state == START_TASK_TO_FRONT) {
+                    currentInfo = app;
+                    break;
+                }
+            }
+        }
+        if (currentInfo != null) {
+            pkgName = currentInfo.processName;
+        }
+        return pkgName;
+    }
 }

+ 89 - 69
app_core/common/src/main/res/layout/activity_expense_reimbursement.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:whatever="http://schemas.android.com/apk/res-auto"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
+                xmlns:whatever="http://schemas.android.com/apk/res-auto"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
     >
 
     <ScrollView
@@ -22,8 +22,8 @@
 
             <RelativeLayout
                 style="@style/IMTbleLine2"
-                android:minHeight="40dp"
-                android:background="@color/white">
+                android:background="@color/white"
+                android:minHeight="40dp">
 
                 <TextView
                     android:id="@+id/name_tv"
@@ -41,6 +41,7 @@
                     android:layout_alignParentEnd="true"
                     android:layout_alignParentRight="true"
                     android:layout_marginBottom="13dp"
+                    android:layout_toRightOf="@id/name_tv"
                     android:background="@null"
                     android:gravity="center_vertical|right"
                     android:hint="@string/common_input"
@@ -60,8 +61,9 @@
 
             <RelativeLayout
                 style="@style/IMTbleLine2"
-                android:layout_height="40dp"
-                android:background="@color/white">
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:padding="10dp">
 
                 <TextView
                     android:id="@+id/type_left"
@@ -71,20 +73,19 @@
                     android:textColor="@color/text_main"
                     android:textSize="15sp" />
 
-                <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                    android:layout_toRightOf="@+id/type_left"
-                    android:id="@+id/reimbursement_type_fet"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_alignParentRight="true"
-                    android:background="@null"
-                    android:gravity="center_vertical|right"
-                    android:hint="@string/common_select"
-                    android:padding="10dp"
-                    android:textColor="@color/dark_dark_grey"
-                    android:textSize="15sp"
-                    android:singleLine="true"
-                    android:ellipsize="end"/>
+                <com.andreabaccega.widget.FormEditText android:id="@+id/reimbursement_type_fet"
+                                                       xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                                                       android:layout_width="wrap_content"
+                                                       android:layout_height="wrap_content"
+                                                       android:layout_alignParentRight="true"
+                                                       android:layout_toRightOf="@+id/type_left"
+                                                       android:background="@null"
+                                                       android:ellipsize="end"
+                                                       android:gravity="center_vertical|right"
+                                                       android:hint="@string/common_select"
+                                                       android:singleLine="true"
+                                                       android:textColor="@color/dark_dark_grey"
+                                                       android:textSize="15sp" />
 
                 <ImageView
                     style="@style/IMTbleLine_ArrowImg"
@@ -101,8 +102,9 @@
             <RelativeLayout
                 android:id="@+id/currency_rl"
                 style="@style/IMTbleLine2"
-                android:layout_height="40dp"
-                android:background="@color/white">
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:padding="10dp">
 
 
                 <TextView
@@ -120,10 +122,9 @@
                     android:layout_centerVertical="true"
                     android:background="@null"
                     android:gravity="center_vertical|right"
-                    android:padding="10dp"
+                    android:text="RMB"
                     android:textColor="@color/dark_dark_grey"
-                    android:textSize="15sp"
-                    android:text="RMB"/>
+                    android:textSize="15sp" />
 
                 <ImageView
                     style="@style/IMTbleLine_ArrowImg"
@@ -149,21 +150,21 @@
                 <TextView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/Consumer_details"
-                    android:textColor="@color/text_main"
                     android:layout_marginLeft="10dp"
-                    android:layout_marginTop="10dp"/>
+                    android:layout_marginTop="10dp"
+                    android:text="@string/Consumer_details"
+                    android:textColor="@color/text_main" />
 
                 <TextView
                     android:id="@+id/add_details_tv"
                     android:layout_width="100dp"
                     android:layout_height="wrap_content"
                     android:layout_alignParentRight="true"
-                    android:text="@string/new_add"
-                    android:textColor="@color/blue"
-                    android:padding="10dp"
                     android:layout_marginRight="5dp"
-                    android:gravity="right"/>
+                    android:gravity="right"
+                    android:padding="10dp"
+                    android:text="@string/new_add"
+                    android:textColor="@color/blue" />
             </RelativeLayout>
 
 
@@ -171,58 +172,68 @@
                 android:id="@+id/detail_table_ll"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:layout_alignParentTop="true"
                 android:layout_alignParentLeft="true"
-                android:layout_alignParentStart="true">
+                android:layout_alignParentStart="true"
+                android:layout_alignParentTop="true"
+                android:orientation="vertical">
+
                 <LinearLayout
                     android:id="@+id/detail_table_top_ll"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:orientation="vertical"
                     android:layout_marginLeft="10dp"
-                    android:layout_marginRight="10dp">
+                    android:layout_marginRight="10dp"
+                    android:orientation="vertical">
+
                     <View
-                        style="@style/expense_table_h_1dp"/>
+                        style="@style/expense_table_h_1dp" />
+
                     <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="horizontal">
+
                         <View
-                            style="@style/expense_table_v_1dp"/>
+                            style="@style/expense_table_v_1dp" />
+
                         <TextView
-                            android:text="@string/type"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
                             android:layout_weight="2"
                             android:paddingLeft="10dp"
-                            android:layout_gravity="center_vertical"/>
+                            android:text="@string/type" />
+
                         <View
-                            style="@style/expense_table_v_1dp"/>
+                            style="@style/expense_table_v_1dp" />
+
                         <TextView
-                            android:text="@string/Amount_of_money"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
                             android:layout_weight="2"
                             android:paddingLeft="10dp"
-                            android:layout_gravity="center_vertical"
+                            android:text="@string/Amount_of_money"
                             />
+
                         <View
-                            style="@style/expense_table_v_1dp"/>
+                            style="@style/expense_table_v_1dp" />
+
                         <TextView
-                            android:text="@string/common_delete"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
-                            android:layout_weight="1"
                             android:layout_gravity="center_vertical"
-                            android:gravity="center"/>
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/common_delete" />
+
                         <View
                             style="@style/expense_table_v_1dp"
                             />
                     </LinearLayout>
 
                     <View
-                        style="@style/expense_table_h_1dp"/>
+                        style="@style/expense_table_h_1dp" />
                 </LinearLayout>
 
                 <com.core.widget.MyListView
@@ -233,6 +244,7 @@
                     android:layout_marginRight="10dp"
                     >
                 </com.core.widget.MyListView>
+
                 <LinearLayout
                     android:id="@+id/detail_table_bottom_ll"
                     android:layout_width="match_parent"
@@ -240,75 +252,82 @@
                     android:layout_marginLeft="10dp"
                     android:layout_marginRight="10dp"
                     android:orientation="vertical">
+
                     <RelativeLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content">
 
                         <View
                             android:id="@+id/left_view_v"
-                            style="@style/expense_table_v_1dp"/>
+                            style="@style/expense_table_v_1dp" />
 
                         <View
                             android:id="@+id/right_view_v"
-                            android:layout_alignParentRight="true"
-                            style="@style/expense_table_v_1dp"/>
+                            style="@style/expense_table_v_1dp"
+                            android:layout_alignParentRight="true" />
+
                         <TextView
                             android:id="@+id/automatic_calculation_tv"
-                            android:layout_toRightOf="@id/left_view_v"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="自动计算"
                             android:layout_centerVertical="true"
                             android:layout_marginLeft="10dp"
+                            android:layout_toRightOf="@id/left_view_v"
+                            android:text="自动计算"
                             android:textColor="@color/blue"
-                            android:visibility="gone"/>
+                            android:visibility="gone" />
 
                         <TextView
                             android:id="@+id/i_calculation_tv"
-                            android:layout_toRightOf="@id/automatic_calculation_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/calculator_name"
                             android:layout_centerVertical="true"
                             android:layout_marginLeft="10dp"
+                            android:layout_toRightOf="@id/automatic_calculation_tv"
+                            android:text="@string/calculator_name"
                             android:textColor="@color/blue"
                             android:visibility="gone"
                             />
+
                         <TextView
                             android:id="@+id/sum_money_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_toLeftOf="@+id/right_view_v"
                             android:layout_alignParentRight="true"
-                            android:layout_marginRight="30dp"
                             android:layout_centerVertical="true"
-                            android:textColor="@color/red"/>
+                            android:layout_marginRight="30dp"
+                            android:layout_toLeftOf="@+id/right_view_v"
+                            android:textColor="@color/red" />
+
                         <TextView
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/all_Amount_of_money"
-                            android:layout_toLeftOf="@+id/sum_money_tv"
                             android:layout_centerVertical="true"
                             android:layout_marginRight="10dp"
-                            android:textColor="@color/text_main"/>
+                            android:layout_toLeftOf="@+id/sum_money_tv"
+                            android:text="@string/all_Amount_of_money"
+                            android:textColor="@color/text_main" />
                     </RelativeLayout>
+
                     <View
-                        style="@style/expense_table_h_1dp"/>
+                        style="@style/expense_table_h_1dp" />
                 </LinearLayout>
 
             </LinearLayout>
+
             <View
-                android:layout_marginTop="10dp"
                 android:layout_width="match_parent"
                 android:layout_height="20px"
+                android:layout_marginTop="10dp"
                 android:background="@color/item_line" />
+
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/Add_invoice"
-                android:textColor="@color/text_main"
                 android:layout_marginLeft="10dp"
-                android:layout_marginTop="10dp"/>
+                android:layout_marginTop="10dp"
+                android:text="@string/Add_invoice"
+                android:textColor="@color/text_main" />
 
             <LinearLayout
                 android:id="@+id/select_img_layout"
@@ -328,6 +347,7 @@
                     android:stretchMode="columnWidth"
                     android:verticalSpacing="3dp" />
             </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/bottom_layout"
                 android:layout_width="match_parent"

+ 25 - 25
app_core/common/src/main/res/layout/activity_meet_details.xml

@@ -25,7 +25,7 @@
             android:drawableTop="@drawable/oa_save_meet"
             android:gravity="center"
             android:text="@string/meet_details"
-            android:textColor="@color/white"/>
+            android:textColor="@color/white" />
 
         <TextView
             android:id="@+id/add_task_ll"
@@ -36,7 +36,7 @@
             android:drawableTop="@drawable/oa_add_task"
             android:gravity="center"
             android:text="@string/push_task"
-            android:textColor="@color/white"/>
+            android:textColor="@color/white" />
     </LinearLayout>
 
     <RelativeLayout
@@ -53,7 +53,7 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main"/>
+            android:textSize="@dimen/text_main" />
 
         <TextView
             android:id="@+id/status_tv"
@@ -62,7 +62,7 @@
             android:layout_alignParentRight="true"
             android:layout_marginTop="10dp"
             android:textColor="@color/hintColor"
-            android:textSize="@dimen/text_hine"/>
+            android:textSize="@dimen/text_hine" />
 
         <TextView
             android:id="@+id/oa_meeting_start"
@@ -71,7 +71,7 @@
             android:layout_below="@id/name_tv"
             android:layout_marginTop="20dp"
             android:text="06月13日"
-            android:textSize="@dimen/text_main"/>
+            android:textSize="@dimen/text_main" />
 
         <TextView
             android:id="@+id/oa_meeting_start_date"
@@ -81,7 +81,7 @@
             android:layout_marginTop="5dp"
             android:text="16:00"
             android:textColor="@color/powderblue"
-            android:textSize="30sp"/>
+            android:textSize="30sp" />
 
         <TextView
             android:id="@+id/oa_meeting_line"
@@ -92,7 +92,7 @@
             android:layout_marginRight="5dp"
             android:layout_toRightOf="@+id/oa_meeting_start_date"
             android:text="—"
-            android:textSize="30sp"/>
+            android:textSize="30sp" />
 
         <TextView
             android:id="@+id/oa_meeting_end_date"
@@ -102,7 +102,7 @@
             android:layout_toRightOf="@+id/oa_meeting_line"
             android:text="18:00"
             android:textColor="@color/powderblue"
-            android:textSize="30sp"/>
+            android:textSize="30sp" />
 
         <TextView
             android:id="@+id/oa_meeting_end"
@@ -112,7 +112,7 @@
             android:layout_alignLeft="@+id/oa_meeting_end_date"
             android:layout_marginBottom="5dp"
             android:text="06月13日"
-            android:textSize="@dimen/text_main"/>
+            android:textSize="@dimen/text_main" />
 
         <TextView
             android:id="@+id/addr"
@@ -121,7 +121,7 @@
             android:layout_below="@id/oa_meeting_start_date"
             android:layout_marginTop="10dp"
             android:text="@string/meet_position"
-            android:textColor="@color/hintColor"/>
+            android:textColor="@color/hintColor" />
 
         <TextView
             android:id="@+id/addr_tv"
@@ -133,7 +133,7 @@
             android:ellipsize="end"
             android:lines="1"
             android:text="@string/not_edit"
-            android:textColor="@color/text_hine"/>
+            android:textColor="@color/text_hine" />
 
 
         <TextView
@@ -143,7 +143,7 @@
             android:layout_below="@id/addr_tv"
             android:layout_marginTop="10dp"
             android:text="@string/meet_show"
-            android:textColor="@color/hintColor"/>
+            android:textColor="@color/hintColor" />
 
         <TextView
             android:id="@+id/sub_tv"
@@ -155,7 +155,7 @@
             android:ellipsize="end"
             android:lines="1"
             android:text="无"
-            android:textColor="@color/text_hine"/>
+            android:textColor="@color/text_hine" />
 
         <TextView
             android:id="@+id/user"
@@ -164,7 +164,7 @@
             android:layout_below="@id/sub_tv"
             android:layout_marginTop="10dp"
             android:text="@string/recorder"
-            android:textColor="@color/hintColor"/>
+            android:textColor="@color/hintColor" />
 
         <TextView
             android:id="@+id/user_tv"
@@ -172,7 +172,7 @@
             android:layout_height="wrap_content"
             android:layout_alignLeft="@id/addr_tv"
             android:layout_alignTop="@id/user"
-            android:textColor="@color/text_hine"/>
+            android:textColor="@color/text_hine" />
 
         <TextView
             android:id="@+id/tag"
@@ -181,7 +181,7 @@
             android:layout_below="@id/user_tv"
             android:layout_marginTop="10dp"
             android:text="@string/meet_tag"
-            android:textColor="@color/hintColor"/>
+            android:textColor="@color/hintColor" />
 
         <TextView
             android:id="@+id/tag_tv"
@@ -190,7 +190,7 @@
             android:layout_alignLeft="@id/addr_tv"
             android:layout_alignTop="@id/tag"
             android:text="无"
-            android:textColor="@color/text_hine"/>
+            android:textColor="@color/text_hine" />
     </RelativeLayout>
 
     <Button
@@ -205,12 +205,12 @@
         android:padding="10dp"
         android:text="@string/signin_new"
         android:textColor="@color/white"
-        android:textSize="@dimen/text_main"/>
+        android:textSize="@dimen/text_main" />
 
 
     <RelativeLayout
         android:id="@+id/baidu_ll"
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_below="@+id/click_btn"
         android:layout_marginTop="10dp">
@@ -223,7 +223,7 @@
             android:layout_marginRight="20dp"
             android:layout_toLeftOf="@id/location_tag"
             android:ellipsize="end"
-            android:lines="1"/>
+            android:lines="1" />
 
         <TextView
             android:id="@+id/location_tag"
@@ -233,7 +233,7 @@
             android:layout_marginRight="30dp"
             android:clickable="true"
             android:text="@string/agare"
-            android:textColor="@color/blue"/>
+            android:textColor="@color/blue" />
     </RelativeLayout>
 
     <LinearLayout
@@ -249,18 +249,18 @@
             android:id="@+id/num_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/signin_number"/>
+            android:text="@string/signin_number" />
 
         <View
             android:layout_width="6dp"
-            android:layout_height="1dp"/>
+            android:layout_height="1dp" />
 
         <TextView
             android:id="@+id/num_tag"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:text="@string/click_finds"
-            android:textColor="@color/blue"/>
+            android:textColor="@color/blue" />
     </LinearLayout>
 
     <TextView
@@ -268,6 +268,6 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_alignParentBottom="true"
-        android:background="@drawable/endmeeting"/>
+        android:background="@drawable/endmeeting" />
 
 </RelativeLayout>

+ 5 - 5
app_core/common/src/main/res/layout/activity_work.xml

@@ -102,7 +102,7 @@
                 android:drawablePadding="8dp"
                 android:text="@string/this_position"
                 android:textColor="#000000"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/office_addr"
@@ -112,7 +112,7 @@
                 android:drawablePadding="5dp"
                 android:gravity="center_horizontal"
                 android:textColor="@color/text_hine"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
         </LinearLayout>
 
         <LinearLayout
@@ -130,7 +130,7 @@
                 android:drawablePadding="8dp"
                 android:text="@string/long_company"
                 android:textColor="#000000"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/unoffice_mm"
@@ -139,7 +139,7 @@
                 android:layout_gravity="center"
                 android:layout_weight="1"
                 android:textColor="@color/text_hine"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
 
             <TextView
                 android:id="@+id/unoffice_"
@@ -149,7 +149,7 @@
                 android:layout_marginRight="10dp"
                 android:text="@string/unoffice"
                 android:textColor="#f17e21"
-                android:textSize="12dp" />
+                android:textSize="12sp" />
         </LinearLayout>
 
 

+ 81 - 0
app_core/common/src/main/res/layout/item_select_alert_pop.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:gravity="center_horizontal"
+              android:orientation="vertical"
+              android:paddingBottom="@dimen/dp_4"
+              android:paddingLeft="@dimen/dp_10"
+              android:paddingRight="@dimen/dp_10"
+              android:paddingTop="@dimen/dp_10">
+
+    <TextView
+        android:id="@+id/title_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:text="@string/common_dialog_title"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main"
+        android:textStyle="bold" />
+
+
+    <TextView
+        android:id="@+id/message_tv"
+        android:layout_width="match_parent"
+        android:layout_height="60dp"
+        android:layout_marginTop="5dp"
+        android:ellipsize="end"
+        android:gravity="left|center_vertical"
+        android:maxLines="2"
+        android:paddingLeft="@dimen/dp_10"
+        android:paddingRight="@dimen/dp_10"
+        android:textColor="@color/text_hine"
+        android:textSize="@dimen/text_main" />
+
+    <!--   <View
+           android:layout_width="match_parent"
+           android:layout_height="2px"
+           android:layout_marginTop="10dp"
+           android:background="@color/item_line" />
+   -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:orientation="horizontal"
+        android:padding="@dimen/dp_4"
+        android:paddingLeft="@dimen/dp_10"
+        android:paddingRight="@dimen/dp_10"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main">
+
+        <TextView
+            android:id="@+id/goto_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginRight="20dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_cancel_bg"
+            android:gravity="center"
+            android:text="@string/common_cancel"
+            android:textColor="@color/titleBlue"
+            android:textSize="@dimen/text_hine" />
+
+        <!--       <View
+                   android:layout_width="2px"
+                   android:layout_height="match_parent"
+                   android:background="@color/item_line" />-->
+
+        <TextView
+            android:id="@+id/sure_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="20dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="@string/common_sure"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_hine" />
+    </LinearLayout>
+</LinearLayout>

+ 4 - 4
app_core/common/src/main/res/values/dimens.xml

@@ -35,10 +35,10 @@
     <dimen name="item_me_height">80.0dip</dimen>
     <dimen name="item_img_height">48dp</dimen>
     <dimen name="item_img_width">48dp</dimen>
-    <dimen name="BigTextSize">17.0dip</dimen>
-    <dimen name="NormalTextSize">16.0dip</dimen>
-    <dimen name="HintTextSize">14.0dip</dimen>
-    <dimen name="SmallerTextSize">13.0dip</dimen>
+    <dimen name="BigTextSize">17.0dp</dimen>
+    <dimen name="NormalTextSize">16.0dp</dimen>
+    <dimen name="HintTextSize">14.0dp</dimen>
+    <dimen name="SmallerTextSize">13.0sp</dimen>
     <dimen name="emotion_height">180dp</dimen>
     <dimen name="padding">8dp</dimen>
     <dimen name="paddingMin">4dp</dimen>

+ 227 - 235
app_modular/appbooking/src/main/java/com/modular/booking/activity/business/BBookingDetailActivity.java

@@ -28,7 +28,6 @@ import android.widget.SimpleAdapter;
 import android.widget.TextView;
 import android.widget.Toast;
 
-import com.afollestad.materialdialogs.MaterialDialog;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -80,30 +79,30 @@ import rx.functions.Action1;
 import static com.core.utils.HeightUtils.setListViewHeightBasedOnChildren1;
 
 /**
-  * @desc:商务预约详情
-  * @author:Arison on 2017/9/11
-  */
-public class BBookingDetailActivity extends OABaseActivity implements View.OnClickListener{
-    
-   private MyListView mListDetail;
-   private RelativeLayout rvTop;
-   private LinearLayout llLeft;
-   private CircleImageView ivMe;
-   private TextView tvMe;
-   private ImageView ivResultInfo;
-   private LinearLayout llRight;
-   private CircleImageView ivTarget;
-   private TextView tvTarget;
-   private TextView tvTime;
-   private TextView tvAddress;
-   private TextView tvContent;
-   private TextView tv_topic;
-   private ImageView ivResult;
-   private LinearLayout ll_bottom;
+ * @desc:商务预约详情
+ * @author:Arison on 2017/9/11
+ */
+public class BBookingDetailActivity extends OABaseActivity implements View.OnClickListener {
+
+    private MyListView mListDetail;
+    private RelativeLayout rvTop;
+    private LinearLayout llLeft;
+    private CircleImageView ivMe;
+    private TextView tvMe;
+    private ImageView ivResultInfo;
+    private LinearLayout llRight;
+    private CircleImageView ivTarget;
+    private TextView tvTarget;
+    private TextView tvTime;
+    private TextView tvAddress;
+    private TextView tvContent;
+    private TextView tv_topic;
+    private ImageView ivResult;
+    private LinearLayout ll_bottom;
 
     private ItemListTypeAdapter mAdapter;
     private BookingModel model;
-    private boolean isMenuShuffle=false;
+    private boolean isMenuShuffle = false;
     private Animation animation;
     private boolean isShared;
     private LinearLayout ll_refuse;
@@ -141,16 +140,16 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
         initEvent();
         initData();
     }
+
     Menu mMenu;
+
     @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
-        mMenu=menu;
-        Log.e("isMenuShuffle",isMenuShuffle + "");
-        if(isMenuShuffle)
-        {
+        mMenu = menu;
+        Log.e("isMenuShuffle", isMenuShuffle + "");
+        if (isMenuShuffle) {
             menu.findItem(R.id.app_about).setVisible(true);
-        }else
-        {
+        } else {
             menu.findItem(R.id.app_about).setVisible(false);
         }
         return super.onPrepareOptionsMenu(menu);
@@ -180,17 +179,17 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
         }
         return true;
     }
-    
-    public void initView(){
+
+    public void initView() {
         setTitle("商务预约");
-        sv_top =(CustomerScrollView)findViewById(R.id.sv_top);
-        mListDetail=(MyListView) findViewById(R.id.mListDetail);
+        sv_top = (CustomerScrollView) findViewById(R.id.sv_top);
+        mListDetail = (MyListView) findViewById(R.id.mListDetail);
         rvTop = (RelativeLayout) findViewById(R.id.rv_top);
         llLeft = (LinearLayout) findViewById(R.id.ll_left);
         ivMe = (CircleImageView) findViewById(R.id.iv_me);
         ll_refuse = (LinearLayout) findViewById(R.id.ll_refuse);
         tvMe = (TextView) findViewById(R.id.tv_me);
-        tv_sender=(TextView) findViewById(R.id.tv_sender);
+        tv_sender = (TextView) findViewById(R.id.tv_sender);
         ivResultInfo = (ImageView) findViewById(R.id.iv_resultInfo);
         llRight = (LinearLayout) findViewById(R.id.ll_right);
         ivTarget = (CircleImageView) findViewById(R.id.iv_target);
@@ -198,21 +197,21 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
         tvTime = (TextView) findViewById(R.id.tv_time);
         tvAddress = (TextView) findViewById(R.id.tv_address);
         tvContent = (TextView) findViewById(R.id.tv_content);
-        tv_topic= (TextView) findViewById(R.id.tv_topic);
-        tv_title=(TextView)findViewById(R.id.tv_title);
+        tv_topic = (TextView) findViewById(R.id.tv_topic);
+        tv_title = (TextView) findViewById(R.id.tv_title);
         ivResult = (ImageView) findViewById(R.id.iv_result);
-        ll_bottom= (LinearLayout) findViewById(R.id.ll_bottom);
-        
-        animation= AnimationUtils.loadAnimation(this, R.anim.anim_translate_bookingprogress);
-        if (getIntent()!=null&&getIntent().getExtras()!=null){
-            isShared=getIntent().getExtras().getBoolean("isShared");
-            model=getIntent().getExtras().getParcelable("model");
-            if ("个人".equals(model.getKind())){
+        ll_bottom = (LinearLayout) findViewById(R.id.ll_bottom);
+
+        animation = AnimationUtils.loadAnimation(this, R.anim.anim_translate_bookingprogress);
+        if (getIntent() != null && getIntent().getExtras() != null) {
+            isShared = getIntent().getExtras().getBoolean("isShared");
+            model = getIntent().getExtras().getParcelable("model");
+            if ("个人".equals(model.getKind())) {
                 updateUi(isShared);
-            }else{
+            } else {
                 getApiData();
             }
-          
+
         }
 
     }
@@ -220,13 +219,13 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
     private void updateUi(boolean isShared) {
         ll_bottom.setVisibility(View.VISIBLE);
         sv_top.setVisibility(View.VISIBLE);
-        tvTime.setText(model.getAb_starttime().substring(0,10)+" "+model.getAb_starttime().substring(11,16)+"-"+
-                model.getAb_endtime().substring(11,16));
+        tvTime.setText(model.getAb_starttime().substring(0, 10) + " " + model.getAb_starttime().substring(11, 16) + "-" +
+                model.getAb_endtime().substring(11, 16));
         tvAddress.setText(model.getAb_address());
-        if (!StringUtil.isEmpty(model.getAd_reason())){
+        if (!StringUtil.isEmpty(model.getAd_reason())) {
             ll_refuse.setVisibility(View.VISIBLE);
             tvContent.setText(model.getAd_reason());
-        }else{
+        } else {
             ll_refuse.setVisibility(View.GONE);
         }
         tv_topic.setText(model.getAb_type());
@@ -235,134 +234,136 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
         ivResultInfo.clearAnimation();
         ll_bottom.setVisibility(View.GONE);
         tv_sender.setText(model.getAb_recordman());
-        if ("已拒绝".equals(model.getAb_confirmstatus())){
-            ivResult.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_jujue1));
-            ivResultInfo.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_jujue));
+        if ("已拒绝".equals(model.getAb_confirmstatus())) {
+            ivResult.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_jujue1));
+            ivResultInfo.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_jujue));
         }
-        if("未确认".equals(model.getAb_confirmstatus())||"待确认".equals(model.getAb_confirmstatus())){
-            ivResult.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_weiqueren));
-            ivResultInfo.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_send));
+        if ("未确认".equals(model.getAb_confirmstatus()) || "待确认".equals(model.getAb_confirmstatus())) {
+            ivResult.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_weiqueren));
+            ivResultInfo.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_send));
             //开启动画
             ll_bottom.setVisibility(View.VISIBLE);
             ivResultInfo.startAnimation(animation);
-            if( MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_recordid())){
+            if (MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_recordid())) {
                 //发起人
-                ((Button)findViewById(R.id.bt_change)).setText("变更");
-                ((Button)findViewById(R.id.bt_change)).setTextColor(getResources().getColor(R.color.white));
-                ((Button)findViewById(R.id.bt_cancle)).setText("取消");
-            }else{
+                ((Button) findViewById(R.id.bt_change)).setText("变更");
+                ((Button) findViewById(R.id.bt_change)).setTextColor(getResources().getColor(R.color.white));
+                ((Button) findViewById(R.id.bt_cancle)).setText("取消");
+            } else {
                 //被预约人
-                ((Button)findViewById(R.id.bt_change)).setText("确认");
-                ((Button)findViewById(R.id.bt_cancle)).setText("拒绝");
+                ((Button) findViewById(R.id.bt_change)).setText("确认");
+                ((Button) findViewById(R.id.bt_cancle)).setText("拒绝");
             }
         }
-        if("已确认".equals(model.getAb_confirmstatus())){
-            ivResult.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_yiqueren));
-            ivResultInfo.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_queren1));
-            isMenuShuffle=true;
-            if (model.getAb_sharestatus().equals("已共享")){
-                isMenuShuffle=true;
+        if ("已确认".equals(model.getAb_confirmstatus())) {
+            ivResult.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_yiqueren));
+            ivResultInfo.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_queren1));
+            isMenuShuffle = true;
+            if (model.getAb_sharestatus().equals("已共享")) {
+                isMenuShuffle = true;
             }
-            if( MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_recordid())){
-                ((Button)findViewById(R.id.bt_change)).setText("变更");
-                ((Button)findViewById(R.id.bt_cancle)).setText("取消");
+            if (MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_recordid())) {
+                ((Button) findViewById(R.id.bt_change)).setText("变更");
+                ((Button) findViewById(R.id.bt_cancle)).setText("取消");
                 ll_bottom.setVisibility(View.VISIBLE);
 
-            }else{
+            } else {
                 // ll_bottom.setVisibility(View.VISIBLE);
-                ((Button)findViewById(R.id.bt_change)).setText("变更");
-                ((Button)findViewById(R.id.bt_cancle)).setText("取消");
-                ((Button)findViewById(R.id.bt_change)).setVisibility(View.GONE);
+                ((Button) findViewById(R.id.bt_change)).setText("变更");
+                ((Button) findViewById(R.id.bt_cancle)).setText("取消");
+                ((Button) findViewById(R.id.bt_change)).setVisibility(View.GONE);
                 ll_bottom.setVisibility(View.VISIBLE);
             }
         }
-        if("已取消".equals(model.getAb_confirmstatus())){
-            ivResult.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_quxiao3));
-            ivResultInfo.setImageDrawable(mContext. getResources().getDrawable(R.drawable.icon_cancle3));
+        if ("已取消".equals(model.getAb_confirmstatus())) {
+            ivResult.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_quxiao3));
+            ivResultInfo.setImageDrawable(mContext.getResources().getDrawable(R.drawable.icon_cancle3));
 
         }
         //共享状态
-        if (isShared){
+        if (isShared) {
             tvTarget.setText(model.getAb_bman());
             tvMe.setText(model.getAb_recordman());
             ll_bottom.setVisibility(View.GONE);
-        }else{
-            if ( MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_recordid())){
+        } else {
+            if (MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_recordid())) {
                 //我是发起人
                 tvMe.setText(getString(R.string.me));
                 tvTarget.setText(model.getAb_bman());
-            }else{
+            } else {
                 //被约 
                 tvTarget.setText(getString(R.string.me));
                 tvMe.setText(model.getAb_recordman());
             }
         }
 
-        if(model.getAb_starttime().compareTo(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS))<0){
+        if (model.getAb_starttime().compareTo(DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS)) < 0) {
             ll_bottom.setVisibility(View.GONE);
-            isMenuShuffle=false;
+            isMenuShuffle = false;
         }
-     
+
     }
 
-    public void initEvent(){
+    public void initEvent() {
         findViewById(R.id.bt_change).setOnClickListener(this);
         findViewById(R.id.bt_cancle).setOnClickListener(this);
     }
-    
-    public void initData(){
-        
-        mAdapter=new ItemListTypeAdapter(mContext);
+
+    public void initData() {
+
+        mAdapter = new ItemListTypeAdapter(mContext);
         mListDetail.setAdapter(mAdapter);
     }
+
     private String companys;
-    private String  bmanid;
-    public void getApiData(){
+    private String bmanid;
+
+    public void getApiData() {
         showLoading();
-        HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).build();
+        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).build();
         httpClient.Api()
                 .send(new HttpClient.Builder().url("user/appBusinessDetail")
                         .add("id", model.getAb_id())
-                        .add("userid",MyApplication.getInstance().mLoginUser.getUserId())
+                        .add("userid", MyApplication.getInstance().mLoginUser.getUserId())
                         .add("token", MyApplication.getInstance().mAccessToken)
                         .build(), new ResultSubscriber<>(new ResultListener<Object>() {
-                    
+
                     @Override
                     public void onResponse(Object o) {
                         dimssLoading();
-                        LogUtil.d("ResponseText"," onResponse o:"+o.toString());
+                        LogUtil.d("ResponseText", " onResponse o:" + o.toString());
                         //mapdetail
-                        if (JSONUtil.validate(o.toString())){
-                            String detail= JSON.parseObject(o.toString()).getString("mapdetail");
-                            String baseInfo=JSON.parseObject(o.toString()).getString("map");
-                            JSONArray baseArray=JSON.parseArray(baseInfo);
-                            JSONObject baseObject=baseArray.getJSONObject(0);
-                            
-                            model= JSON.parseObject(baseObject.toJSONString(),BookingModel.class);
-                            
+                        if (JSONUtil.validate(o.toString())) {
+                            String detail = JSON.parseObject(o.toString()).getString("mapdetail");
+                            String baseInfo = JSON.parseObject(o.toString()).getString("map");
+                            JSONArray baseArray = JSON.parseArray(baseInfo);
+                            JSONObject baseObject = baseArray.getJSONObject(0);
+
+                            model = JSON.parseObject(baseObject.toJSONString(), BookingModel.class);
+
 //                            tvTime.setText(model.getAb_starttime().substring(0,10)+" "+model.getAb_starttime().substring(11,16)
 //                            +"-"+model.getAb_endtime().substring(11,16));
 //                            tv_topic.setText(model.getAb_content());
 //                            tvAddress.setText(model.getAb_address());
 //                            rvTop.setVisibility(View.GONE);
                             updateUi(isShared);
-                            JSONArray array=JSON.parseArray(detail);
-                            if (!ListUtils.isEmpty(array)){
-                                List<JSONObject> datas=new ArrayList<>();
-                                StringBuilder companysBuilder=new StringBuilder("");
-                                StringBuilder bmanidBuilder=new StringBuilder("");
-                                
-                                for (int i=0;i<array.size();i++) {
+                            JSONArray array = JSON.parseArray(detail);
+                            if (!ListUtils.isEmpty(array)) {
+                                List<JSONObject> datas = new ArrayList<>();
+                                StringBuilder companysBuilder = new StringBuilder("");
+                                StringBuilder bmanidBuilder = new StringBuilder("");
+
+                                for (int i = 0; i < array.size(); i++) {
                                     JSONObject object = array.getJSONObject(i);
-                                    companysBuilder.append(object.getString("ad_bcompany")+",");
-                                    bmanidBuilder.append(object.getString("ad_bmanid")+",");
+                                    companysBuilder.append(object.getString("ad_bcompany") + ",");
+                                    bmanidBuilder.append(object.getString("ad_bmanid") + ",");
                                     datas.add(object);
                                 }
-                                companys=companysBuilder.toString();
-                                bmanid= bmanidBuilder.toString();
+                                companys = companysBuilder.toString();
+                                bmanid = bmanidBuilder.toString();
                                 mAdapter.setObjects(datas);
                                 mAdapter.notifyDataSetChanged();
-                                if(mAdapter.getCount()==0){
+                                if (mAdapter.getCount() == 0) {
                                     //个人预约界面保持一致
                                     tv_title.setVisibility(View.GONE);
                                     mListDetail.setVisibility(View.GONE);
@@ -371,7 +372,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
                                     tvTarget.setText(model.getAb_bman());
                                     AvatarHelper.getInstance().display(model.getAb_bmanid(), ivTarget, true, true);
                                     AvatarHelper.getInstance().display(model.getAb_recordid(), ivMe, true, true);
-                                }else{
+                                } else {
                                     tv_title.setVisibility(View.VISIBLE);
                                     rvTop.setVisibility(View.GONE);
                                     mListDetail.setVisibility(View.VISIBLE);
@@ -395,26 +396,26 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (data==null)return;
-        switch (requestCode){
+        if (data == null) return;
+        switch (requestCode) {
             case 0x02:
                 try {
                     List<SelectEmUser> employeesList = data.getParcelableArrayListExtra("data");
-                    LogUtil.d("Test",JSON.toJSONString(employeesList));
-                    StringBuilder stringBuilder=new StringBuilder("");
-                    for(int i=0;i<employeesList.size();i++){
-                        if (i==employeesList.size()-1){
+                    LogUtil.d("Test", JSON.toJSONString(employeesList));
+                    StringBuilder stringBuilder = new StringBuilder("");
+                    for (int i = 0; i < employeesList.size(); i++) {
+                        if (i == employeesList.size() - 1) {
                             stringBuilder.append(employeesList.get(i).getImId());
-                        }else{
+                        } else {
                             stringBuilder.append(employeesList.get(i).getImId());
                             stringBuilder.append(",");
                         }
                     }
-                    LogUtil.d("Test",stringBuilder.toString());
-                    LogUtil.d("Test",model.getAb_id());
-                    if (!StringUtil.isEmpty(stringBuilder.toString())&&!StringUtil.isEmpty(model.getAb_id())){
-                        shareBooking(model.getAb_id(),stringBuilder.toString());
-                    }else {
+                    LogUtil.d("Test", stringBuilder.toString());
+                    LogUtil.d("Test", model.getAb_id());
+                    if (!StringUtil.isEmpty(stringBuilder.toString()) && !StringUtil.isEmpty(model.getAb_id())) {
+                        shareBooking(model.getAb_id(), stringBuilder.toString());
+                    } else {
                         ToastMessage("共享失败!");
                     }
                 } catch (Exception e) {
@@ -424,165 +425,157 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
         }
     }
 
-    public void shareBooking(String id,String imids){
+    public void shareBooking(String id, String imids) {
         showLoading();
         //map包括planids 个人计划id,bplanids商务计划id,userids共享人员imid,多个id用逗号连接
-        String map="{\"planids\":\"" +"" + "\",\"bplanids\":\""+id+"\",\"userids\":\""+imids+"\"}";
-        LogUtil.d("HttpLogs","map:"+map);
-        HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
+        String map = "{\"planids\":\"" + "" + "\",\"bplanids\":\"" + id + "\",\"userids\":\"" + imids + "\"}";
+        LogUtil.d("HttpLogs", "map:" + map);
+        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
         httpClient.Api().send(new HttpClient.Builder()
-        .url("/user/appBatchShare")
-        .add("token", MyApplication.getInstance().mAccessToken)
-        .add("map", map)
-        .method(Method.POST)
-        .build(),new ResultSubscriber<>(new ResultListener<Object>() {
+                .url("/user/appBatchShare")
+                .add("token", MyApplication.getInstance().mAccessToken)
+                .add("map", map)
+                .method(Method.POST)
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
             @Override
             public void onResponse(Object o) {
-              dimssLoading();
-                if (JSONUtil.validate(o.toString())){
-                    String result=JSON.parseObject(o.toString()).getString("result");
-                    if ("success".equals(result)){
+                dimssLoading();
+                if (JSONUtil.validate(o.toString())) {
+                    String result = JSON.parseObject(o.toString()).getString("result");
+                    if ("success".equals(result)) {
                         ToastMessage("分享成功!");
                     }
                 }
             }
         }));
-     
+
     }
-    
+
     //发送IM消息
-    public void sendMuiltMsg(String content){
-        if (!StringUtil.isEmpty(bmanid)){
-            String [] barray=bmanid.split(",");
-            for (int i=0;i<barray.length;i++){
+    public void sendMuiltMsg(String content) {
+        if (!StringUtil.isEmpty(bmanid)) {
+            String[] barray = bmanid.split(",");
+            for (int i = 0; i < barray.length; i++) {
                 //barray[i]=100263,Ab_recordid:109079,Ab_recordman:陈爱平
-                LogUtil.d("XmppApp","barray[i]="+barray[i]+",Ab_recordid:"+model.getAb_recordid()+",Ab_recordman:"
-                +model.getAb_recordman());
+                LogUtil.d("XmppApp", "barray[i]=" + barray[i] + ",Ab_recordid:" + model.getAb_recordid() + ",Ab_recordman:"
+                        + model.getAb_recordman());
 //                sendMessage(model.getAb_recordid(),model.getAb_recordman(),barray[i],content);
-                if(MyApplication.getInstance().getLoginUserId().equals(model.getAb_recordid())){
+                if (MyApplication.getInstance().getLoginUserId().equals(model.getAb_recordid())) {
                     sendMessage(MyApplication.getInstance().mLoginUser.getUserId(),
-                            MyApplication.getInstance().mLoginUser.getNickName(),barray[i],content);
-                }else{
+                            MyApplication.getInstance().mLoginUser.getNickName(), barray[i], content);
+                } else {
                     sendMessage(MyApplication.getInstance().mLoginUser.getUserId(),
-                            MyApplication.getInstance().mLoginUser.getNickName(),model.getAb_recordid(),content);
+                            MyApplication.getInstance().mLoginUser.getNickName(), model.getAb_recordid(), content);
                 }
-               
+
             }
         }
     }
 
-    public void updateBookingState(Button button){
+    public void updateBookingState(Button button) {
         // 发起人  可以变更和取消
         //被预约人  不能变更和取消
-        String map="{\"ab_confirmstatus\":\"已确认\",\"ab_bmanid\":\""+model.getAb_bmanid()+"\"}";
-        String time=model.getAb_starttime().substring(0,16)+"-"+model.getAb_endtime().substring(11,16);
-        if (button.getText().equals("变更")){
-            String content=model.getAb_recordman()+"变更了您"+time+"的预约计划";
+        String map = "{\"ab_confirmstatus\":\"已确认\",\"ab_bmanid\":\"" + model.getAb_bmanid() + "\"}";
+        String time = model.getAb_starttime().substring(0, 16) + "-" + model.getAb_endtime().substring(11, 16);
+        if (button.getText().equals("变更")) {
+            String content = model.getAb_recordman() + "变更了您" + time + "的预约计划";
             sendMuiltMsg(content);
-            Bundle bundle=new Bundle();
-            bundle.putParcelable("model",model);
-            if (!StringUtil.isEmpty(companys)){
-                bundle.putString("companys",companys.substring(0,companys.length()-1));
+            Bundle bundle = new Bundle();
+            bundle.putParcelable("model", model);
+            if (!StringUtil.isEmpty(companys)) {
+                bundle.putString("companys", companys.substring(0, companys.length() - 1));
             }
-            if (!StringUtil.isEmpty(bmanid)){
-                bundle.putString("bmanid",bmanid.substring(0,bmanid.length()-1));
+            if (!StringUtil.isEmpty(bmanid)) {
+                bundle.putString("bmanid", bmanid.substring(0, bmanid.length() - 1));
             }
-            startActivity(new Intent(mContext,BBookingAddActivity.class)
+            startActivity(new Intent(mContext, BBookingAddActivity.class)
                     .putExtras(bundle));
             return;
         }
         showLoading();
-        if (button.getText().equals("确认")){
-            String content=model.getAb_bman()+"确认了您"+time+"的预约计划";
-         //   sendMessage(model.getAb_bmanid(),model.getAb_bman(),model.getAb_recordid(),content);
-            String action="已确认";
-            map="{\"ad_confirmstatus\":\""+action+"\",\"ad_bmanid\":\""+MyApplication.getInstance().getLoginUserId()+"\",\"ad_sharestatus\":\"" +"未共享"+ "\"}";
+        if (button.getText().equals("确认")) {
+            String content = model.getAb_bman() + "确认了您" + time + "的预约计划";
+            //   sendMessage(model.getAb_bmanid(),model.getAb_bman(),model.getAb_recordid(),content);
+            String action = "已确认";
+            map = "{\"ad_confirmstatus\":\"" + action + "\",\"ad_bmanid\":\"" + MyApplication.getInstance().getLoginUserId() + "\",\"ad_sharestatus\":\"" + "未共享" + "\"}";
             sendMuiltMsg(content);
         }
-        if (button.getText().equals("拒绝")){
-            String content=model.getAb_bman()+"拒绝了您"+time+"的预约计划";
+        if (button.getText().equals("拒绝")) {
+            String content = model.getAb_bman() + "拒绝了您" + time + "的预约计划";
             sendMuiltMsg(content);
-           // sendMessage(model.getAb_bmanid(),model.getAb_bman(),model.getAb_recordid(),content);
+            // sendMessage(model.getAb_bmanid(),model.getAb_bman(),model.getAb_recordid(),content);
             showPopupWindow(button);
             return;
         }
-        if (button.getText().equals("取消")){
-            if (MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_bmanid())){
-               // String content=model.getAb_bman()+"取消了您"+time+"的预约计划";
+        if (button.getText().equals("取消")) {
+            if (MyApplication.getInstance().mLoginUser.getUserId().equals(model.getAb_bmanid())) {
+                // String content=model.getAb_bman()+"取消了您"+time+"的预约计划";
                 ToastMessage("您不能进行取消操作!");
                 return;
-            //    sendMessage(model.getAb_bmanid(),model.getAb_bman(),model.getAb_recordid(),content);
-            }else{
-                String content=model.getAb_recordman()+"取消了您"+time+"的预约计划";
+                //    sendMessage(model.getAb_bmanid(),model.getAb_bman(),model.getAb_recordid(),content);
+            } else {
+                String content = model.getAb_recordman() + "取消了您" + time + "的预约计划";
                 sendMuiltMsg(content);
-             //   sendMessage(model.getAb_recordid(),model.getAb_recordman(),model.getAb_bmanid(),content);
+                //   sendMessage(model.getAb_recordid(),model.getAb_recordman(),model.getAb_bmanid(),content);
             }
 //            String action="已取消";
 //            map="{\"ad_confirmstatus\":\""+action+"\",\"ad_bmanid\":\""+MyApplication.getInstance().getLoginUserId()+"\",\"ad_sharestatus\":\"" +"未共享"+ "\"}";
-            new MaterialDialog.Builder(ct)
-                    .title(MyApplication.getInstance().getString(R.string.app_dialog_title))
-                    .content("您确定要取消预约计划?")
-                    .positiveText(MyApplication.getInstance().getString(R.string.app_dialog_ok))
-                    .negativeText(MyApplication.getInstance().getString(R.string.app_dialog_close))
-                    .autoDismiss(false)
-                    .callback(new MaterialDialog.ButtonCallback() {
-                        @Override
-                        public void onPositive(MaterialDialog dialog) {
-                            dialog.dismiss();
-                            String action="已取消";
-                            String  map="{\"ad_confirmstatus\":\""+action+"\",\"ad_bmanid\":\""+MyApplication.getInstance().getLoginUserId()+"\",\"ad_sharestatus\":\"" +"未共享"+ "\"}";
-                            actionOrder(model.getAb_id(),map);
-                        }
 
+            PopupWindowHelper.showAlart(this,
+                    getString(R.string.app_dialog_title), "您确定要取消预约计划?"
+                    , new PopupWindowHelper.OnSelectListener() {
                         @Override
-                        public void onNegative(MaterialDialog dialog) {
-                            dialog.dismiss();
-                            dimssLoading();
+                        public void select(boolean selectOk) {
+                            if (selectOk) {
+                                String action = "已取消";
+                                String map = "{\"ad_confirmstatus\":\"" + action + "\",\"ad_bmanid\":\"" + MyApplication.getInstance().getLoginUserId() + "\",\"ad_sharestatus\":\"" + "未共享" + "\"}";
+                                actionOrder(model.getAb_id(), map);
+                            } else {
+                                dimssLoading();
+                            }
                         }
-                    }).show();
-        
+                    });
             return;
         }
-        actionOrder(model.getAb_id(),map);
+        actionOrder(model.getAb_id(), map);
     }
-    
 
-    
+
     //确认和取消,拒绝
-    public void actionOrder(String id, String map){
-        LogUtil.d("HttpLogs","id:"+id);
-        LogUtil.d("HttpLogs","map:"+map);
-        HttpClient httpClient=new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
+    public void actionOrder(String id, String map) {
+        LogUtil.d("HttpLogs", "id:" + id);
+        LogUtil.d("HttpLogs", "map:" + map);
+        HttpClient httpClient = new HttpClient.Builder(Constants.IM_BASE_URL()).isDebug(true).build();
         httpClient.Api().send(new HttpClient.Builder()
                 .url("/user/appDoBusiness")
-                .header("Content-Type","application/x-www-form-urlencoded;charset=UTF-8")
+                .header("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8")
                 .add("token", MyApplication.getInstance().mAccessToken)
                 .add("map", map)
-                .add("id",id)
+                .add("id", id)
                 .method(Method.POST)
-                .build(),new ResultSubscriber<>(new ResultListener<Object>() {
+                .build(), new ResultSubscriber<>(new ResultListener<Object>() {
             @Override
             public void onResponse(Object o) {
                 dimssLoading();
-                if (JSONUtil.validate(o.toString())){
-                    String result=JSON.parseObject(o.toString()).getString("result");
-                    if ("true".equals(result)){
+                if (JSONUtil.validate(o.toString())) {
+                    String result = JSON.parseObject(o.toString()).getString("result");
+                    if ("true".equals(result)) {
                         ToastMessage("操作成功!");
                         Observable.timer(2, TimeUnit.SECONDS).subscribe(new Action1<Long>() {
                             @Override
                             public void call(Long aLong) {
-                              startActivity(new Intent("com.modular.booking.BookingListActivity")
-                                .putExtra("curDate",model.getAb_starttime()));
-                              finish();
+                                startActivity(new Intent("com.modular.booking.BookingListActivity")
+                                        .putExtra("curDate", model.getAb_starttime()));
+                                finish();
                             }
                         });
                     }
-                }else{
+                } else {
                     ToastMessage("接口异常");
                 }
             }
         }));
-        
+
     }
 
 
@@ -606,20 +599,20 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
                 @Override
                 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                     position = position + 1;
-                    String  map="";
-                    String action="已拒绝";
+                    String map = "";
+                    String action = "已拒绝";
                     switch (position) {
                         case 1:
                             break;
                         case 2:
-                            map="{\"ad_confirmstatus\":\""+action+"\",\"ad_reason\":\"工作繁忙\",\"ad_bmanid\":\""+MyApplication.getInstance().getLoginUserId()+"\",\"ad_sharestatus\":\"" +"未共享"+ "\"}";
+                            map = "{\"ad_confirmstatus\":\"" + action + "\",\"ad_reason\":\"工作繁忙\",\"ad_bmanid\":\"" + MyApplication.getInstance().getLoginUserId() + "\",\"ad_sharestatus\":\"" + "未共享" + "\"}";
                             //ab_reason  工作繁忙
-                            actionOrder(model.getAb_id(),map);
+                            actionOrder(model.getAb_id(), map);
                             break;
                         case 3:
                             //ab_reason  没有必要
-                            map="{\"ad_confirmstatus\":\""+action+"\",\"ad_reason\":\"沒有必要\",\"ad_bmanid\":\""+MyApplication.getInstance().getLoginUserId()+"\",\"ad_sharestatus\":\"" +"未共享"+ "\"}";
-                            actionOrder(model.getAb_id(),map);
+                            map = "{\"ad_confirmstatus\":\"" + action + "\",\"ad_reason\":\"沒有必要\",\"ad_bmanid\":\"" + MyApplication.getInstance().getLoginUserId() + "\",\"ad_sharestatus\":\"" + "未共享" + "\"}";
+                            actionOrder(model.getAb_id(), map);
                             break;
                         case 4:
                             //ab_reason  其它
@@ -627,8 +620,8 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
                             showEditerDialog(model.getAb_id());
                             break;
                     }
-                     popupWindow.dismiss();
-                  
+                    popupWindow.dismiss();
+
                 }
             });
 
@@ -663,8 +656,7 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
     }
 
 
-
-    private void showEditerDialog(final String id ) {
+    private void showEditerDialog(final String id) {
         final PopupWindow window = new PopupWindow(ct);
         View view = LayoutInflater.from(ct).inflate(R.layout.item_select_remark_pop, null);
         window.setContentView(view);
@@ -680,8 +672,8 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
                 if (StringUtil.isEmpty(message))
                     ToastUtil.showToast(ct, R.string.sure_input_valid);
                 else {
-                  String   map="{\"ad_confirmstatus\":\""+"已拒绝"+"\",\"ad_reason\":\""+message+"\",\"ad_bmanid\":\""+MyApplication.getInstance().getLoginUserId()+"\",\"ad_sharestatus\":\"" +"未共享"+ "\"}";
-                  actionOrder(id,map);
+                    String map = "{\"ad_confirmstatus\":\"" + "已拒绝" + "\",\"ad_reason\":\"" + message + "\",\"ad_bmanid\":\"" + MyApplication.getInstance().getLoginUserId() + "\",\"ad_sharestatus\":\"" + "未共享" + "\"}";
+                    actionOrder(id, map);
                 }
             }
         });
@@ -705,15 +697,15 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
         window.showAtLocation(view, Gravity.CENTER, 0, 0);
         DisplayUtil.backgroundAlpha(this, 0.4f);
     }
-    
-    private void sendMessage( final String ownerId,String ownerName, final String objectId,  final String text) {
+
+    private void sendMessage(final String ownerId, String ownerName, final String objectId, final String text) {
         ChatMessage message = new ChatMessage();
         message.setType(XmppMessage.TYPE_TEXT);
         message.setContent(text);
         message.setFromUserName(ownerName);
         message.setFromUserId(ownerId);
         message.setTimeSend(CalendarUtil.getSecondMillion());
-        if (interprect(ownerId,objectId,message)) {
+        if (interprect(ownerId, objectId, message)) {
             return;
         }
         Log.i("wang", "send message:" + JSON.toJSONString(message));
@@ -743,10 +735,10 @@ public class BBookingDetailActivity extends OABaseActivity implements View.OnCli
      *
      * @param message
      */
-    public boolean interprect(String ownerId,String objectId,ChatMessage message) {
+    public boolean interprect(String ownerId, String objectId, ChatMessage message) {
         int len = 0;
         List<Friend> mBlackList = FriendDao.getInstance().getAllBlacklists(ownerId);
-        if (mBlackList!=null) {
+        if (mBlackList != null) {
             for (Friend friend : mBlackList) {
                 if (friend.getUserId().equals(objectId)) {
                     Toast.makeText(mContext, "已经加入黑名单,无法发送消息", Toast.LENGTH_SHORT).show();

+ 10 - 10
app_modular/appme/src/main/res/values/dimens.xml

@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <dimen name="next_height">15.0dip</dimen>
-    <dimen name="next_width">10.0dip</dimen>
+    <dimen name="next_height">15.0dp</dimen>
+    <dimen name="next_width">10.0dp</dimen>
     <dimen name="line">1px</dimen>
-    <dimen name="line_big">7.0dip</dimen>
-    <dimen name="line_min">2.0dip</dimen>
-    <dimen name="item_height_edit">100.0dip</dimen>
-    <dimen name="item_height">60.0dip</dimen>
-    <dimen name="item_height_min">45.0dip</dimen>
-    <dimen name="item_me_height">80.0dip</dimen>
+    <dimen name="line_big">7.0dp</dimen>
+    <dimen name="line_min">2.0dp</dimen>
+    <dimen name="item_height_edit">100.0dp</dimen>
+    <dimen name="item_height">60.0dp</dimen>
+    <dimen name="item_height_min">45.0dp</dimen>
+    <dimen name="item_me_height">80.0dp</dimen>
     <dimen name="text_main">16.0sp</dimen>
     <dimen name="activity_vertical_margin">16dp</dimen>
     <dimen name="activity_horizontal_margin">16dp</dimen>
-    <dimen name="SmallerTextSize">13.0dip</dimen>
-    <dimen name="NormalTextSize">16.0dip</dimen>
+    <dimen name="SmallerTextSize">13.0sp</dimen>
+    <dimen name="NormalTextSize">16.0dp</dimen>
 </resources>

+ 1 - 1
app_modular/apputils/src/main/res/layout/item_approval_list.xml

@@ -19,7 +19,7 @@
 
         <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="60dp"
+            android:layout_height="wrap_content"
             android:padding="@dimen/padding">
 
             <de.hdodenhof.circleimageview.CircleImageView

+ 28 - 28
app_modular/apputils/src/main/res/layout/item_select_alert_pop.xml

@@ -1,23 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_horizontal"
-    android:orientation="vertical"
-    android:paddingLeft="@dimen/dp_10"
-    android:paddingTop="@dimen/dp_10"
-    android:paddingRight="@dimen/dp_10"
-    android:paddingBottom="@dimen/dp_4">
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:gravity="center_horizontal"
+              android:orientation="vertical"
+              android:paddingBottom="@dimen/dp_4"
+              android:paddingLeft="@dimen/dp_10"
+              android:paddingRight="@dimen/dp_10"
+              android:paddingTop="@dimen/dp_10">
 
     <TextView
         android:id="@+id/title_tv"
         android:layout_width="match_parent"
-        android:layout_height="20dp"
-        android:textStyle="bold"
+        android:layout_height="wrap_content"
         android:gravity="center"
         android:text="@string/common_dialog_title"
         android:textColor="@color/text_main"
-        android:textSize="@dimen/text_main" />
+        android:textSize="@dimen/text_main"
+        android:textStyle="bold" />
 
 
     <TextView
@@ -25,27 +25,27 @@
         android:layout_width="match_parent"
         android:layout_height="60dp"
         android:layout_marginTop="5dp"
-        android:paddingLeft="@dimen/dp_10"
-        android:paddingRight="@dimen/dp_10"
         android:ellipsize="end"
         android:gravity="left|center_vertical"
         android:maxLines="2"
+        android:paddingLeft="@dimen/dp_10"
+        android:paddingRight="@dimen/dp_10"
         android:textColor="@color/text_hine"
         android:textSize="@dimen/text_main" />
 
- <!--   <View
-        android:layout_width="match_parent"
-        android:layout_height="2px"
-        android:layout_marginTop="10dp"
-        android:background="@color/item_line" />
--->
+    <!--   <View
+           android:layout_width="match_parent"
+           android:layout_height="2px"
+           android:layout_marginTop="10dp"
+           android:background="@color/item_line" />
+   -->
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="40dp"
         android:orientation="horizontal"
+        android:padding="@dimen/dp_4"
         android:paddingLeft="@dimen/dp_10"
         android:paddingRight="@dimen/dp_10"
-        android:padding="@dimen/dp_4"
         android:textColor="@color/text_main"
         android:textSize="@dimen/text_main">
 
@@ -53,27 +53,27 @@
             android:id="@+id/goto_tv"
             android:layout_width="0dp"
             android:layout_height="match_parent"
+            android:layout_marginRight="20dp"
             android:layout_weight="1"
-            android:textColor="@color/titleBlue"
             android:background="@drawable/selector_cancel_bg"
             android:gravity="center"
             android:text="@string/common_cancel"
-            android:layout_marginRight="20dp"
+            android:textColor="@color/titleBlue"
             android:textSize="@dimen/text_hine" />
 
- <!--       <View
-            android:layout_width="2px"
-            android:layout_height="match_parent"
-            android:background="@color/item_line" />-->
+        <!--       <View
+                   android:layout_width="2px"
+                   android:layout_height="match_parent"
+                   android:background="@color/item_line" />-->
 
         <TextView
             android:id="@+id/sure_tv"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
             android:layout_marginLeft="20dp"
+            android:layout_weight="1"
             android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
             android:text="@string/common_sure"
             android:textColor="@color/white"
             android:textSize="@dimen/text_hine" />

+ 25 - 23
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/MeetDetailsActivity.java

@@ -1,7 +1,5 @@
 package com.uas.appworks.OA.erp.activity;
 
-import android.app.AlertDialog;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
@@ -25,6 +23,7 @@ import com.core.utils.TimeUtils;
 import com.core.utils.ToastUtil;
 import com.core.widget.view.Activity.SearchLocationActivity;
 import com.core.widget.view.model.SearchPoiParam;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.uas.appworks.OA.erp.model.MeetEntity;
 import com.uas.appworks.OA.erp.model.MeetingDocBean;
 import com.uas.appworks.R;
@@ -159,13 +158,16 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
     }
 
     private void showExitDialog() {
-        new AlertDialog.Builder(mContext).setTitle(R.string.meet_manage).setMessage(R.string.to_end_meet).setNegativeButton(R.string.common_cancel, null)
-                .setPositiveButton(R.string.common_sure, new DialogInterface.OnClickListener() {
+        PopupWindowHelper.showAlart(this,
+                getString(R.string.meet_manage), getString(R.string.to_end_meet)
+                , new PopupWindowHelper.OnSelectListener() {
                     @Override
-                    public void onClick(DialogInterface dialog, int which) {
-                        doNetSubmit(ENDMEET);
+                    public void select(boolean selectOk) {
+                        if (selectOk) {
+                            doNetSubmit(ENDMEET);
+                        }
                     }
-                }).create().show();
+                });
     }
 
     private void initView() {
@@ -192,20 +194,20 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
                 str = getResources().getString(R.string.doing);
         }
 
-        if (str!=null){
-            int statusColor=R.color.meeting_end_status;
-            if (getResources().getString(R.string.doing).equals(str)){
-                statusColor=R.color.meeting_start_status;
-            }else {
-                statusColor=R.color.meeting_end_status;
-                if ("已结束".equals(str)){
-                   setSigninAble(false);
+        if (str != null) {
+            int statusColor = R.color.meeting_end_status;
+            if (getResources().getString(R.string.doing).equals(str)) {
+                statusColor = R.color.meeting_start_status;
+            } else {
+                statusColor = R.color.meeting_end_status;
+                if ("已结束".equals(str)) {
+                    setSigninAble(false);
                 }
             }
 
             status_tv.setTextColor(getResources().getColor(statusColor));
             status_tv.setText(str);
-        }else{
+        } else {
             status_tv.setText("");
         }
 
@@ -236,7 +238,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
         user_tv = (TextView) findViewById(R.id.user_tv);
         oa_meeting_start = (TextView) findViewById(R.id.oa_meeting_start);
         oa_meeting_end_date = (TextView) findViewById(R.id.oa_meeting_end_date);
-        oa_meeting_end= (TextView) findViewById(R.id.oa_meeting_end);
+        oa_meeting_end = (TextView) findViewById(R.id.oa_meeting_end);
         click_btn = (Button) findViewById(R.id.click_btn);
         oa_meeting_start_date = (TextView) findViewById(R.id.oa_meeting_start_date);
         end_meet_tv = (TextView) findViewById(R.id.end_meet_tv);
@@ -337,12 +339,12 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
     @Override
     public void onClick(View view) {
         Intent intent = null;
-        if (view.getId() == R.id.num_tag){
+        if (view.getId() == R.id.num_tag) {
             intent = new Intent("com.modular.metting.appworks.OARegisterActivity");
             intent.putExtra("code", ma_code);
             intent.putExtra("id", ma_code);
             startActivity(intent);
-        }else if (view.getId() == R.id.meet_save){
+        } else if (view.getId() == R.id.meet_save) {
             if (!user_tv.getText().toString().trim().equals(emname)) {
                 ToastUtil.showToast(ct, R.string.not_power_edit_tag);
                 return;
@@ -378,7 +380,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
             intent.putExtra("data", bean);
             intent.putExtra("code", ma_code);
             startActivity(intent);
-        }else if (view.getId() == R.id.click_btn){
+        } else if (view.getId() == R.id.click_btn) {
             if (isPlay) {
                 if ("已结束".equals(status_tv.getText().toString().trim())) {
                     ToastUtil.showToast(ct, R.string.meet_ended_not_signin);
@@ -388,7 +390,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
             } else {
                 ToastUtil.showToast(ct, R.string.already_signined);
             }
-        }else if (view.getId() == R.id.location_tag){
+        } else if (view.getId() == R.id.location_tag) {
             intent = new Intent(ct, SearchLocationActivity.class);
             SearchPoiParam poiParam = new SearchPoiParam();
             poiParam.setType(1);
@@ -399,11 +401,11 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
             poiParam.setDistanceTag("m");
             intent.putExtra("data", poiParam);
             startActivityForResult(intent, 0x20);
-        }else if (view.getId() == R.id.add_task_ll){
+        } else if (view.getId() == R.id.add_task_ll) {
             intent = new Intent(ct, AddMeetTaskActivity.class);
             intent.putExtra("name", StringUtil.getTextRexHttp(name_tv) + StringUtil.getMessage(ma_code));
             startActivity(intent);
-        }else if (view.getId() == R.id.end_meet_tv){
+        } else if (view.getId() == R.id.end_meet_tv) {
             if (!user_tv.getText().toString().trim().equals(emname)) {
                 ToastUtil.showToast(ct, R.string.not_power_end_meet);
                 return;