v2.0.7 버전
관리자 로그인 조건 수정 개방시간 설정 바로 적용되도록 수정 BLE 데이터 파싱 ASCII 처리 수정
This commit is contained in:
parent
78837b7a93
commit
1d1d7912a2
@ -21,8 +21,8 @@ android {
|
|||||||
applicationId "kr.co.enicom.acs"
|
applicationId "kr.co.enicom.acs"
|
||||||
minSdkVersion 26
|
minSdkVersion 26
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 204
|
versionCode 207
|
||||||
versionName "2.0.4"
|
versionName "2.0.7"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
ndk.abiFilters 'armeabi-v7a'
|
ndk.abiFilters 'armeabi-v7a'
|
||||||
}
|
}
|
||||||
@ -38,6 +38,13 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android.applicationVariants.all { variant ->
|
||||||
|
variant.outputs.all {
|
||||||
|
def date = new Date().format("yyMMdd")
|
||||||
|
outputFileName = "ACS-v${defaultConfig.versionName}-${date}.apk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
version "3.10.2"
|
version "3.10.2"
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
<activity android:name=".system.DateTimeActivity" />
|
<activity android:name=".system.DateTimeActivity" />
|
||||||
<activity android:name=".system.DeviceSettingActivity" />
|
<activity android:name=".system.DeviceSettingActivity" />
|
||||||
<activity android:name=".system.DoorControlTimeActivity" />
|
<activity android:name=".system.DoorControlTimeActivity" />
|
||||||
|
<activity android:name=".system.AttendanceSettingActivity" />
|
||||||
<activity android:name=".system.NetworkSettingActivity" />
|
<activity android:name=".system.NetworkSettingActivity" />
|
||||||
<activity android:name=".system.SystemSettingActivity" />
|
<activity android:name=".system.SystemSettingActivity" />
|
||||||
<activity android:name=".system.LoginMenuActivity" />
|
<activity android:name=".system.LoginMenuActivity" />
|
||||||
|
@ -304,17 +304,24 @@ public class BaseService extends Service {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(MainActivity.INSTANCE != null) {
|
//if(MainActivity.INSTANCE != null) {
|
||||||
|
{
|
||||||
if (GlobalInfo.mUseDoorControlTime == 1) {
|
if (GlobalInfo.mUseDoorControlTime == 1) {
|
||||||
if (GlobalInfo.checkIsDoorControlOpenTime()) {
|
if (GlobalInfo.checkIsDoorControlOpenTime()) {
|
||||||
|
long curTime = SystemClock.uptimeMillis();
|
||||||
if (GlobalInfo.mDoorControlTimeStatus != 1) {
|
if (GlobalInfo.mDoorControlTimeStatus != 1) {
|
||||||
//mDoorManager.controlDoor(true, -1);
|
//mDoorManager.controlDoor(true, -1);
|
||||||
mDoorManager.queueControlOrder(DOOR_CONTROL_STATUS_OPEN_LOCK);
|
mDoorManager.queueControlOrder(DOOR_CONTROL_STATUS_OPEN_LOCK);
|
||||||
|
GlobalInfo.mDoorControlSentLastTime = curTime;
|
||||||
if (MainActivity.INSTANCE != null) {
|
if (MainActivity.INSTANCE != null) {
|
||||||
MainActivity.INSTANCE.turnToBaseUI();
|
MainActivity.INSTANCE.turnToBaseUI();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GlobalInfo.mDoorControlTimeStatus = 1;
|
GlobalInfo.mDoorControlTimeStatus = 1;
|
||||||
|
if(curTime - GlobalInfo.mDoorControlSentLastTime >= 5 * 60 * 1000) { // 5분 주기 OPENLOCK
|
||||||
|
mDoorManager.queueControlOrder(DOOR_CONTROL_STATUS_OPEN_LOCK);
|
||||||
|
GlobalInfo.mDoorControlSentLastTime = curTime;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (GlobalInfo.mDoorControlTimeStatus != 0) {
|
if (GlobalInfo.mDoorControlTimeStatus != 0) {
|
||||||
//mDoorManager.controlDoor(false, 0);
|
//mDoorManager.controlDoor(false, 0);
|
||||||
@ -533,6 +540,22 @@ public class BaseService extends Service {
|
|||||||
|
|
||||||
if(mGpioManager == null) {
|
if(mGpioManager == null) {
|
||||||
mGpioManager = new GpioManager();
|
mGpioManager = new GpioManager();
|
||||||
|
|
||||||
|
// Initialize GPIO Status
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_LED_RED, GpioManager.PIN_MODE_WRITE);
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_LED_GREEN, GpioManager.PIN_MODE_WRITE);
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_LED_BLUE, GpioManager.PIN_MODE_WRITE);
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_RELAY_1, GpioManager.PIN_MODE_WRITE);
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_RELAY_2, GpioManager.PIN_MODE_WRITE);
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_CASE_CHECK, GpioManager.PIN_MODE_READ);
|
||||||
|
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_UART_RTS, GpioManager.PIN_MODE_WRITE);
|
||||||
|
|
||||||
|
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_LED_RED, 0);
|
||||||
|
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_LED_GREEN, 0);
|
||||||
|
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_LED_BLUE, 1);
|
||||||
|
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_RELAY_1, 0);
|
||||||
|
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_RELAY_2, 0);
|
||||||
|
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_UART_RTS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mDCUManager == null) {
|
if(mDCUManager == null) {
|
||||||
|
@ -270,12 +270,45 @@ public class GlobalInfo {
|
|||||||
|
|
||||||
public static int mUseDoorControlTime = 1; // 개방시간 사용 여부
|
public static int mUseDoorControlTime = 1; // 개방시간 사용 여부
|
||||||
public static int mDoorControlTimeStatus = -1; // 개방시간 문 상태 보존. -1 : 미제어, 0 : 닫음, 1 : 열림
|
public static int mDoorControlTimeStatus = -1; // 개방시간 문 상태 보존. -1 : 미제어, 0 : 닫음, 1 : 열림
|
||||||
|
public static long mDoorControlSentLastTime = 0; // 개방시간 문 오픈 명령 보낸 최종 시간
|
||||||
public static int mDoorControlTimeStart = 7 * 60 + 41; // 개방시간 시작 시간(Minute) Default = 09:00
|
public static int mDoorControlTimeStart = 7 * 60 + 41; // 개방시간 시작 시간(Minute) Default = 09:00
|
||||||
public static int mDoorControlTimeEnd = 7 * 60 + 41; //18 * 60; // 개방시간 종료 시간(Minute) Default = 18:00
|
public static int mDoorControlTimeEnd = 7 * 60 + 41; //18 * 60; // 개방시간 종료 시간(Minute) Default = 18:00
|
||||||
|
|
||||||
public static ArrayList<UserInfo> mUserList;
|
public static ArrayList<UserInfo> mUserList;
|
||||||
private static Object mLock = new Object();
|
private static Object mLock = new Object();
|
||||||
|
|
||||||
|
|
||||||
|
public static int getCurrentMinutesInDay() {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
int hour = calendar.get(Calendar.HOUR_OF_DAY);
|
||||||
|
int minute = calendar.get(Calendar.MINUTE);
|
||||||
|
int currentMinutes = hour * 60 + minute;
|
||||||
|
|
||||||
|
return currentMinutes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean checkIsNowAttendanceStartTime() {
|
||||||
|
int currentMinutes = getCurrentMinutesInDay();
|
||||||
|
if(currentMinutes <= mAttendanceStartTime) {
|
||||||
|
if(mAttendanceStartTime - currentMinutes <= mAttendanceAutoTimeMinute) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean checkIsNowAttendanceEndTime() {
|
||||||
|
int currentMinutes = getCurrentMinutesInDay();
|
||||||
|
if(currentMinutes >= mAttendanceEndTime) {
|
||||||
|
if(currentMinutes - mAttendanceEndTime <= mAttendanceAutoTimeMinute) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private static void updateTable(SQLiteDatabase database) {
|
private static void updateTable(SQLiteDatabase database) {
|
||||||
boolean isPrevVersion = false;
|
boolean isPrevVersion = false;
|
||||||
String sql = "select address, port, address_slave, port_slave from serverinfo where idx = 0";
|
String sql = "select address, port, address_slave, port_slave from serverinfo where idx = 0";
|
||||||
@ -509,10 +542,11 @@ public class GlobalInfo {
|
|||||||
"%d, %d, %d, %d, %d, " +
|
"%d, %d, %d, %d, %d, " +
|
||||||
"%d, %d, %d, %d, %d, %d, " +
|
"%d, %d, %d, %d, %d, %d, " +
|
||||||
"%d, %d, %d, %d, " +
|
"%d, %d, %d, %d, " +
|
||||||
"%d, %d, %d" +
|
"%d, %d, %d, " +
|
||||||
"%d, %d, %d, %d" +
|
"%d, %d, %d, %d" +
|
||||||
")",
|
")",
|
||||||
VERIFY_COMBINATION_OR, DEFAULT_VERIFY_PRINTUSERNAME, DEFAULT_VERIFY_POPUPTIME, DEFAULT_LOG_DELETESTATUS , 1, 1, 1,
|
VERIFY_COMBINATION_OR,
|
||||||
|
DEFAULT_VERIFY_PRINTUSERNAME, DEFAULT_VERIFY_POPUPTIME, DEFAULT_LOG_DELETESTATUS , 1, 1, 1,
|
||||||
DEFAULT_SERVER_CHECK_TIME_DURATION, DEFAULT_DEVICE_VOLUME, DOOR_USE_ACCESS_CONTROL, DEFAULT_DOOR_CONTROL_MODE, DEFAULT_DOOR_OPEN_TIME,
|
DEFAULT_SERVER_CHECK_TIME_DURATION, DEFAULT_DEVICE_VOLUME, DOOR_USE_ACCESS_CONTROL, DEFAULT_DOOR_CONTROL_MODE, DEFAULT_DOOR_OPEN_TIME,
|
||||||
DEFAULT_SOCKET_USE_ENCRYPTION, DEFAULT_DCU_DEVICE_TYPE, DEFAULT_USE_DCU_WATCHDOG, DEFAULT_USE_CASE_CHECK, DEFAULT_INPUT_TIMEOUT_SECONDS,
|
DEFAULT_SOCKET_USE_ENCRYPTION, DEFAULT_DCU_DEVICE_TYPE, DEFAULT_USE_DCU_WATCHDOG, DEFAULT_USE_CASE_CHECK, DEFAULT_INPUT_TIMEOUT_SECONDS,
|
||||||
DEFAULT_AUTO_REBOOT_USE, DEFAULT_AUTO_REBOOT_PERIOD, DEFAULT_AUTO_REBOOT_HOUR, DEFAULT_DCU_WATCHDOG_TIME, DEFAULT_VERIFY_LOG_AUTO_RESEND, DEFAULT_VERIFY_ACTIVATE_METHOD,
|
DEFAULT_AUTO_REBOOT_USE, DEFAULT_AUTO_REBOOT_PERIOD, DEFAULT_AUTO_REBOOT_HOUR, DEFAULT_DCU_WATCHDOG_TIME, DEFAULT_VERIFY_LOG_AUTO_RESEND, DEFAULT_VERIFY_ACTIVATE_METHOD,
|
||||||
@ -523,6 +557,7 @@ public class GlobalInfo {
|
|||||||
|
|
||||||
database.execSQL(sql);
|
database.execSQL(sql);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!columnExists(database, "settings", "dcu_watchdog_timeout")) {
|
if(!columnExists(database, "settings", "dcu_watchdog_timeout")) {
|
||||||
@ -2420,10 +2455,7 @@ public class GlobalInfo {
|
|||||||
if(mUseDoorControlTime == 0)
|
if(mUseDoorControlTime == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Calendar calendar = Calendar.getInstance();
|
int currentMinutes = getCurrentMinutesInDay();
|
||||||
int hour = calendar.get(Calendar.HOUR_OF_DAY); // 24시간 기준
|
|
||||||
int minute = calendar.get(Calendar.MINUTE);
|
|
||||||
int currentMinutes = hour * 60 + minute;
|
|
||||||
if(currentMinutes >= mDoorControlTimeStart && currentMinutes <= mDoorControlTimeEnd)
|
if(currentMinutes >= mDoorControlTimeStart && currentMinutes <= mDoorControlTimeEnd)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@ import android.content.pm.PackageInfo;
|
|||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.AssetFileDescriptor;
|
import android.content.res.AssetFileDescriptor;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Matrix;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.hardware.usb.UsbDevice;
|
import android.hardware.usb.UsbDevice;
|
||||||
import android.hardware.usb.UsbManager;
|
import android.hardware.usb.UsbManager;
|
||||||
import android.media.AudioAttributes;
|
import android.media.AudioAttributes;
|
||||||
@ -26,9 +24,7 @@ import android.text.Spannable;
|
|||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.SurfaceView;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -43,7 +39,6 @@ import java.io.UnsupportedEncodingException;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
@ -51,7 +46,6 @@ import java.util.TimerTask;
|
|||||||
import kr.co.enicom.acs.manage.LogInfo;
|
import kr.co.enicom.acs.manage.LogInfo;
|
||||||
import kr.co.enicom.acs.system.LoginMenuActivity;
|
import kr.co.enicom.acs.system.LoginMenuActivity;
|
||||||
import kr.co.enicom.acs.system.SystemUtil;
|
import kr.co.enicom.acs.system.SystemUtil;
|
||||||
import kr.co.rito.RitoUtil;
|
|
||||||
import kr.co.rito.miscmanager.GpioManager;
|
import kr.co.rito.miscmanager.GpioManager;
|
||||||
import kr.co.rito.usbserial.driver.CustomProber;
|
import kr.co.rito.usbserial.driver.CustomProber;
|
||||||
import kr.co.rito.usbserial.driver.UsbSerialDriver;
|
import kr.co.rito.usbserial.driver.UsbSerialDriver;
|
||||||
@ -67,8 +61,6 @@ import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_RFID;
|
|||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN_COMB_RFID;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN_COMB_RFID;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN_FACE;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN_FACE;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.isVerifyMethodAllAnd;
|
|
||||||
import static kr.co.enicom.acs.GlobalInfo.mVerifyActivateMethod;
|
|
||||||
import static kr.co.enicom.acs.GlobalInfo.mVerifyCombination;
|
import static kr.co.enicom.acs.GlobalInfo.mVerifyCombination;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.mVerifyMethod;
|
import static kr.co.enicom.acs.GlobalInfo.mVerifyMethod;
|
||||||
|
|
||||||
@ -108,6 +100,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
private boolean mBtnRelay2 = false;
|
private boolean mBtnRelay2 = false;
|
||||||
|
|
||||||
private boolean mIsOnRfidVerifyingProcess = false; // RFID 인증 정보 수신 후 처리 진행 중인 지. 중복 처리 방지용
|
private boolean mIsOnRfidVerifyingProcess = false; // RFID 인증 정보 수신 후 처리 진행 중인 지. 중복 처리 방지용
|
||||||
|
private boolean mIsMainUiThreadAlive = false;
|
||||||
|
|
||||||
private int mConsecutiveVeinFailCount = 0;
|
private int mConsecutiveVeinFailCount = 0;
|
||||||
private MainUiHandler mMainUiHandler = null;
|
private MainUiHandler mMainUiHandler = null;
|
||||||
@ -1109,21 +1102,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
|
|
||||||
GlobalInfo.mDeviceStatusNormal = true;
|
GlobalInfo.mDeviceStatusNormal = true;
|
||||||
|
|
||||||
// Initialize GPIO Status
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_LED_RED, GpioManager.PIN_MODE_WRITE);
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_LED_GREEN, GpioManager.PIN_MODE_WRITE);
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_LED_BLUE, GpioManager.PIN_MODE_WRITE);
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_RELAY_1, GpioManager.PIN_MODE_WRITE);
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_RELAY_2, GpioManager.PIN_MODE_WRITE);
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_CASE_CHECK, GpioManager.PIN_MODE_READ);
|
|
||||||
BaseService.gpioPinRegister(GlobalInfo.GPIO_PIN_UART_RTS, GpioManager.PIN_MODE_WRITE);
|
|
||||||
|
|
||||||
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_LED_RED, 0);
|
|
||||||
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_LED_GREEN, 0);
|
|
||||||
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_LED_BLUE, 1);
|
|
||||||
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_RELAY_1, 0);
|
|
||||||
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_RELAY_2, 0);
|
|
||||||
BaseService.gpioPinWrite(GlobalInfo.GPIO_PIN_UART_RTS, 0);
|
|
||||||
|
|
||||||
GlobalInfo.initInfo();
|
GlobalInfo.initInfo();
|
||||||
GlobalInfo.reloadUserListWithProgress(this);
|
GlobalInfo.reloadUserListWithProgress(this);
|
||||||
@ -1365,9 +1344,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
mWorkinButton.setVisibility(View.INVISIBLE);
|
mWorkinButton.setVisibility(View.INVISIBLE);
|
||||||
mWorkoutButton.setVisibility(View.INVISIBLE);
|
mWorkoutButton.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
mAttendanceButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.workin_icon_76, 0, 0);
|
setAttendanceButtonMode(GlobalInfo.ATTENDANCE_MODE_IN);
|
||||||
mAttendanceButton.setText(R.string.main_attendance_mode_in);
|
|
||||||
mAttendanceButton.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1382,9 +1359,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
mWorkinButton.setVisibility(View.INVISIBLE);
|
mWorkinButton.setVisibility(View.INVISIBLE);
|
||||||
mWorkoutButton.setVisibility(View.INVISIBLE);
|
mWorkoutButton.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
mAttendanceButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.workout_icon_76, 0, 0);
|
setAttendanceButtonMode(GlobalInfo.ATTENDANCE_MODE_OUT);
|
||||||
mAttendanceButton.setText(R.string.main_attendance_mode_out);
|
|
||||||
mAttendanceButton.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1395,6 +1370,10 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view)
|
public void onClick(View view)
|
||||||
{
|
{
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||||
mWorkinButton.setVisibility(View.VISIBLE);
|
mWorkinButton.setVisibility(View.VISIBLE);
|
||||||
mWorkoutButton.setVisibility(View.VISIBLE);
|
mWorkoutButton.setVisibility(View.VISIBLE);
|
||||||
@ -1417,6 +1396,25 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setAttendanceButtonMode(int attandanceMode) {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if(attandanceMode == GlobalInfo.ATTENDANCE_MODE_IN) {
|
||||||
|
mAttendanceButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.workin_icon_76, 0, 0);
|
||||||
|
mAttendanceButton.setText(R.string.main_attendance_mode_in);
|
||||||
|
mAttendanceButton.setVisibility(View.VISIBLE);
|
||||||
|
} else if(attandanceMode == GlobalInfo.ATTENDANCE_MODE_OUT) {
|
||||||
|
mAttendanceButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.workout_icon_76, 0, 0);
|
||||||
|
mAttendanceButton.setText(R.string.main_attendance_mode_out);
|
||||||
|
mAttendanceButton.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
mAttendanceButton.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.M)
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
public void checkVerify()
|
public void checkVerify()
|
||||||
{
|
{
|
||||||
@ -1685,10 +1683,12 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
BaseService.setLastActivity(null);
|
BaseService.setLastActivity(null);
|
||||||
|
|
||||||
if(GlobalInfo.mUseAttendance == 1) {
|
if(GlobalInfo.mUseAttendance == 1) {
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 0) {
|
||||||
mWorkinButton.setVisibility(View.VISIBLE);
|
mWorkinButton.setVisibility(View.VISIBLE);
|
||||||
mWorkoutButton.setVisibility(View.VISIBLE);
|
mWorkoutButton.setVisibility(View.VISIBLE);
|
||||||
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*if(mVeinManager == null) {
|
/*if(mVeinManager == null) {
|
||||||
Log.i(TAG, "Create NEW VeinManager");
|
Log.i(TAG, "Create NEW VeinManager");
|
||||||
@ -1815,6 +1815,40 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
|
|
||||||
|
new Thread() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
int prevAttandanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||||
|
|
||||||
|
mIsMainUiThreadAlive = true;
|
||||||
|
while(mIsMainUiThreadAlive) {
|
||||||
|
if(GlobalInfo.mUseAttendance == 1) {
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 1) {
|
||||||
|
if(GlobalInfo.checkIsNowAttendanceStartTime()) {
|
||||||
|
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_IN;
|
||||||
|
} else if(GlobalInfo.checkIsNowAttendanceEndTime()) {
|
||||||
|
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_OUT;
|
||||||
|
} else {
|
||||||
|
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(prevAttandanceMode != GlobalInfo.mAttendanceMode) {
|
||||||
|
prevAttandanceMode = GlobalInfo.mAttendanceMode;
|
||||||
|
turnToBaseUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
sleep(100);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
|
||||||
/*if(mServerManager == null) {
|
/*if(mServerManager == null) {
|
||||||
Log.i(TAG, "Create NEW ServerManager");
|
Log.i(TAG, "Create NEW ServerManager");
|
||||||
mServerManager = new ServerManager();
|
mServerManager = new ServerManager();
|
||||||
@ -2039,7 +2073,9 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 0) {
|
||||||
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
GlobalInfo.mAttendanceMode = GlobalInfo.ATTENDANCE_MODE_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
if(logResult.mId.length() > 0) {
|
if(logResult.mId.length() > 0) {
|
||||||
//Toast.makeText(this,"인증 성공 [" + logResult.mName + "]", Toast.LENGTH_SHORT).show();
|
//Toast.makeText(this,"인증 성공 [" + logResult.mName + "]", Toast.LENGTH_SHORT).show();
|
||||||
@ -2176,6 +2212,26 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
int imageTriple3PosX = 860;
|
int imageTriple3PosX = 860;
|
||||||
|
|
||||||
if(GlobalInfo.mUseAttendance == 1) {
|
if(GlobalInfo.mUseAttendance == 1) {
|
||||||
|
boolean isNeedResizePos = false;
|
||||||
|
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 0) {
|
||||||
|
isNeedResizePos = true;
|
||||||
|
|
||||||
|
mWorkinButton.setVisibility(View.VISIBLE);
|
||||||
|
mWorkoutButton.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
boolean isOnStartTime = GlobalInfo.checkIsNowAttendanceStartTime();
|
||||||
|
boolean isOnEndTime = GlobalInfo.checkIsNowAttendanceEndTime();
|
||||||
|
if(isOnStartTime || isOnEndTime) {
|
||||||
|
isNeedResizePos = true;
|
||||||
|
|
||||||
|
mWorkinButton.setVisibility(View.INVISIBLE);
|
||||||
|
mWorkoutButton.setVisibility(View.INVISIBLE);
|
||||||
|
}
|
||||||
|
setAttendanceButtonMode(GlobalInfo.mAttendanceMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isNeedResizePos) {
|
||||||
imageWidth *= 0.738;
|
imageWidth *= 0.738;
|
||||||
imageWidthTriple *= 0.738;
|
imageWidthTriple *= 0.738;
|
||||||
imageWidthWithFace *= 0.738;
|
imageWidthWithFace *= 0.738;
|
||||||
@ -2186,9 +2242,7 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
imageFace2PosX = 500;
|
imageFace2PosX = 500;
|
||||||
imageTriple2PosX = 350;
|
imageTriple2PosX = 350;
|
||||||
imageTriple3PosX = 660;
|
imageTriple3PosX = 660;
|
||||||
|
}
|
||||||
mWorkinButton.setVisibility(View.VISIBLE);
|
|
||||||
mWorkoutButton.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.handleMessage(msg);
|
super.handleMessage(msg);
|
||||||
@ -2717,12 +2771,15 @@ public class MainActivity extends AppCompatActivity implements RfidManager.resul
|
|||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
INSTANCE = null;
|
INSTANCE = null;
|
||||||
|
mIsMainUiThreadAlive = false;
|
||||||
|
|
||||||
if(mPopupManager != null) {
|
if(mPopupManager != null) {
|
||||||
mPopupManager.terminate();
|
mPopupManager.terminate();
|
||||||
mPopupManager = null;
|
mPopupManager = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import android.util.Log;
|
|||||||
import com.hitachi.fv.android.h1client.SecurityLevel;
|
import com.hitachi.fv.android.h1client.SecurityLevel;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
@ -185,13 +186,16 @@ public class RfidManager implements SerialInputOutputManager.Listener {
|
|||||||
byte[] rfidId = new byte[GlobalInfo.BLE_RFID_CODE_LENGTH];
|
byte[] rfidId = new byte[GlobalInfo.BLE_RFID_CODE_LENGTH];
|
||||||
System.arraycopy(accData, 1, rfidId, 0, GlobalInfo.BLE_RFID_CODE_LENGTH);
|
System.arraycopy(accData, 1, rfidId, 0, GlobalInfo.BLE_RFID_CODE_LENGTH);
|
||||||
String rfidHex = byteArrayToHexString(rfidId);
|
String rfidHex = byteArrayToHexString(rfidId);
|
||||||
|
String rfidStr = new String(rfidId, StandardCharsets.UTF_8);
|
||||||
|
|
||||||
if(accFilled > PACKET_LENGTH) {
|
if(accFilled > PACKET_LENGTH) {
|
||||||
System.arraycopy(accData, PACKET_LENGTH, tmpData, 0, accFilled - PACKET_LENGTH);
|
System.arraycopy(accData, PACKET_LENGTH, tmpData, 0, accFilled - PACKET_LENGTH);
|
||||||
System.arraycopy(tmpData, 0, accData, 0, accFilled - PACKET_LENGTH);
|
System.arraycopy(tmpData, 0, accData, 0, accFilled - PACKET_LENGTH);
|
||||||
}
|
}
|
||||||
Log.d(RfidManager.class.getName(), String.format("BLE Reader Try [%s]", rfidHex));
|
// Log.d(RfidManager.class.getName(), String.format("BLE Reader Try [%s]", rfidHex));
|
||||||
mNotifyTarget.onRfidResult("success", rfidHex);
|
// mNotifyTarget.onRfidResult("success", rfidHex);
|
||||||
|
Log.d(RfidManager.class.getName(), String.format("BLE Reader Try [%s]", rfidStr));
|
||||||
|
mNotifyTarget.onRfidResult("success", rfidStr);
|
||||||
|
|
||||||
accFilled -= PACKET_LENGTH;
|
accFilled -= PACKET_LENGTH;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2302,21 +2302,21 @@ public class ServerManager extends Thread {
|
|||||||
|
|
||||||
_verifyString += "0"; // 얼굴은 전송 안함
|
_verifyString += "0"; // 얼굴은 전송 안함
|
||||||
|
|
||||||
if (info.mFingerTemplate.length() > 0) {
|
if (info.mFingerTemplate2.length() > 0) {
|
||||||
_verifyString += "1";
|
_verifyString += "1";
|
||||||
reg_cnt++;
|
reg_cnt++;
|
||||||
} else {
|
} else {
|
||||||
_verifyString += "0";
|
_verifyString += "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.mVeinTemplate.length() > 0) {
|
if (info.mVeinTemplate2.length() > 0) {
|
||||||
_verifyString += "1";
|
_verifyString += "1";
|
||||||
reg_cnt++;
|
reg_cnt++;
|
||||||
} else {
|
} else {
|
||||||
_verifyString += "0";
|
_verifyString += "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.mRFIDCode.length() > 0) {
|
if (info.mRFIDCode2.length() > 0) {
|
||||||
_verifyString += "1";
|
_verifyString += "1";
|
||||||
reg_cnt++;
|
reg_cnt++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -109,7 +109,7 @@ public class MgtAccessControlActivity extends BaseActivity {
|
|||||||
mAccessauthenticationMeansList[3] = getString(R.string.mgt_access_authentication_means_rfid_and_vein_or_face_text);
|
mAccessauthenticationMeansList[3] = getString(R.string.mgt_access_authentication_means_rfid_and_vein_or_face_text);
|
||||||
} else if (GlobalInfo.isActivatedMethod(VERIFY_METHOD_FINGER_FACE)) {
|
} else if (GlobalInfo.isActivatedMethod(VERIFY_METHOD_FINGER_FACE)) {
|
||||||
mAccessauthenticationMeansList[0] = getString(R.string.mgt_access_authentication_means_rfid_text);
|
mAccessauthenticationMeansList[0] = getString(R.string.mgt_access_authentication_means_rfid_text);
|
||||||
mAccessauthenticationMeansList[1] = getString(R.string.mgt_access_authentication_means_face_text);
|
mAccessauthenticationMeansList[1] = getString(R.string.mgt_access_authentication_means_finger_text);
|
||||||
mAccessauthenticationMeansList[2] = getString(R.string.mgt_access_authentication_means_rfid_or_finger_or_face_text);
|
mAccessauthenticationMeansList[2] = getString(R.string.mgt_access_authentication_means_rfid_or_finger_or_face_text);
|
||||||
mAccessauthenticationMeansList[3] = getString(R.string.mgt_access_authentication_means_rfid_and_finger_or_face_text);
|
mAccessauthenticationMeansList[3] = getString(R.string.mgt_access_authentication_means_rfid_and_finger_or_face_text);
|
||||||
}
|
}
|
||||||
@ -551,6 +551,11 @@ public class MgtAccessControlActivity extends BaseActivity {
|
|||||||
GlobalInfo.mVerifyMethod = VERIFY_METHOD_RFID;
|
GlobalInfo.mVerifyMethod = VERIFY_METHOD_RFID;
|
||||||
} else if (1 == np.getValue()) {
|
} else if (1 == np.getValue()) {
|
||||||
GlobalInfo.mVerifyMethod = GlobalInfo.mVerifyActivateMethod;
|
GlobalInfo.mVerifyMethod = GlobalInfo.mVerifyActivateMethod;
|
||||||
|
if(GlobalInfo.mVerifyActivateMethod == VERIFY_METHOD_VEIN_FACE) {
|
||||||
|
GlobalInfo.mVerifyMethod = VERIFY_METHOD_VEIN;
|
||||||
|
} else if(GlobalInfo.mVerifyActivateMethod == VERIFY_METHOD_FINGER_FACE) {
|
||||||
|
GlobalInfo.mVerifyMethod = VERIFY_METHOD_FINGER_PRINT;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
GlobalInfo.mVerifyMethod = (GlobalInfo.mVerifyActivateMethod | VERIFY_METHOD_RFID);
|
GlobalInfo.mVerifyMethod = (GlobalInfo.mVerifyActivateMethod | VERIFY_METHOD_RFID);
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ import kr.co.enicom.acs.GlobalInfo;
|
|||||||
import kr.co.enicom.acs.MainActivity;
|
import kr.co.enicom.acs.MainActivity;
|
||||||
import kr.co.enicom.acs.R;
|
import kr.co.enicom.acs.R;
|
||||||
import kr.co.enicom.acs.RfidManager;
|
import kr.co.enicom.acs.RfidManager;
|
||||||
|
import kr.co.enicom.acs.system.AttendanceSettingActivity;
|
||||||
import kr.co.enicom.acs.system.DoorControlTimeActivity;
|
import kr.co.enicom.acs.system.DoorControlTimeActivity;
|
||||||
import kr.co.enicom.acs.system.LoginMenuActivity;
|
import kr.co.enicom.acs.system.LoginMenuActivity;
|
||||||
import kr.co.enicom.acs.system.ServerSettingActivity;
|
import kr.co.enicom.acs.system.ServerSettingActivity;
|
||||||
@ -79,7 +80,7 @@ public class MgtSystemSettingsActivity extends BaseActivity implements RfidManag
|
|||||||
private TextView mSystemAutoRebootPeriodText = null, mSystemAutoRebootHourText = null;
|
private TextView mSystemAutoRebootPeriodText = null, mSystemAutoRebootHourText = null;
|
||||||
private String[] mBiometricsValuesList= null;
|
private String[] mBiometricsValuesList= null;
|
||||||
|
|
||||||
ConstraintLayout mConstraintLayout= null;
|
//ConstraintLayout mConstraintLayout= null;
|
||||||
private ImageView mAutoForgeryImage = null , mAutoForgeryToggle = null, mAutoMaskWearImage = null, mAutoMaskWearToggle = null;
|
private ImageView mAutoForgeryImage = null , mAutoForgeryToggle = null, mAutoMaskWearImage = null, mAutoMaskWearToggle = null;
|
||||||
private ImageView mManagerLoginCaptureSendImage = null, mManagerLoginCaptureSendToggle = null;
|
private ImageView mManagerLoginCaptureSendImage = null, mManagerLoginCaptureSendToggle = null;
|
||||||
@Override
|
@Override
|
||||||
@ -89,7 +90,7 @@ public class MgtSystemSettingsActivity extends BaseActivity implements RfidManag
|
|||||||
setContentView(R.layout.mgt_systemsettings);
|
setContentView(R.layout.mgt_systemsettings);
|
||||||
|
|
||||||
//mEncryptionMode setting?
|
//mEncryptionMode setting?
|
||||||
mConstraintLayout = findViewById(R.id.mainLayout);
|
//mConstraintLayout = findViewById(R.id.mainLayout);
|
||||||
menuKeySetting();
|
menuKeySetting();
|
||||||
|
|
||||||
dataInit();
|
dataInit();
|
||||||
@ -258,6 +259,19 @@ public class MgtSystemSettingsActivity extends BaseActivity implements RfidManag
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Button attendancesettingbutton = (Button) findViewById(R.id.attendancesettingbutton);
|
||||||
|
attendancesettingbutton.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Intent intent = new Intent(MgtSystemSettingsActivity.this, AttendanceSettingActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Button dataservermenubutton = (Button) findViewById(R.id.dataservermenubutton);
|
Button dataservermenubutton = (Button) findViewById(R.id.dataservermenubutton);
|
||||||
dataservermenubutton.setOnClickListener(new Button.OnClickListener() {
|
dataservermenubutton.setOnClickListener(new Button.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -364,26 +378,26 @@ public class MgtSystemSettingsActivity extends BaseActivity implements RfidManag
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ImageView systemattendanceimage = (ImageView) findViewById(R.id.systemattendanceimage);
|
// ImageView systemattendanceimage = (ImageView) findViewById(R.id.systemattendanceimage);
|
||||||
systemattendanceimage.setOnClickListener(new Button.OnClickListener() {
|
// systemattendanceimage.setOnClickListener(new Button.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View view) {
|
// public void onClick(View view) {
|
||||||
if(GlobalInfo.mUseAttendance == 0) {
|
// if(GlobalInfo.mUseAttendance == 0) {
|
||||||
systemattendanceimage.setImageResource(R.drawable.toggle_pressed);
|
// systemattendanceimage.setImageResource(R.drawable.toggle_pressed);
|
||||||
GlobalInfo.mUseAttendance = 1;
|
// GlobalInfo.mUseAttendance = 1;
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
GlobalInfo.mUseAttendance = 0;
|
// GlobalInfo.mUseAttendance = 0;
|
||||||
systemattendanceimage.setImageResource(R.drawable.toggle_nor);
|
// systemattendanceimage.setImageResource(R.drawable.toggle_nor);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
if(GlobalInfo.mUseAttendance == 0) {
|
// if(GlobalInfo.mUseAttendance == 0) {
|
||||||
systemattendanceimage.setImageResource(R.drawable.toggle_nor);
|
// systemattendanceimage.setImageResource(R.drawable.toggle_nor);
|
||||||
} else {
|
// } else {
|
||||||
systemattendanceimage.setImageResource(R.drawable.toggle_pressed);
|
// systemattendanceimage.setImageResource(R.drawable.toggle_pressed);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -591,6 +591,19 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
|||||||
Button buttonCancel = (Button) dialog.findViewById(R.id.buttonCancel);
|
Button buttonCancel = (Button) dialog.findViewById(R.id.buttonCancel);
|
||||||
|
|
||||||
Date currentTime = Calendar.getInstance().getTime();
|
Date currentTime = Calendar.getInstance().getTime();
|
||||||
|
if(mode == DATE_POPUP) {
|
||||||
|
if(mPickerTarget.equalsIgnoreCase("s")) {
|
||||||
|
if(mStartDate.length() > 0) {
|
||||||
|
currentTime = GlobalInfo.convertDateTimeStringToDate(GlobalInfo.convertDateToSimple(mStartDate) + "000000");
|
||||||
|
}
|
||||||
|
} else if(mPickerTarget.equalsIgnoreCase("e")) {
|
||||||
|
if(mEndDate.length() > 0) {
|
||||||
|
currentTime = GlobalInfo.convertDateTimeStringToDate(GlobalInfo.convertDateToSimple(mEndDate) + "000000");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
SimpleDateFormat dayFormat = new SimpleDateFormat("dd", Locale.getDefault());
|
SimpleDateFormat dayFormat = new SimpleDateFormat("dd", Locale.getDefault());
|
||||||
SimpleDateFormat monthFormat = new SimpleDateFormat("MM", Locale.getDefault());
|
SimpleDateFormat monthFormat = new SimpleDateFormat("MM", Locale.getDefault());
|
||||||
SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy", Locale.getDefault());
|
SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy", Locale.getDefault());
|
||||||
@ -691,28 +704,47 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
|||||||
minuteValues[i] = String.format("%02d", i);
|
minuteValues[i] = String.format("%02d", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int startHour = 9;
|
||||||
|
int startMinute = 0;
|
||||||
|
int endHour = 18;
|
||||||
|
int endMinute = 0;
|
||||||
|
|
||||||
|
if(mTimeText.length() > 0) {
|
||||||
|
Log.w("RITO", "mTimeText : " + mTimeText.getText());
|
||||||
|
String[] split = mTimeText.getText().toString().split("~");
|
||||||
|
if(split.length == 2) {
|
||||||
|
String[] subSplit = split[0].trim().split(":");
|
||||||
|
startHour = Integer.parseInt(subSplit[0]);
|
||||||
|
startMinute = Integer.parseInt(subSplit[1]);
|
||||||
|
|
||||||
|
subSplit = split[1].trim().split(":");
|
||||||
|
endHour = Integer.parseInt(subSplit[0]);
|
||||||
|
endMinute = Integer.parseInt(subSplit[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
numberpickertime.setMinValue(0);
|
numberpickertime.setMinValue(0);
|
||||||
numberpickertime.setMaxValue(23);
|
numberpickertime.setMaxValue(23);
|
||||||
numberpickertime.setValue(9);
|
numberpickertime.setValue(startHour);
|
||||||
numberpickertime.setDisplayedValues(hourValues);
|
numberpickertime.setDisplayedValues(hourValues);
|
||||||
numberpickertime.setWrapSelectorWheel(false);
|
numberpickertime.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
numberpickerminute.setMinValue(0);
|
numberpickerminute.setMinValue(0);
|
||||||
numberpickerminute.setMaxValue(59);
|
numberpickerminute.setMaxValue(59);
|
||||||
numberpickerminute.setValue(0);
|
numberpickerminute.setValue(startMinute);
|
||||||
numberpickerminute.setDisplayedValues(minuteValues);
|
numberpickerminute.setDisplayedValues(minuteValues);
|
||||||
numberpickerminute.setWrapSelectorWheel(false);
|
numberpickerminute.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
|
|
||||||
numberpickertime2.setMinValue(0);
|
numberpickertime2.setMinValue(0);
|
||||||
numberpickertime2.setMaxValue(23);
|
numberpickertime2.setMaxValue(23);
|
||||||
numberpickertime2.setValue(18);
|
numberpickertime2.setValue(endHour);
|
||||||
numberpickertime2.setDisplayedValues(hourValues);
|
numberpickertime2.setDisplayedValues(hourValues);
|
||||||
numberpickertime2.setWrapSelectorWheel(false);
|
numberpickertime2.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
numberpickerminute2.setMinValue(0);
|
numberpickerminute2.setMinValue(0);
|
||||||
numberpickerminute2.setMaxValue(59);
|
numberpickerminute2.setMaxValue(59);
|
||||||
numberpickerminute2.setValue(0);
|
numberpickerminute2.setValue(endMinute);
|
||||||
numberpickerminute2.setDisplayedValues(minuteValues);
|
numberpickerminute2.setDisplayedValues(minuteValues);
|
||||||
numberpickerminute2.setWrapSelectorWheel(false);
|
numberpickerminute2.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
@ -825,13 +857,22 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
|||||||
Button editstartdatebutton = (Button) dialog.findViewById(R.id.editstartdatebutton);
|
Button editstartdatebutton = (Button) dialog.findViewById(R.id.editstartdatebutton);
|
||||||
Button editenddatebutton = (Button) dialog.findViewById(R.id.editenddatebutton);
|
Button editenddatebutton = (Button) dialog.findViewById(R.id.editenddatebutton);
|
||||||
|
|
||||||
|
if(mDateText.length() > 0) {
|
||||||
|
Log.w("RITO", "mDateText : " + mDateText.getText());
|
||||||
|
String[] split = mDateText.getText().toString().split("~");
|
||||||
|
if(split.length == 2) {
|
||||||
|
mStartDate = split[0].trim();
|
||||||
|
mEndDate = split[1].trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
editstartdatebutton.setOnClickListener(new View.OnClickListener() {
|
editstartdatebutton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
try {
|
try {
|
||||||
//numberPicker(menu, 0, editstartdate.getText().toString());
|
//numberPicker(menu, 0, editstartdate.getText().toString());
|
||||||
mPickerTarget = "s";
|
mPickerTarget = "s";
|
||||||
numberPicker(0, dialog);
|
numberPicker(DATE_POPUP, dialog);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -845,7 +886,7 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
|||||||
try {
|
try {
|
||||||
//numberPicker(menu, 1, editenddate.getText().toString());
|
//numberPicker(menu, 1, editenddate.getText().toString());
|
||||||
mPickerTarget = "e";
|
mPickerTarget = "e";
|
||||||
numberPicker(0, dialog);
|
numberPicker(DATE_POPUP, dialog);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -864,10 +905,16 @@ public class MgtUserInfoActivity extends BaseActivity implements RfidManager.re
|
|||||||
editstartdate.setText(startdate);
|
editstartdate.setText(startdate);
|
||||||
editenddate.setText(enddate);
|
editenddate.setText(enddate);
|
||||||
|
|
||||||
if (mStartDate.length() > 0)
|
if (mStartDate.length() > 0) {
|
||||||
editstartdate.setText(mStartDate);
|
editstartdate.setText(mStartDate);
|
||||||
if (mEndDate.length() > 0)
|
} else {
|
||||||
|
mStartDate = startdate;
|
||||||
|
}
|
||||||
|
if (mEndDate.length() > 0) {
|
||||||
editenddate.setText(mEndDate);
|
editenddate.setText(mEndDate);
|
||||||
|
} else {
|
||||||
|
mEndDate = enddate;
|
||||||
|
}
|
||||||
|
|
||||||
Button buttonConfirm = (Button) dialog.findViewById(R.id.buttonConfirm);
|
Button buttonConfirm = (Button) dialog.findViewById(R.id.buttonConfirm);
|
||||||
Button buttonCancel = (Button) dialog.findViewById(R.id.buttonCancel);
|
Button buttonCancel = (Button) dialog.findViewById(R.id.buttonCancel);
|
||||||
|
@ -0,0 +1,438 @@
|
|||||||
|
package kr.co.enicom.acs.system;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.InputType;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.NumberPicker;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import kr.co.enicom.acs.BaseActivity;
|
||||||
|
import kr.co.enicom.acs.GlobalInfo;
|
||||||
|
import kr.co.enicom.acs.MainActivity;
|
||||||
|
import kr.co.enicom.acs.R;
|
||||||
|
import kr.co.enicom.acs.manage.MgtSystemSettingsActivity;
|
||||||
|
|
||||||
|
public class AttendanceSettingActivity extends BaseActivity {
|
||||||
|
|
||||||
|
private ImageView mMenuKey[] = null;
|
||||||
|
|
||||||
|
private final int DEVICE_ID_POPUP = 0;
|
||||||
|
private final int DEVICE_NAME_POPUP = 1;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_attendance_setting);
|
||||||
|
|
||||||
|
menuKeySetting();
|
||||||
|
|
||||||
|
mStartTimeText = findViewById(R.id.attendancesettingstarttimetext);
|
||||||
|
mEndTimeText = findViewById(R.id.attendancesettingendtimetext);
|
||||||
|
mAutoModeDurationText = findViewById(R.id.attendancesettingautomodedurationtext);
|
||||||
|
|
||||||
|
ImageView attendancesettinguseimage = (ImageView) findViewById(R.id.attendancesettinguseimage);
|
||||||
|
attendancesettinguseimage.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if(GlobalInfo.mUseAttendance == 0) {
|
||||||
|
attendancesettinguseimage.setImageResource(R.drawable.toggle_pressed);
|
||||||
|
GlobalInfo.mUseAttendance = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GlobalInfo.mUseAttendance = 0;
|
||||||
|
attendancesettinguseimage.setImageResource(R.drawable.toggle_nor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(GlobalInfo.mUseAttendance == 0) {
|
||||||
|
attendancesettinguseimage.setImageResource(R.drawable.toggle_nor);
|
||||||
|
} else {
|
||||||
|
attendancesettinguseimage.setImageResource(R.drawable.toggle_pressed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ImageView attendancesettingautomodeuseimage = (ImageView) findViewById(R.id.attendancesettingautomodeuseimage);
|
||||||
|
attendancesettingautomodeuseimage.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 0) {
|
||||||
|
attendancesettingautomodeuseimage.setImageResource(R.drawable.toggle_pressed);
|
||||||
|
GlobalInfo.mUseAttendanceAutoMode = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GlobalInfo.mUseAttendanceAutoMode = 0;
|
||||||
|
attendancesettingautomodeuseimage.setImageResource(R.drawable.toggle_nor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if(GlobalInfo.mUseAttendanceAutoMode == 0) {
|
||||||
|
attendancesettingautomodeuseimage.setImageResource(R.drawable.toggle_nor);
|
||||||
|
} else {
|
||||||
|
attendancesettingautomodeuseimage.setImageResource(R.drawable.toggle_pressed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Button button = (Button) findViewById(R.id.attendancesettingstarttimeimagebutton) ;
|
||||||
|
button.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
// TODO : click event
|
||||||
|
mTimePopupTarget = 0;
|
||||||
|
numberPicker(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
button = (Button) findViewById(R.id.attendancesettingendtimeimagebutton) ;
|
||||||
|
button.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
// TODO : click event
|
||||||
|
mTimePopupTarget = 1;
|
||||||
|
numberPicker(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
button = (Button) findViewById(R.id.attendancesettingautomodedurationimagebutton) ;
|
||||||
|
button.setOnClickListener(new Button.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
// TODO : click event
|
||||||
|
systemPopup(0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
updateTimeTextFromGlobal();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void menuKeySetting()
|
||||||
|
{
|
||||||
|
mMenuKey = new ImageView[2];
|
||||||
|
mMenuKey[0] = (ImageView) findViewById(R.id.logincard_title_back) ;
|
||||||
|
mMenuKey[0].setOnTouchListener(new View.OnTouchListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
if(!mIsIntent) {
|
||||||
|
mIsIntent = true;
|
||||||
|
Intent intent = new Intent(getApplicationContext(), MgtSystemSettingsActivity.class);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mMenuKey[1] = (ImageView) findViewById(R.id.logincard_title_home) ;
|
||||||
|
mMenuKey[1].setOnTouchListener(new View.OnTouchListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
if(!mIsIntent) {
|
||||||
|
mIsIntent = true;
|
||||||
|
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void systemPopup(final int mode)
|
||||||
|
{
|
||||||
|
final Dialog dialog = new Dialog(this);
|
||||||
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
dialog.setContentView(R.layout.custom_dialog);
|
||||||
|
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
FrameLayout layoutdialogtitle = (FrameLayout) dialog.findViewById(R.id.layoutdialogtitle);
|
||||||
|
TextView textview = (TextView) dialog.findViewById(R.id.dialogtitle);
|
||||||
|
EditText dialogedit = (EditText) dialog.findViewById(R.id.dialogedit);
|
||||||
|
Button buttonConfirm = (Button) dialog.findViewById(R.id.buttonConfirm);
|
||||||
|
Button buttonCancel = (Button) dialog.findViewById(R.id.buttonCancel);
|
||||||
|
|
||||||
|
final NumberPicker np = (NumberPicker) dialog.findViewById(R.id.dialognumberpicker);
|
||||||
|
layoutdialogtitle.setVisibility(View.VISIBLE);
|
||||||
|
np.setVisibility(View.INVISIBLE);
|
||||||
|
|
||||||
|
textview.setText(R.string.mgt_system_attendance_duration_popup_text);
|
||||||
|
dialogedit.setText(mAutoModeDurationText.getText().toString());
|
||||||
|
|
||||||
|
np.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
|
||||||
|
setDividerColor(np, android.R.color.white);
|
||||||
|
setSelectedTextColor(np);
|
||||||
|
|
||||||
|
np.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
|
||||||
|
setSelectedTextColor(np);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogedit.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||||
|
|
||||||
|
buttonConfirm.setOnClickListener(new View.OnClickListener(){
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
boolean dismiss = true;
|
||||||
|
try {
|
||||||
|
GlobalInfo.mAttendanceAutoTimeMinute = Integer.parseInt(dialogedit.getText().toString());
|
||||||
|
mAutoModeDurationText.setText(dialogedit.getText());
|
||||||
|
} catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
if(dismiss)
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
buttonCancel.setOnClickListener(new View.OnClickListener(){
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private final int DATE_POPUP = 0;
|
||||||
|
private final int TIME_POPUP = 1;
|
||||||
|
private int mTimePopupTarget = 0;
|
||||||
|
private TextView mStartTimeText = null;
|
||||||
|
private TextView mEndTimeText = null;
|
||||||
|
private TextView mAutoModeDurationText = null;
|
||||||
|
private NumberPicker numberpickeryear = null, numberpickermonth = null, numberpickerday = null;
|
||||||
|
private NumberPicker numberpickertime = null, numberpickerminute = null, numberpickertime2 = null, numberpickerminute2 = null;
|
||||||
|
|
||||||
|
private void setDividerColor(NumberPicker picker, int color){
|
||||||
|
Field[] pickerFields = NumberPicker.class.getDeclaredFields();
|
||||||
|
for(Field pf : pickerFields){
|
||||||
|
if(pf.getName().equals("mSelectionDivider")){
|
||||||
|
pf.setAccessible(true);
|
||||||
|
try{
|
||||||
|
ColorDrawable colorDrawable = new ColorDrawable(color);
|
||||||
|
pf.set(picker, colorDrawable);
|
||||||
|
}catch(Exception e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedTextColor(NumberPicker np) {
|
||||||
|
final int count = np.getChildCount();
|
||||||
|
for(int i = 0; i < count; i++){
|
||||||
|
View child = np.getChildAt(i);
|
||||||
|
if(child instanceof EditText){
|
||||||
|
try{
|
||||||
|
Field selectorWheelPaintField = np.getClass().getDeclaredField("mSelectorWheelPaint");
|
||||||
|
selectorWheelPaintField.setAccessible(true);
|
||||||
|
((EditText) child).setTextSize(42);
|
||||||
|
((EditText) child).setTextColor(Color.parseColor("#333333"));
|
||||||
|
np.performClick();
|
||||||
|
}
|
||||||
|
catch(NoSuchFieldException e){
|
||||||
|
}
|
||||||
|
catch(IllegalArgumentException e){
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void numberPicker(final int mode)
|
||||||
|
{
|
||||||
|
numberpickeryear = null;
|
||||||
|
numberpickermonth = null;
|
||||||
|
numberpickerday = null;
|
||||||
|
numberpickertime = null;
|
||||||
|
numberpickerminute = null;
|
||||||
|
|
||||||
|
final Dialog dialog = new Dialog(this);
|
||||||
|
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
if(mode == DATE_POPUP)
|
||||||
|
dialog.setContentView(R.layout.date_yyyymmdd_dialog);
|
||||||
|
else
|
||||||
|
dialog.setContentView(R.layout.date_hhmm_dialog);
|
||||||
|
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
|
|
||||||
|
|
||||||
|
Button buttonConfirm = (Button) dialog.findViewById(R.id.buttonConfirm);
|
||||||
|
Button buttonCancel = (Button) dialog.findViewById(R.id.buttonCancel);
|
||||||
|
|
||||||
|
Date currentTime = Calendar.getInstance().getTime();
|
||||||
|
SimpleDateFormat dayFormat = new SimpleDateFormat("dd", Locale.getDefault());
|
||||||
|
SimpleDateFormat monthFormat = new SimpleDateFormat("MM", Locale.getDefault());
|
||||||
|
SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy", Locale.getDefault());
|
||||||
|
SimpleDateFormat timeFormat = new SimpleDateFormat("HH", Locale.getDefault());
|
||||||
|
SimpleDateFormat minuteFormat = new SimpleDateFormat("mm", Locale.getDefault());
|
||||||
|
|
||||||
|
String year = yearFormat.format(currentTime);
|
||||||
|
String month = monthFormat.format(currentTime);
|
||||||
|
String day = dayFormat.format(currentTime);
|
||||||
|
String time = timeFormat.format(currentTime);
|
||||||
|
String minute = minuteFormat.format(currentTime);
|
||||||
|
|
||||||
|
Calendar maxday = Calendar.getInstance();
|
||||||
|
maxday.set(Integer.valueOf(year),Integer.valueOf(month) -1,1);
|
||||||
|
|
||||||
|
if(mode == DATE_POPUP) {
|
||||||
|
|
||||||
|
}else {
|
||||||
|
numberpickertime = (NumberPicker) dialog.findViewById(R.id.numberpickertime);
|
||||||
|
numberpickerminute = (NumberPicker) dialog.findViewById(R.id.numberpickerminute);
|
||||||
|
|
||||||
|
int hour;
|
||||||
|
int minutes;
|
||||||
|
if(mTimePopupTarget == 0) {
|
||||||
|
hour = GlobalInfo.mAttendanceStartTime / 60;
|
||||||
|
minutes = GlobalInfo.mAttendanceStartTime % 60;
|
||||||
|
} else {
|
||||||
|
hour = GlobalInfo.mAttendanceEndTime / 60;
|
||||||
|
minutes = GlobalInfo.mAttendanceEndTime % 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
numberpickertime.setMinValue(0);
|
||||||
|
numberpickertime.setMaxValue(23);
|
||||||
|
numberpickertime.setValue(hour);
|
||||||
|
numberpickertime.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
|
numberpickerminute.setMinValue(0);
|
||||||
|
numberpickerminute.setMaxValue(59);
|
||||||
|
numberpickerminute.setValue(minutes);
|
||||||
|
numberpickerminute.setWrapSelectorWheel(false);
|
||||||
|
|
||||||
|
numberpickertime.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
|
||||||
|
setDividerColor(numberpickertime, android.R.color.white);
|
||||||
|
setSelectedTextColor(numberpickertime);
|
||||||
|
numberpickertime.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
|
||||||
|
setSelectedTextColor(picker);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
numberpickerminute.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
|
||||||
|
setDividerColor(numberpickerminute, android.R.color.white);
|
||||||
|
setSelectedTextColor(numberpickerminute);
|
||||||
|
numberpickerminute.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
|
||||||
|
setSelectedTextColor(picker);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonConfirm.setOnClickListener(new View.OnClickListener(){
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
try{
|
||||||
|
if(mTimePopupTarget == 0) {
|
||||||
|
GlobalInfo.mAttendanceStartTime = numberpickertime.getValue() * 60 + numberpickerminute.getValue();
|
||||||
|
mStartTimeText.setText(String.format("%02d:%02d", numberpickertime.getValue(), numberpickerminute.getValue()));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GlobalInfo.mAttendanceEndTime = numberpickertime.getValue() * 60 + numberpickerminute.getValue();
|
||||||
|
mEndTimeText.setText(String.format("%02d:%02d", numberpickertime.getValue(), numberpickerminute.getValue()));
|
||||||
|
}
|
||||||
|
}catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}finally {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
buttonCancel.setOnClickListener(new View.OnClickListener(){
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
dialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dialog.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void updateTimeTextFromGlobal() {
|
||||||
|
mStartTimeText.setText(String.format("%02d:%02d", GlobalInfo.mAttendanceStartTime / 60, GlobalInfo.mAttendanceStartTime % 60));
|
||||||
|
mEndTimeText.setText(String.format("%02d:%02d", GlobalInfo.mAttendanceEndTime / 60, GlobalInfo.mAttendanceEndTime % 60));
|
||||||
|
mAutoModeDurationText.setText(String.format("%d", GlobalInfo.mAttendanceAutoTimeMinute));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStart() {
|
||||||
|
//checkVerify();
|
||||||
|
//refresh();
|
||||||
|
View decorView = getWindow().getDecorView();
|
||||||
|
// Hide the status bar.
|
||||||
|
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE;
|
||||||
|
decorView.setSystemUiVisibility(uiOptions);
|
||||||
|
|
||||||
|
super.onStart();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
|
||||||
|
GlobalInfo.updateDatabase(GlobalInfo.TARGET_FLAG_DEVICE_INFO);
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finish() {
|
||||||
|
super.finish();
|
||||||
|
|
||||||
|
Intent intent = new Intent(AttendanceSettingActivity.this, MainActivity.class);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
//intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||||
|
startActivity(intent);
|
||||||
|
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ package kr.co.enicom.acs.system;
|
|||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -19,6 +20,7 @@ import kr.co.enicom.acs.R;
|
|||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_FACE;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_FACE;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_FINGER_FACE;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_FINGER_FACE;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_FINGER_PRINT;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_FINGER_PRINT;
|
||||||
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_RFID;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN;
|
||||||
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN_FACE;
|
import static kr.co.enicom.acs.GlobalInfo.VERIFY_METHOD_VEIN_FACE;
|
||||||
|
|
||||||
@ -101,19 +103,57 @@ public class LoginMenuActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(GlobalInfo.isActivatedMethod(VERIFY_METHOD_FINGER_PRINT))
|
Log.w("RITO", String.format("mVerifyMethod : %d, mVerifyActivateMethod : %d", GlobalInfo.mVerifyMethod, GlobalInfo.mVerifyActivateMethod));
|
||||||
|
|
||||||
|
if(GlobalInfo.isVerifyMethod(VERIFY_METHOD_FINGER_PRINT))
|
||||||
{
|
{
|
||||||
mImageView[2].setVisibility(View.GONE);
|
mImageView[2].setVisibility(View.GONE);
|
||||||
mImageView[4].setVisibility(View.GONE);
|
mImageView[4].setVisibility(View.GONE);
|
||||||
}else if(GlobalInfo.isActivatedMethod(VERIFY_METHOD_VEIN))
|
|
||||||
|
if(!GlobalInfo.isVerifyMethod(VERIFY_METHOD_RFID)) {
|
||||||
|
mImageView[1].setVisibility(View.GONE);
|
||||||
|
|
||||||
|
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) mImageView[0].getLayoutParams();
|
||||||
|
param.setMarginStart(245);
|
||||||
|
mImageView[0].setLayoutParams(param);
|
||||||
|
|
||||||
|
param = (ViewGroup.MarginLayoutParams) mImageView[3].getLayoutParams();
|
||||||
|
param.setMarginStart(653);
|
||||||
|
mImageView[3].setLayoutParams(param);
|
||||||
|
}
|
||||||
|
}else if(GlobalInfo.isVerifyMethod(VERIFY_METHOD_VEIN))
|
||||||
{
|
{
|
||||||
mImageView[3].setVisibility(View.GONE);
|
mImageView[3].setVisibility(View.GONE);
|
||||||
mImageView[4].setVisibility(View.GONE);
|
mImageView[4].setVisibility(View.GONE);
|
||||||
}else if(GlobalInfo.isActivatedMethod(VERIFY_METHOD_FACE))
|
|
||||||
|
if(!GlobalInfo.isVerifyMethod(VERIFY_METHOD_RFID)) {
|
||||||
|
mImageView[1].setVisibility(View.GONE);
|
||||||
|
|
||||||
|
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) mImageView[0].getLayoutParams();
|
||||||
|
param.setMarginStart(245);
|
||||||
|
mImageView[0].setLayoutParams(param);
|
||||||
|
|
||||||
|
param = (ViewGroup.MarginLayoutParams) mImageView[2].getLayoutParams();
|
||||||
|
param.setMarginStart(653);
|
||||||
|
mImageView[2].setLayoutParams(param);
|
||||||
|
}
|
||||||
|
}else if(GlobalInfo.isVerifyMethod(VERIFY_METHOD_FACE))
|
||||||
{
|
{
|
||||||
mImageView[2].setVisibility(View.GONE);
|
mImageView[2].setVisibility(View.GONE);
|
||||||
mImageView[3].setVisibility(View.GONE);
|
mImageView[3].setVisibility(View.GONE);
|
||||||
}else if(GlobalInfo.isActivatedMethod(VERIFY_METHOD_VEIN_FACE) || GlobalInfo.isActivatedMethod(VERIFY_METHOD_FINGER_FACE))
|
|
||||||
|
if(!GlobalInfo.isVerifyMethod(VERIFY_METHOD_RFID)) {
|
||||||
|
mImageView[1].setVisibility(View.GONE);
|
||||||
|
|
||||||
|
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) mImageView[0].getLayoutParams();
|
||||||
|
param.setMarginStart(245);
|
||||||
|
mImageView[0].setLayoutParams(param);
|
||||||
|
|
||||||
|
param = (ViewGroup.MarginLayoutParams) mImageView[4].getLayoutParams();
|
||||||
|
param.setMarginStart(653);
|
||||||
|
mImageView[4].setLayoutParams(param);
|
||||||
|
}
|
||||||
|
}else if(GlobalInfo.isVerifyMethod(VERIFY_METHOD_VEIN_FACE) || GlobalInfo.isVerifyMethod(VERIFY_METHOD_FINGER_FACE))
|
||||||
{
|
{
|
||||||
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) mImageView[0].getLayoutParams();
|
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) mImageView[0].getLayoutParams();
|
||||||
param.setMarginStart(245);
|
param.setMarginStart(245);
|
||||||
@ -143,6 +183,18 @@ public class LoginMenuActivity extends BaseActivity {
|
|||||||
param.topMargin = 326;
|
param.topMargin = 326;
|
||||||
mImageView[3].setLayoutParams(param);
|
mImageView[3].setLayoutParams(param);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
mImageView[2].setVisibility(View.GONE);
|
||||||
|
mImageView[3].setVisibility(View.GONE);
|
||||||
|
mImageView[4].setVisibility(View.GONE);
|
||||||
|
|
||||||
|
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) mImageView[0].getLayoutParams();
|
||||||
|
param.setMarginStart(245);
|
||||||
|
mImageView[0].setLayoutParams(param);
|
||||||
|
|
||||||
|
param = (ViewGroup.MarginLayoutParams) mImageView[1].getLayoutParams();
|
||||||
|
param.setMarginStart(653);
|
||||||
|
mImageView[1].setLayoutParams(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
281
app/src/main/res/layout/activity_attendance_setting.xml
Normal file
281
app/src/main/res/layout/activity_attendance_setting.xml
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".system.ServerSettingActivity">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/frameLayout"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="94px"
|
||||||
|
android:background="@drawable/title_bar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/frameLayout2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/logincard_title_back"
|
||||||
|
android:layout_width="43px"
|
||||||
|
android:layout_height="45px"
|
||||||
|
android:layout_marginStart="44px"
|
||||||
|
android:layout_marginTop="28px"
|
||||||
|
app:srcCompat="@drawable/title_back_icon" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/logincard_title_home"
|
||||||
|
android:layout_width="61px"
|
||||||
|
android:layout_height="50px"
|
||||||
|
android:layout_marginStart="140px"
|
||||||
|
android:layout_marginTop="25px"
|
||||||
|
app:srcCompat="@drawable/title_home_icon" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title_menu"
|
||||||
|
android:layout_width="280px"
|
||||||
|
android:layout_height="55px"
|
||||||
|
android:layout_marginStart="528px"
|
||||||
|
android:layout_marginTop="20px"
|
||||||
|
android:alpha="1"
|
||||||
|
android:fontFamily="@font/nanumbarungothicbold"
|
||||||
|
android:text="@string/mgt_system_attendance_setting_text"
|
||||||
|
android:textColor="#ffffff"
|
||||||
|
android:textSize="48px"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/frameLayout2"
|
||||||
|
android:layout_width="1280px"
|
||||||
|
android:layout_height="626px"
|
||||||
|
android:layout_marginTop="94px"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/frameLayout">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="94px"
|
||||||
|
android:background="@drawable/layout_border">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="400px"
|
||||||
|
android:layout_height="150px"
|
||||||
|
android:layout_marginStart="40px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:text="@string/mgt_system_attendance_setting_use_text"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="386px"
|
||||||
|
android:layout_height="144px"
|
||||||
|
android:layout_marginStart="778px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:textAlignment="viewEnd"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="19px"
|
||||||
|
android:layout_height="38px"
|
||||||
|
android:layout_marginStart="1217px"
|
||||||
|
android:layout_marginTop="27px"
|
||||||
|
app:srcCompat="@drawable/list_arrow_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/attendancesettinguseimage"
|
||||||
|
android:layout_width="105px"
|
||||||
|
android:layout_height="56px"
|
||||||
|
android:layout_marginStart="1135px"
|
||||||
|
android:layout_marginTop="20px"
|
||||||
|
app:srcCompat="@drawable/toggle_pressed" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="94px"
|
||||||
|
android:background="@drawable/layout_border">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="400px"
|
||||||
|
android:layout_height="150px"
|
||||||
|
android:layout_marginStart="40px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:text="@string/mgt_system_attendance_setting_automode_use_text"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="386px"
|
||||||
|
android:layout_height="144px"
|
||||||
|
android:layout_marginStart="778px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:textAlignment="viewEnd"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="19px"
|
||||||
|
android:layout_height="38px"
|
||||||
|
android:layout_marginStart="1217px"
|
||||||
|
android:layout_marginTop="27px"
|
||||||
|
app:srcCompat="@drawable/list_arrow_icon" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/attendancesettingautomodeuseimage"
|
||||||
|
android:layout_width="105px"
|
||||||
|
android:layout_height="56px"
|
||||||
|
android:layout_marginStart="1135px"
|
||||||
|
android:layout_marginTop="20px"
|
||||||
|
app:srcCompat="@drawable/toggle_pressed" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="94px"
|
||||||
|
android:background="@drawable/layout_border">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="400px"
|
||||||
|
android:layout_height="150px"
|
||||||
|
android:layout_marginStart="40px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:text="@string/mgt_system_attendance_setting_start_time_text"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/attendancesettingstarttimetext"
|
||||||
|
android:layout_width="386px"
|
||||||
|
android:layout_height="144px"
|
||||||
|
android:layout_marginStart="778px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:textAlignment="viewEnd"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/attendancesettingstarttimeimage"
|
||||||
|
android:layout_width="44px"
|
||||||
|
android:layout_height="42px"
|
||||||
|
android:layout_marginStart="1193px"
|
||||||
|
android:layout_marginTop="26px"
|
||||||
|
app:srcCompat="@drawable/list_edit_icon" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/attendancesettingstarttimeimagebutton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#00000000" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="94px"
|
||||||
|
android:background="@drawable/layout_border">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="400px"
|
||||||
|
android:layout_height="150px"
|
||||||
|
android:layout_marginStart="40px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:text="@string/mgt_system_attendance_setting_end_time_text"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/attendancesettingendtimetext"
|
||||||
|
android:layout_width="386px"
|
||||||
|
android:layout_height="144px"
|
||||||
|
android:layout_marginStart="778px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:textAlignment="viewEnd"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/attendancesettingendtimeimage"
|
||||||
|
android:layout_width="44px"
|
||||||
|
android:layout_height="42px"
|
||||||
|
android:layout_marginStart="1193px"
|
||||||
|
android:layout_marginTop="26px"
|
||||||
|
app:srcCompat="@drawable/list_edit_icon" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/attendancesettingendtimeimagebutton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#00000000" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="94px"
|
||||||
|
android:background="@drawable/layout_border">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="400px"
|
||||||
|
android:layout_height="150px"
|
||||||
|
android:layout_marginStart="40px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:text="@string/mgt_system_attendance_setting_automode_duration_text"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/attendancesettingautomodedurationtext"
|
||||||
|
android:layout_width="386px"
|
||||||
|
android:layout_height="144px"
|
||||||
|
android:layout_marginStart="778px"
|
||||||
|
android:layout_marginTop="29px"
|
||||||
|
android:textAlignment="viewEnd"
|
||||||
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="42px" />
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/attendancesettingautomodedurationimage"
|
||||||
|
android:layout_width="44px"
|
||||||
|
android:layout_height="42px"
|
||||||
|
android:layout_marginStart="1193px"
|
||||||
|
android:layout_marginTop="26px"
|
||||||
|
app:srcCompat="@drawable/list_edit_icon" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/attendancesettingautomodedurationimagebutton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#00000000" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</android.support.constraint.ConstraintLayout>
|
@ -317,6 +317,58 @@
|
|||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <FrameLayout-->
|
||||||
|
<!-- android:layout_width="match_parent"-->
|
||||||
|
<!-- android:layout_height="94px"-->
|
||||||
|
<!-- android:background="@drawable/layout_border">-->
|
||||||
|
|
||||||
|
<!-- <ImageView-->
|
||||||
|
<!-- android:id="@+id/attendanceimage"-->
|
||||||
|
<!-- android:layout_width="60px"-->
|
||||||
|
<!-- android:layout_height="60px"-->
|
||||||
|
<!-- android:layout_marginStart="40px"-->
|
||||||
|
<!-- android:layout_marginTop="17px"-->
|
||||||
|
<!-- app:srcCompat="@drawable/setting_list_icon_attendance" />-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:layout_width="370px"-->
|
||||||
|
<!-- android:layout_height="425px"-->
|
||||||
|
<!-- android:layout_marginStart="140px"-->
|
||||||
|
<!-- android:layout_marginTop="25px"-->
|
||||||
|
<!-- android:fontFamily="@font/nanumbarungothic"-->
|
||||||
|
<!-- android:text="@string/mgt_system_attendance_text"-->
|
||||||
|
<!-- android:textColor="#333333"-->
|
||||||
|
<!-- android:textSize="42px" />-->
|
||||||
|
|
||||||
|
<!-- <TextView-->
|
||||||
|
<!-- android:id="@+id/attendancetext"-->
|
||||||
|
<!-- android:layout_width="286px"-->
|
||||||
|
<!-- android:layout_height="94px"-->
|
||||||
|
<!-- android:layout_marginStart="878px"-->
|
||||||
|
<!-- android:layout_marginTop="29px"-->
|
||||||
|
<!-- android:textAlignment="viewEnd"-->
|
||||||
|
<!-- android:fontFamily="@font/nanumbarungothic"-->
|
||||||
|
<!-- android:textColor="#666666"-->
|
||||||
|
<!-- android:textSize="42px" />-->
|
||||||
|
|
||||||
|
<!-- <ImageView-->
|
||||||
|
<!-- android:layout_width="19px"-->
|
||||||
|
<!-- android:layout_height="38px"-->
|
||||||
|
<!-- android:layout_marginStart="1217px"-->
|
||||||
|
<!-- android:layout_marginTop="27px"-->
|
||||||
|
<!-- app:srcCompat="@drawable/list_arrow_icon" />-->
|
||||||
|
|
||||||
|
<!-- <ImageView-->
|
||||||
|
<!-- android:id="@+id/systemattendanceimage"-->
|
||||||
|
<!-- android:layout_width="105px"-->
|
||||||
|
<!-- android:layout_height="56px"-->
|
||||||
|
<!-- android:layout_marginStart="1135px"-->
|
||||||
|
<!-- android:layout_marginTop="20px"-->
|
||||||
|
<!-- app:srcCompat="@drawable/toggle_pressed" />-->
|
||||||
|
<!-- </FrameLayout>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="94px"
|
android:layout_height="94px"
|
||||||
@ -336,7 +388,7 @@
|
|||||||
android:layout_marginStart="140px"
|
android:layout_marginStart="140px"
|
||||||
android:layout_marginTop="25px"
|
android:layout_marginTop="25px"
|
||||||
android:fontFamily="@font/nanumbarungothic"
|
android:fontFamily="@font/nanumbarungothic"
|
||||||
android:text="@string/mgt_system_attendance_text"
|
android:text="@string/mgt_system_attendance_setting_text"
|
||||||
android:textColor="#333333"
|
android:textColor="#333333"
|
||||||
android:textSize="42px" />
|
android:textSize="42px" />
|
||||||
|
|
||||||
@ -358,13 +410,11 @@
|
|||||||
android:layout_marginTop="27px"
|
android:layout_marginTop="27px"
|
||||||
app:srcCompat="@drawable/list_arrow_icon" />
|
app:srcCompat="@drawable/list_arrow_icon" />
|
||||||
|
|
||||||
<ImageView
|
<Button
|
||||||
android:id="@+id/systemattendanceimage"
|
android:id="@+id/attendancesettingbutton"
|
||||||
android:layout_width="105px"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56px"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="1135px"
|
android:background="#00000000" />
|
||||||
android:layout_marginTop="20px"
|
|
||||||
app:srcCompat="@drawable/toggle_pressed" />
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
@ -204,6 +204,7 @@
|
|||||||
<string name="mgt_system_biometric_face_text">"얼굴"</string>
|
<string name="mgt_system_biometric_face_text">"얼굴"</string>
|
||||||
<string name="mgt_system_biometric_vein_face_text">"지정맥,얼굴"</string>
|
<string name="mgt_system_biometric_vein_face_text">"지정맥,얼굴"</string>
|
||||||
<string name="mgt_system_biometric_finger_face_text">"지문,얼굴"</string>
|
<string name="mgt_system_biometric_finger_face_text">"지문,얼굴"</string>
|
||||||
|
<string name="mgt_system_attendance_setting_text">"근태관리 설정"</string>
|
||||||
|
|
||||||
<string name="mgt_system_attendance_text">"근태 관리"</string>
|
<string name="mgt_system_attendance_text">"근태 관리"</string>
|
||||||
|
|
||||||
@ -256,6 +257,12 @@
|
|||||||
<string name="mgt_system_door_control_time_use_text">"개방시간 사용"</string>
|
<string name="mgt_system_door_control_time_use_text">"개방시간 사용"</string>
|
||||||
<string name="mgt_system_door_control_time_set_text">"설정시간"</string>
|
<string name="mgt_system_door_control_time_set_text">"설정시간"</string>
|
||||||
|
|
||||||
|
<string name="mgt_system_attendance_setting_use_text">"근태관리 사용"</string>
|
||||||
|
<string name="mgt_system_attendance_setting_automode_use_text">"근태관리 자동전환 사용"</string>
|
||||||
|
<string name="mgt_system_attendance_setting_start_time_text">"출근시간"</string>
|
||||||
|
<string name="mgt_system_attendance_setting_end_time_text">"퇴근시간"</string>
|
||||||
|
<string name="mgt_system_attendance_setting_automode_duration_text">"자동전환 시간(분)"</string>
|
||||||
|
|
||||||
<string name="mgt_system_server1_ip_text">"Server1 IP"</string>
|
<string name="mgt_system_server1_ip_text">"Server1 IP"</string>
|
||||||
<string name="mgt_system_server1_port_text">"Server1 port"</string>
|
<string name="mgt_system_server1_port_text">"Server1 port"</string>
|
||||||
<string name="mgt_system_server1_check_text">"Server1 Check"</string>
|
<string name="mgt_system_server1_check_text">"Server1 Check"</string>
|
||||||
@ -289,6 +296,8 @@
|
|||||||
<string name="mgt_system_autoreboot_period_popup_text">"단말기 자동 재기동 주기를\n 입력해주세요. (1~30일)"</string>
|
<string name="mgt_system_autoreboot_period_popup_text">"단말기 자동 재기동 주기를\n 입력해주세요. (1~30일)"</string>
|
||||||
<string name="mgt_system_autoreboot_hour_popup_text">"단말기 자동 재기동 시간을\n 입력해주세요. (0~23)"</string>
|
<string name="mgt_system_autoreboot_hour_popup_text">"단말기 자동 재기동 시간을\n 입력해주세요. (0~23)"</string>
|
||||||
|
|
||||||
|
<string name="mgt_system_attendance_duration_popup_text">"근태관리 자동 전환 시간을 \n 입력해주세요. (분)"</string>
|
||||||
|
|
||||||
<string name="mgt_system_serialnumber_text">"Serial number"</string>
|
<string name="mgt_system_serialnumber_text">"Serial number"</string>
|
||||||
<string name="mgt_system_firmwareversion_text">"Firmware version"</string>
|
<string name="mgt_system_firmwareversion_text">"Firmware version"</string>
|
||||||
<string name="mgt_system_mac_text">"MAC address"</string>
|
<string name="mgt_system_mac_text">"MAC address"</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user