Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TopPay
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qyw
TopPay
Commits
9559e65e
Commit
9559e65e
authored
Nov 21, 2018
by
qyw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
饭堂支付 定时关机 修改页面适配
parent
a46e2344
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
852 additions
and
145 deletions
+852
-145
AndroidManifest.xml
TOP_Pay/app/src/main/AndroidManifest.xml
+16
-2
BootBroadcastReceiver.java
TOP_Pay/app/src/main/java/com/ifavine/pay/service/BootBroadcastReceiver.java
+25
-0
MainActivity.java
TOP_Pay/app/src/main/java/com/ifavine/pay/ui/activity/MainActivity.java
+86
-6
WelcomeActivity.java
TOP_Pay/app/src/main/java/com/ifavine/pay/ui/activity/WelcomeActivity.java
+26
-0
BaseUtil.java
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/BaseUtil.java
+60
-0
DialogMainSetUtils.java
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/DialogMainSetUtils.java
+226
-8
DialogUtil.java
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/DialogUtil.java
+13
-0
PopWindowMainSet.java
TOP_Pay/app/src/main/java/com/ifavine/pay/view/PopWindowMainSet.java
+9
-1
activity_main.xml
TOP_Pay/app/src/main/res/layout/activity_main.xml
+5
-5
dialog_amt_set.xml
TOP_Pay/app/src/main/res/layout/dialog_amt_set.xml
+4
-4
dialog_common_confirm.xml
TOP_Pay/app/src/main/res/layout/dialog_common_confirm.xml
+2
-2
dialog_common_input_confirm.xml
TOP_Pay/app/src/main/res/layout/dialog_common_input_confirm.xml
+2
-3
dialog_common_ok.xml
TOP_Pay/app/src/main/res/layout/dialog_common_ok.xml
+3
-4
dialog_pwd_set.xml
TOP_Pay/app/src/main/res/layout/dialog_pwd_set.xml
+58
-68
dialog_report_local.xml
TOP_Pay/app/src/main/res/layout/dialog_report_local.xml
+1
-2
dialog_report_record.xml
TOP_Pay/app/src/main/res/layout/dialog_report_record.xml
+2
-2
dialog_report_sum.xml
TOP_Pay/app/src/main/res/layout/dialog_report_sum.xml
+1
-2
dialog_rst_num_set.xml
TOP_Pay/app/src/main/res/layout/dialog_rst_num_set.xml
+20
-34
dialog_shutdown_set.xml
TOP_Pay/app/src/main/res/layout/dialog_shutdown_set.xml
+274
-0
pop_main_set.xml
TOP_Pay/app/src/main/res/layout/pop_main_set.xml
+18
-1
colors.xml
TOP_Pay/app/src/main/res/values/colors.xml
+1
-1
No files found.
TOP_Pay/app/src/main/AndroidManifest.xml
View file @
9559e65e
...
...
@@ -22,6 +22,10 @@
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.READ_LOGS"
/>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
></uses-permission>
<uses-permission
android:name=
"android.permission.WAKE_LOCK"
/>
<uses-permission
android:name=
"android.permission.DISABLE_KEYGUARD"
/>
<uses-feature
android:name=
"android.hardware.camera"
/>
...
...
@@ -37,9 +41,10 @@
android:theme=
"@style/AppTheme"
>
<activity
android:name=
".ui.activity.WelcomeActivity"
android:configChanges=
"orientation|keyboardHidden"
android:label=
"@string/app_name"
android:launchMode=
"singleTask"
android:screenOrientation=
"
l
andscape"
android:screenOrientation=
"
sensorL
andscape"
android:windowSoftInputMode=
"stateAlwaysHidden"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
...
...
@@ -50,13 +55,21 @@
<activity
android:name=
".ui.activity.MainActivity"
android:configChanges=
"orientation|keyboardHidden"
android:label=
"@string/app_name"
android:launchMode=
"singleTask"
android:screenOrientation=
"
l
andscape"
android:screenOrientation=
"
sensorL
andscape"
android:windowSoftInputMode=
"stateAlwaysHidden"
></activity>
<service
android:name=
".utils.DownloadService"
/>
<receiver
android:name=
".service.BootBroadcastReceiver"
>
<intent-filter>
<action
android:name=
"android.intent.action.BOOT_COMPLETED"
/>
</intent-filter>
</receiver>
</application>
</manifest>
\ No newline at end of file
TOP_Pay/app/src/main/java/com/ifavine/pay/service/BootBroadcastReceiver.java
0 → 100644
View file @
9559e65e
package
com
.
ifavine
.
pay
.
service
;
/**
* Created by Administrator on 2018/3/23.
*/
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Intent
;
import
com.ifavine.pay.ui.activity.WelcomeActivity
;
public
class
BootBroadcastReceiver
extends
BroadcastReceiver
{
static
final
String
ACTION
=
"android.intent.action.BOOT_COMPLETED"
;
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
if
(
intent
.
getAction
().
equals
(
ACTION
))
{
Intent
mainActivityIntent
=
new
Intent
(
context
,
WelcomeActivity
.
class
);
// 要启动的Activity
mainActivityIntent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
mainActivityIntent
);
}
}
}
TOP_Pay/app/src/main/java/com/ifavine/pay/ui/activity/MainActivity.java
View file @
9559e65e
...
...
@@ -11,7 +11,9 @@ import android.support.annotation.Nullable;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.view.Display
;
import
android.view.KeyEvent
;
import
android.view.MotionEvent
;
import
android.view.View
;
...
...
@@ -24,6 +26,7 @@ import com.google.gson.Gson;
import
com.google.gson.reflect.TypeToken
;
import
com.ifavine.pay.R
;
import
com.ifavine.pay.api.APIWrapper
;
import
com.ifavine.pay.common.AppContext
;
import
com.ifavine.pay.ui.base.BaseActivity
;
import
com.ifavine.pay.utils.BaseUtil
;
import
com.ifavine.pay.utils.DialogMainSetUtils
;
...
...
@@ -125,6 +128,8 @@ public class MainActivity extends BaseActivity {
private
Dialog
dialogWindow
=
null
;
private
static
boolean
isStart
=
false
;
public
static
int
width
=
1350
;
public
static
int
height
=
720
;
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -135,7 +140,6 @@ public class MainActivity extends BaseActivity {
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
//支付提示
soundPool
=
new
SoundPool
(
3
,
AudioManager
.
STREAM_MUSIC
,
100
);
soundSucess
=
soundPool
.
load
(
mContext
,
R
.
raw
.
success
,
1
);
//加载资源,得到soundId
...
...
@@ -151,7 +155,10 @@ public class MainActivity extends BaseActivity {
if
(
TextUtils
.
isEmpty
(
WindowName
))
{
DialogUtil
.
showOkDialog
(
mContext
,
null
,
"设置信息"
,
"请设置饭堂窗口和消费金额"
,
"确定"
,
null
);
}
BaseUtil
.
isRoot
();
Display
display
=
getWindowManager
().
getDefaultDisplay
();
width
=
display
.
getWidth
();
height
=
display
.
getHeight
();
}
...
...
@@ -204,10 +211,17 @@ public class MainActivity extends BaseActivity {
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
);
updateCanTeenName
();
getServerDate
();
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
getServerDate
();
}
},
15
*
1000
);
initPayInfo
();
//检查网络
Current_Count
=
0
;
startTimer
();
startTimer2
();
if
(!
isStart
)
{
handler
.
postDelayed
(
netRun
,
1000
);
handler
.
postDelayed
(
etRunnable
,
250
);
...
...
@@ -230,6 +244,7 @@ public class MainActivity extends BaseActivity {
protected
void
onDestroy
()
{
super
.
onDestroy
();
stopTimer
();
stopTimer2
();
isStart
=
false
;
handler
.
removeCallbacks
(
netRun
);
handler
.
removeCallbacks
(
etRunnable
);
...
...
@@ -303,6 +318,9 @@ public class MainActivity extends BaseActivity {
}
else
if
(
i
==
2
)
{
Current_Count_DialogInput
=
0
;
dialogInput
=
DialogMainSetUtils
.
showChangePwdDialog
(
mContext
,
"修改管理员密码"
,
null
,
null
,
true
);
}
else
if
(
i
==
3
)
{
Current_Count_DialogInput
=
0
;
dialogWindow
=
DialogMainSetUtils
.
showShutDownDialog
(
mContext
,
"定时关机设置"
,
true
);
}
}
});
...
...
@@ -399,6 +417,64 @@ public class MainActivity extends BaseActivity {
}
}
// 初始化定时器
private
long
dateTime2
=
0
;
private
Timer
timer2
;
private
void
startTimer2
()
{
if
(
timer2
!=
null
)
{
return
;
}
timer2
=
new
Timer
();
timer2
.
schedule
(
new
TimerTask
()
{
@Override
public
void
run
()
{
dateTime2
+=
60
*
1000
;
if
(
isTime2Shutdown
())
{
handler
.
sendEmptyMessage
(
7
);
}
}
},
10
,
60
*
1000
);
}
private
boolean
isTime2Shutdown
()
{
try
{
String
date
=
DateUtil
.
formatDate
(
dateTime2
,
"yyyy-MM-dd"
);
SimpleDateFormat
df
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
for
(
int
i
=
1
;
i
<
6
;
i
++)
{
String
SHD
=
SPUtil
.
getInstance
().
readString
(
"SHD"
+
i
);
TLog
.
log
(
"vvv:"
+
SHD
);
if
(!
TextUtils
.
isEmpty
(
SHD
))
{
if
(
SHD
.
contains
(
"Y"
))
{
try
{
String
time
=
SHD
.
split
(
","
)[
0
];
Date
d
=
df
.
parse
(
date
+
" "
+
time
);
if
(
dateTime2
>
d
.
getTime
()
&&
dateTime2
<
(
d
.
getTime
()
+
(
2
*
60
*
1000
)))
{
TLog
.
log
(
"vvv: true"
);
return
true
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
false
;
}
// 停止定时器
private
void
stopTimer2
()
{
if
(
timer2
!=
null
)
{
timer2
.
cancel
();
// 一定设置为null,否则定时器不会被回收
timer2
=
null
;
}
}
private
Handler
handler
=
new
Handler
()
{
@Override
public
void
handleMessage
(
Message
msg
)
{
...
...
@@ -437,6 +513,11 @@ public class MainActivity extends BaseActivity {
}
break
;
case
7
:
//关机
BaseUtil
.
shutdown
();
break
;
}
}
...
...
@@ -490,6 +571,7 @@ public class MainActivity extends BaseActivity {
String
data
=
response
.
body
().
ModelJson
;
TLog
.
log
(
"aaa"
,
data
);
dateTime
=
BaseUtil
.
getDateFormat
(
data
,
"yyyy/MM/dd hh:mm:ss"
);
dateTime2
=
BaseUtil
.
getDateFormat
(
data
,
"yyyy/MM/dd hh:mm:ss"
);
initPayInfo
();
}
}
...
...
@@ -569,9 +651,8 @@ public class MainActivity extends BaseActivity {
});
}
Gson
gson
=
new
Gson
();
private
Gson
gson
=
new
Gson
();
//线路处理
private
void
GetCanteenWindows
()
{
String
Mac
=
SPUtil
.
getInstance
().
readString
(
"Mac"
);
Call
<
CommonListResponse
<
CanteenWindow
>>
call
=
...
...
@@ -685,7 +766,7 @@ public class MainActivity extends BaseActivity {
return
false
;
}
private
final
static
int
MAX_Mi
=
1
0
;
private
final
static
int
MAX_Mi
=
6
0
;
private
int
Current_Count
=
0
;
/**
...
...
@@ -696,5 +777,4 @@ public class MainActivity extends BaseActivity {
// Settings.System.putInt(getContentResolver(), android.provider.Settings.System.SCREEN_OFF_TIMEOUT, 10 * 1000);
}
//窗口计时处理
}
TOP_Pay/app/src/main/java/com/ifavine/pay/ui/activity/WelcomeActivity.java
View file @
9559e65e
package
com
.
ifavine
.
pay
.
ui
.
activity
;
import
android.app.KeyguardManager
;
import
android.content.Context
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Message
;
import
android.os.PowerManager
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.view.WindowManager
;
...
...
@@ -12,6 +15,7 @@ import android.widget.ImageView;
import
com.ifavine.pay.R
;
import
com.ifavine.pay.common.AppContext
;
import
com.ifavine.pay.ui.base.BaseActivity
;
import
com.ifavine.pay.utils.MD5Util
;
import
com.ifavine.pay.utils.SPUtil
;
...
...
@@ -60,6 +64,28 @@ public class WelcomeActivity extends BaseActivity {
},
1000
);
}
/**
* 唤醒手机屏幕并解锁
*/
private
void
wakeUpAndUnlock
()
{
// 获取电源管理器对象
PowerManager
pm
=
(
PowerManager
)
mContext
.
getSystemService
(
Context
.
POWER_SERVICE
);
boolean
screenOn
=
pm
.
isScreenOn
();
if
(!
screenOn
)
{
// 获取PowerManager.WakeLock对象,后面的参数|表示同时传入两个值,最后的是LogCat里用的Tag
PowerManager
.
WakeLock
wl
=
pm
.
newWakeLock
(
PowerManager
.
ACQUIRE_CAUSES_WAKEUP
|
PowerManager
.
SCREEN_BRIGHT_WAKE_LOCK
,
"bright"
);
wl
.
acquire
(
1000
);
// 点亮屏幕
wl
.
release
();
// 释放
}
// 屏幕解锁
KeyguardManager
keyguardManager
=
(
KeyguardManager
)
mContext
.
getSystemService
(
KEYGUARD_SERVICE
);
KeyguardManager
.
KeyguardLock
keyguardLock
=
keyguardManager
.
newKeyguardLock
(
"unLock"
);
// 屏幕锁定 //keyguardLock.reenableKeyguard();
keyguardLock
.
disableKeyguard
();
// 解锁
}
@Override
protected
void
onPause
()
{
...
...
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/BaseUtil.java
View file @
9559e65e
...
...
@@ -24,6 +24,8 @@ import com.ifavine.pay.common.AppContext;
import
com.ifavine.pay.common.Constants
;
import
java.io.BufferedReader
;
import
java.io.DataOutputStream
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.lang.reflect.ParameterizedType
;
...
...
@@ -647,4 +649,62 @@ public class BaseUtil {
}
return
pics
;
}
/**
* 应用程序运行命令获取 Root权限,设备必须已破解(获得ROOT权限)
*
* @param command 命令:String apkRoot="chmod 777 "+getPackageCodePath(); RootCommand(apkRoot);
* @return 应用程序是/否获取Root权限
*/
public
static
boolean
RootCommand
(
String
command
)
{
Process
process
=
null
;
DataOutputStream
os
=
null
;
try
{
process
=
Runtime
.
getRuntime
().
exec
(
"su"
);
os
=
new
DataOutputStream
(
process
.
getOutputStream
());
os
.
writeBytes
(
command
+
"\n"
);
os
.
flush
();
os
.
writeBytes
(
"exit\n"
);
os
.
flush
();
process
.
waitFor
();
}
catch
(
Exception
e
)
{
Log
.
d
(
"*** DEBUG ***"
,
"ROOT REE"
+
e
.
getMessage
());
return
false
;
}
finally
{
try
{
if
(
os
!=
null
)
{
os
.
close
();
}
process
.
destroy
();
}
catch
(
Exception
e
)
{
}
}
Log
.
d
(
"*** DEBUG ***"
,
"Root SUC "
);
return
true
;
}
public
static
boolean
isRoot
()
{
boolean
bool
=
false
;
try
{
if
((!
new
File
(
"/system/bin/su"
).
exists
())
&&
(!
new
File
(
"/system/xbin/su"
).
exists
()))
{
bool
=
false
;
}
else
{
bool
=
true
;
}
}
catch
(
Exception
e
)
{
}
return
bool
;
}
public
static
void
shutdown
()
{
try
{
//Process proc =Runtime.getRuntime().exec(new String[]{"su","-c","shutdown"}); //关机
Process
proc
=
Runtime
.
getRuntime
().
exec
(
new
String
[]{
"su"
,
"-c"
,
"reboot -p"
});
//关机
proc
.
waitFor
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/DialogMainSetUtils.java
View file @
9559e65e
...
...
@@ -22,6 +22,7 @@ import android.widget.ImageView;
import
android.widget.LinearLayout
;
import
android.widget.ListView
;
import
android.widget.Spinner
;
import
android.widget.Switch
;
import
android.widget.TextView
;
import
android.widget.TimePicker
;
...
...
@@ -97,6 +98,11 @@ public class DialogMainSetUtils {
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
// 设置布局
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.5f
);
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.6f
);
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
Button
btn_clear
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_clear
);
...
...
@@ -356,6 +362,10 @@ public class DialogMainSetUtils {
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
// 设置布局
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.5f
);
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.6f
);
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
final
EditText
et1
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
dialog_et1
);
...
...
@@ -426,6 +436,214 @@ public class DialogMainSetUtils {
return
dialog
;
}
public
static
Dialog
showShutDownDialog
(
final
Context
mContext
,
final
String
title
,
boolean
cancelable
)
{
View
view
=
View
.
inflate
(
mContext
,
R
.
layout
.
dialog_shutdown_set
,
null
);
final
Dialog
dialog
=
new
Dialog
(
mContext
,
R
.
style
.
dialog_common
);
// 创建自定义样式dialog
dialog
.
setCancelable
(
cancelable
);
// 不可以用“返回键”取消
dialog
.
setCanceledOnTouchOutside
(
cancelable
);
// 设置点击屏幕Dialog不消失
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
// 设置布局
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.8f
);
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.8f
);
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
TextView
tv_title
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_title
);
final
TextView
tv_date1
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tv_date1
);
final
TextView
tv_date2
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tv_date2
);
final
TextView
tv_date3
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tv_date3
);
final
TextView
tv_date4
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tv_date4
);
final
TextView
tv_date5
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
tv_date5
);
final
Switch
switch1
=
(
Switch
)
view
.
findViewById
(
R
.
id
.
switch1
);
final
Switch
switch2
=
(
Switch
)
view
.
findViewById
(
R
.
id
.
switch2
);
final
Switch
switch3
=
(
Switch
)
view
.
findViewById
(
R
.
id
.
switch3
);
final
Switch
switch4
=
(
Switch
)
view
.
findViewById
(
R
.
id
.
switch4
);
final
Switch
switch5
=
(
Switch
)
view
.
findViewById
(
R
.
id
.
switch5
);
if
(
title
!=
null
)
{
tv_title
.
setText
(
title
);
tv_title
.
setVisibility
(
View
.
VISIBLE
);
}
tv_date1
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
DialogUtil
.
showTimePickerDialog
(
mContext
,
R
.
style
.
dialog_style
,
tv_date1
,
Calendar
.
getInstance
());
}
});
tv_date2
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
DialogUtil
.
showTimePickerDialog
(
mContext
,
R
.
style
.
dialog_style
,
tv_date2
,
Calendar
.
getInstance
());
}
});
tv_date3
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
DialogUtil
.
showTimePickerDialog
(
mContext
,
R
.
style
.
dialog_style
,
tv_date3
,
Calendar
.
getInstance
());
}
});
tv_date4
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
DialogUtil
.
showTimePickerDialog
(
mContext
,
R
.
style
.
dialog_style
,
tv_date4
,
Calendar
.
getInstance
());
}
});
tv_date5
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
DialogUtil
.
showTimePickerDialog
(
mContext
,
R
.
style
.
dialog_style
,
tv_date5
,
Calendar
.
getInstance
());
}
});
TextWatcher
textWatcher
=
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
charSequence
,
int
i
,
int
i1
,
int
i2
)
{
}
@Override
public
void
onTextChanged
(
CharSequence
charSequence
,
int
i
,
int
i1
,
int
i2
)
{
}
@Override
public
void
afterTextChanged
(
Editable
editable
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
if
(
switch1
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD1"
,
tv_date1
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD1"
,
tv_date1
.
getText
().
toString
()
+
",N"
);
}
if
(
switch2
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD2"
,
tv_date2
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD2"
,
tv_date2
.
getText
().
toString
()
+
",N"
);
}
if
(
switch3
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD3"
,
tv_date3
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD3"
,
tv_date3
.
getText
().
toString
()
+
",N"
);
}
if
(
switch4
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD4"
,
tv_date4
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD4"
,
tv_date4
.
getText
().
toString
()
+
",N"
);
}
if
(
switch5
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD5"
,
tv_date5
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD5"
,
tv_date5
.
getText
().
toString
()
+
",N"
);
}
}
};
String
SHD1
=
SPUtil
.
getInstance
().
readString
(
"SHD1"
);
if
(!
TextUtils
.
isEmpty
(
SHD1
))
{
if
(
SHD1
.
contains
(
"Y"
))
{
switch1
.
setChecked
(
true
);
}
else
{
switch1
.
setChecked
(
false
);
}
tv_date1
.
setText
(
SHD1
.
split
(
","
)[
0
]);
}
String
SHD2
=
SPUtil
.
getInstance
().
readString
(
"SHD2"
);
if
(!
TextUtils
.
isEmpty
(
SHD2
))
{
if
(
SHD2
.
contains
(
"Y"
))
{
switch2
.
setChecked
(
true
);
}
else
{
switch2
.
setChecked
(
false
);
}
tv_date2
.
setText
(
SHD2
.
split
(
","
)[
0
]);
}
String
SHD3
=
SPUtil
.
getInstance
().
readString
(
"SHD3"
);
if
(!
TextUtils
.
isEmpty
(
SHD3
))
{
if
(
SHD3
.
contains
(
"Y"
))
{
switch3
.
setChecked
(
true
);
}
else
{
switch3
.
setChecked
(
false
);
}
tv_date3
.
setText
(
SHD3
.
split
(
","
)[
0
]);
}
String
SHD4
=
SPUtil
.
getInstance
().
readString
(
"SHD4"
);
if
(!
TextUtils
.
isEmpty
(
SHD4
))
{
if
(
SHD4
.
contains
(
"Y"
))
{
switch4
.
setChecked
(
true
);
}
else
{
switch4
.
setChecked
(
false
);
}
tv_date4
.
setText
(
SHD4
.
split
(
","
)[
0
]);
}
String
SHD5
=
SPUtil
.
getInstance
().
readString
(
"SHD5"
);
if
(!
TextUtils
.
isEmpty
(
SHD5
))
{
if
(
SHD5
.
contains
(
"Y"
))
{
switch5
.
setChecked
(
true
);
}
else
{
switch5
.
setChecked
(
false
);
}
tv_date5
.
setText
(
SHD5
.
split
(
","
)[
0
]);
}
tv_date1
.
addTextChangedListener
(
textWatcher
);
tv_date2
.
addTextChangedListener
(
textWatcher
);
tv_date3
.
addTextChangedListener
(
textWatcher
);
tv_date4
.
addTextChangedListener
(
textWatcher
);
tv_date5
.
addTextChangedListener
(
textWatcher
);
btn_ok
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
dialog
.
dismiss
();
}
});
View
.
OnClickListener
listener
=
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
MainActivity
.
Current_Count_DialogWindow
=
0
;
if
(
switch1
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD1"
,
tv_date1
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD1"
,
tv_date1
.
getText
().
toString
()
+
",N"
);
}
if
(
switch2
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD2"
,
tv_date2
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD2"
,
tv_date2
.
getText
().
toString
()
+
",N"
);
}
if
(
switch3
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD3"
,
tv_date3
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD3"
,
tv_date3
.
getText
().
toString
()
+
",N"
);
}
if
(
switch4
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD4"
,
tv_date4
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD4"
,
tv_date4
.
getText
().
toString
()
+
",N"
);
}
if
(
switch5
.
isChecked
())
{
SPUtil
.
getInstance
().
writeString
(
"SHD5"
,
tv_date5
.
getText
().
toString
()
+
",Y"
);
}
else
{
SPUtil
.
getInstance
().
writeString
(
"SHD5"
,
tv_date5
.
getText
().
toString
()
+
",N"
);
}
}
};
switch1
.
setOnClickListener
(
listener
);
switch2
.
setOnClickListener
(
listener
);
switch3
.
setOnClickListener
(
listener
);
switch4
.
setOnClickListener
(
listener
);
switch5
.
setOnClickListener
(
listener
);
dialog
.
show
();
return
dialog
;
}
static
Handler
handler
=
new
Handler
();
public
static
Dialog
showSetAmtDialog
(
final
Context
mContext
,
final
String
title
,
final
View
.
OnClickListener
okListener
,
...
...
@@ -453,8 +671,8 @@ public class DialogMainSetUtils {
dialog
.
setCanceledOnTouchOutside
(
cancelable
);
// 设置点击屏幕Dialog不消失
dialog
.
setContentView
(
view
);
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
1800
;
params
.
height
=
920
;
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.95f
)
;
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.85f
)
;
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
...
...
@@ -761,8 +979,8 @@ public class DialogMainSetUtils {
dialog
.
setCanceledOnTouchOutside
(
cancelable
);
// 设置点击屏幕Dialog不消失
dialog
.
setContentView
(
view
);
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
1800
;
params
.
height
=
1100
;
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.95f
)
;
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.95f
)
;
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_search
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_search
);
Button
btn_close
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_close
);
...
...
@@ -1082,8 +1300,8 @@ public class DialogMainSetUtils {
dialog
.
setCanceledOnTouchOutside
(
cancelable
);
// 设置点击屏幕Dialog不消失
dialog
.
setContentView
(
view
);
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
1800
;
params
.
height
=
1100
;
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.95f
)
;
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.95f
)
;
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_search
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_search
);
Button
btn_close
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_close
);
...
...
@@ -1426,8 +1644,8 @@ public class DialogMainSetUtils {
dialog
.
setCanceledOnTouchOutside
(
cancelable
);
// 设置点击屏幕Dialog不消失
dialog
.
setContentView
(
view
);
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
1800
;
params
.
height
=
1100
;
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.95f
)
;
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.95f
)
;
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_search
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_search
);
Button
btn_close
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_close
);
...
...
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/DialogUtil.java
View file @
9559e65e
...
...
@@ -11,6 +11,7 @@ import android.text.TextWatcher;
import
android.text.method.PasswordTransformationMethod
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
...
...
@@ -59,6 +60,10 @@ public class DialogUtil {
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
// 设置布局
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.6f
);
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.7f
);
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
TextView
tv_title
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_title
);
TextView
tv_msg
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
...
...
@@ -108,6 +113,10 @@ public class DialogUtil {
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
// 设置布局
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.4f
);
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.25f
);
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
TextView
tv_msg
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
...
...
@@ -219,6 +228,10 @@ public class DialogUtil {
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
// 设置布局
final
WindowManager
.
LayoutParams
params
=
dialog
.
getWindow
().
getAttributes
();
params
.
width
=
(
int
)
(
MainActivity
.
width
*
0.4f
);
params
.
height
=
(
int
)
(
MainActivity
.
height
*
0.25f
);
dialog
.
getWindow
().
setAttributes
(
params
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
final
EditText
tv_msg
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
...
...
TOP_Pay/app/src/main/java/com/ifavine/pay/view/PopWindowMainSet.java
View file @
9559e65e
...
...
@@ -24,7 +24,7 @@ import com.ifavine.pay.R;
*/
public
class
PopWindowMainSet
extends
PopupWindow
implements
View
.
OnClickListener
{
private
Context
context
;
private
View
ll_1
,
ll_2
,
ll_3
;
private
View
ll_1
,
ll_2
,
ll_3
,
ll_4
;
private
CallBackPosition
call
;
public
PopWindowMainSet
(
Context
context
,
CallBackPosition
call
)
{
...
...
@@ -40,9 +40,11 @@ public class PopWindowMainSet extends PopupWindow implements View.OnClickListene
ll_1
=
view
.
findViewById
(
R
.
id
.
ll_1
);
//发起群聊
ll_2
=
view
.
findViewById
(
R
.
id
.
ll_2
);
//添加好友
ll_3
=
view
.
findViewById
(
R
.
id
.
ll_3
);
//添加好友
ll_4
=
view
.
findViewById
(
R
.
id
.
ll_4
);
//
ll_1
.
setOnClickListener
(
this
);
ll_2
.
setOnClickListener
(
this
);
ll_3
.
setOnClickListener
(
this
);
ll_4
.
setOnClickListener
(
this
);
setContentView
(
view
);
initWindow
();
}
...
...
@@ -103,6 +105,12 @@ public class PopWindowMainSet extends PopupWindow implements View.OnClickListene
call
.
selectIndex
(
2
);
}
break
;
case
R
.
id
.
ll_4
:
dismiss
();
if
(
call
!=
null
)
{
call
.
selectIndex
(
3
);
}
break
;
default
:
break
;
}
...
...
TOP_Pay/app/src/main/res/layout/activity_main.xml
View file @
9559e65e
...
...
@@ -78,7 +78,7 @@
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"1
5
dp"
android:layout_height=
"1
0
dp"
android:orientation=
"horizontal"
>
<Spinner
...
...
@@ -178,7 +178,7 @@
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:orientation=
"vertical"
android:paddingBottom=
"10dp"
...
...
@@ -309,7 +309,7 @@
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:orientation=
"horizontal"
android:paddingBottom=
"5dp"
...
...
@@ -343,7 +343,7 @@
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:orientation=
"vertical"
android:paddingBottom=
"10dp"
...
...
@@ -628,7 +628,7 @@
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"fill_parent"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:orientation=
"horizontal"
android:paddingBottom=
"10dp"
...
...
TOP_Pay/app/src/main/res/layout/dialog_amt_set.xml
View file @
9559e65e
...
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_height=
"
700dp
"
android:layout_height=
"
fill_parent
"
android:background=
"@color/toast_transparent"
android:orientation=
"vertical"
>
...
...
@@ -10,7 +10,7 @@
<LinearLayout
android:id=
"@+id/ll"
android:layout_width=
"fill_parent"
android:layout_height=
"
800dp
"
android:layout_height=
"
fill_parent
"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
...
...
@@ -35,13 +35,13 @@
<TextView
android:id=
"@+id/dialog_title"
android:layout_width=
"
1000dp
"
android:layout_width=
"
fill_parent
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"28dp"
/>
</LinearLayout>
...
...
TOP_Pay/app/src/main/res/layout/dialog_common_confirm.xml
View file @
9559e65e
...
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
...
...
@@ -50,7 +50,7 @@
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"15dp"
android:gravity=
"center"
android:textColor=
"@color/bl
ack
"
android:textColor=
"@color/bl
ue
"
android:textSize=
"30sp"
android:visibility=
"gone"
/>
...
...
TOP_Pay/app/src/main/res/layout/dialog_common_input_confirm.xml
View file @
9559e65e
...
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
...
...
@@ -11,7 +11,6 @@
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
<LinearLayout
...
...
@@ -45,7 +44,7 @@
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"15dp"
android:gravity=
"center"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"28sp"
/>
</LinearLayout>
...
...
TOP_Pay/app/src/main/res/layout/dialog_common_ok.xml
View file @
9559e65e
...
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
<LinearLayout
...
...
@@ -10,7 +10,6 @@
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
<ImageView
...
...
@@ -27,7 +26,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginTop=
"15dp"
android:textColor=
"@color/
font_black_26
"
android:textColor=
"@color/
blue
"
android:textSize=
"30sp"
android:visibility=
"gone"
/>
...
...
@@ -39,7 +38,7 @@
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"20dp"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"30sp"
android:visibility=
"gone"
/>
...
...
TOP_Pay/app/src/main/res/layout/dialog_pwd_set.xml
View file @
9559e65e
<?xml version="1.0" encoding="utf-8"?>
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_cancel"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"5dp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/dialog_title"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:textColor=
"@color/blue"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"
600dp
"
android:layout_width=
"
match_parent
"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:
background=
"@drawable/bg_white_radius
"
android:
layout_margin=
"8dp
"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
...
...
@@ -20,33 +43,6 @@
<LinearLayout
android:layout_width=
"600dp"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_cancel"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"5dp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/dialog_title"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"600dp"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:orientation=
"horizontal"
>
...
...
@@ -158,43 +154,37 @@
android:gravity=
"center"
android:textColor=
"@color/red"
android:textSize=
"28dp"
/>
</LinearLayout>
<View
android:layout_width=
"fill_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"15dp"
android:background=
"@color/main_gray"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:gravity=
"center"
>
<Button
android:id=
"@+id/dialog_cancel"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"5dp"
android:background=
"@null"
android:text=
"@string/toolbar_cancel"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
<View
android:layout_width=
"fill_parent"
android:layout_height=
"1dp"
android:layout_marginBottom=
"15dp"
android:background=
"@color/main_gray"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"fill_parent"
android:background=
"@color/main_gray"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
>
<Button
android:id=
"@+id/dialog_cancel"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"50dp"
android:background=
"@drawable/btn_click_white_grey"
android:text=
"@string/toolbar_cancel"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
<Button
android:id=
"@+id/dialog_ok"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"5dp"
android:background=
"@null"
android:text=
"@string/toolbar_confirm"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
</LinearLayout>
<Button
android:id=
"@+id/dialog_ok"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginLeft=
"50dp"
android:background=
"@drawable/btn_click_white_grey"
android:text=
"@string/toolbar_confirm"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
TOP_Pay/app/src/main/res/layout/dialog_report_local.xml
View file @
9559e65e
...
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_height=
"700dp"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
...
...
@@ -13,7 +13,6 @@
android:layout_height=
"800dp"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
...
...
TOP_Pay/app/src/main/res/layout/dialog_report_record.xml
View file @
9559e65e
...
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_height=
"700dp"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
...
...
@@ -14,7 +14,7 @@
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
...
...
TOP_Pay/app/src/main/res/layout/dialog_report_sum.xml
View file @
9559e65e
...
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_height=
"700dp"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
...
...
@@ -13,7 +13,6 @@
android:layout_height=
"800dp"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
...
...
TOP_Pay/app/src/main/res/layout/dialog_rst_num_set.xml
View file @
9559e65e
...
...
@@ -2,41 +2,35 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"
600dp
"
android:layout_width=
"
fill_parent
"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"600dp"
android:layout_height=
"wrap_content"
android:layout_width=
"fill_parent"
android:layout_height=
"70dp"
android:gravity=
"center"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_cancel"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"5dp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/dialog_title"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"30dp"
/>
</LinearLayout>
...
...
@@ -154,6 +148,7 @@
<View
android:layout_width=
"fill_parent"
android:layout_height=
"1dp"
android:layout_marginBottom=
"15dp"
android:layout_marginTop=
"15dp"
android:background=
"@color/main_gray"
/>
...
...
@@ -163,21 +158,6 @@
android:gravity=
"center"
>
<Button
android:id=
"@+id/dialog_cancel"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"5dp"
android:background=
"@null"
android:text=
"@string/toolbar_cancel"
android:textColor=
"@color/font_blue_16"
android:textSize=
"30dp"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"fill_parent"
android:background=
"@color/main_gray"
/>
<Button
android:id=
"@+id/dialog_clear"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
...
...
@@ -188,20 +168,25 @@
android:textSize=
"30dp"
android:visibility=
"gone"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"fill_parent"
android:background=
"@color/main_gray"
/>
<Button
android:id=
"@+id/dialog_cancel"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"50dp"
android:background=
"@drawable/btn_click_white_grey"
android:text=
"@string/toolbar_cancel"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
<Button
android:id=
"@+id/dialog_ok"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_margin
Right=
"5
dp"
android:background=
"@
null
"
android:layout_margin
Left=
"50
dp"
android:background=
"@
drawable/btn_click_white_grey
"
android:text=
"@string/toolbar_confirm"
android:textColor=
"@color/font_blue_16"
android:textSize=
"
30
dp"
/>
android:textSize=
"
28
dp"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
TOP_Pay/app/src/main/res/layout/dialog_shutdown_set.xml
0 → 100644
View file @
9559e65e
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_height=
"550dp"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll"
android:layout_width=
"fill_parent"
android:layout_height=
"550dp"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<ImageView
android:id=
"@+id/iv_cancel"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"5dp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/dialog_title"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/bg_white_radius_stroke"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"200dp"
android:layout_height=
"50dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"关机时间:"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<TextView
android:id=
"@+id/tv_date1"
android:layout_width=
"250dp"
android:layout_height=
"50dp"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:background=
"@color/main_gray"
android:gravity=
"center"
android:text=
"00:00"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<Switch
android:id=
"@+id/switch1"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:layout_marginLeft=
"80dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"开启"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"200dp"
android:layout_height=
"50dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"关机时间:"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<TextView
android:id=
"@+id/tv_date2"
android:layout_width=
"250dp"
android:layout_height=
"50dp"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:background=
"@color/main_gray"
android:gravity=
"center"
android:text=
"00:00"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<Switch
android:id=
"@+id/switch2"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:layout_marginLeft=
"80dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"开启"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"200dp"
android:layout_height=
"50dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"关机时间:"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<TextView
android:id=
"@+id/tv_date3"
android:layout_width=
"250dp"
android:layout_height=
"50dp"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:background=
"@color/main_gray"
android:gravity=
"center"
android:text=
"00:00"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<Switch
android:id=
"@+id/switch3"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"80dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"开启"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"200dp"
android:layout_height=
"50dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"关机时间:"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<TextView
android:id=
"@+id/tv_date4"
android:layout_width=
"250dp"
android:layout_height=
"50dp"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:background=
"@color/main_gray"
android:gravity=
"center"
android:text=
"00:00"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<Switch
android:id=
"@+id/switch4"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:layout_marginLeft=
"80dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"开启"
android:textSize=
"28dp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"20dp"
android:layout_marginTop=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"200dp"
android:layout_height=
"50dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"关机时间:"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<TextView
android:id=
"@+id/tv_date5"
android:layout_width=
"250dp"
android:layout_height=
"50dp"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:background=
"@color/main_gray"
android:gravity=
"center"
android:text=
"00:00"
android:textColor=
"@color/font_black_32"
android:textSize=
"28dp"
/>
<Switch
android:id=
"@+id/switch5"
android:layout_width=
"wrap_content"
android:layout_height=
"50dp"
android:layout_marginLeft=
"80dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:text=
"开启"
android:textSize=
"28dp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_marginTop=
"20dp"
android:gravity=
"center"
>
<Button
android:id=
"@+id/dialog_ok"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_marginLeft=
"50dp"
android:background=
"@drawable/btn_click_white_grey"
android:text=
"关闭"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
TOP_Pay/app/src/main/res/layout/pop_main_set.xml
View file @
9559e65e
...
...
@@ -45,7 +45,6 @@
android:id=
"@+id/ll_3"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_marginBottom=
"25dp"
android:gravity=
"center_horizontal"
android:orientation=
"horizontal"
>
...
...
@@ -58,6 +57,24 @@
android:textColor=
"@color/black"
android:textSize=
"25sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_4"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_marginBottom=
"25dp"
android:gravity=
"center_horizontal"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"60dp"
android:layout_marginLeft=
"5dp"
android:gravity=
"center"
android:text=
"定时关机设置"
android:textColor=
"@color/black"
android:textSize=
"25sp"
/>
</LinearLayout>
</LinearLayout>
TOP_Pay/app/src/main/res/values/colors.xml
View file @
9559e65e
...
...
@@ -137,7 +137,7 @@
<color
name=
"line_background"
>
#ffcccccc
</color>
<color
name=
"done_text_color_normal"
>
#ff333333
</color>
<color
name=
"done_text_color_disabled"
>
#ffcccccc
</color>
<color
name=
"blue"
>
#
ff33cc33
</color>
<color
name=
"blue"
>
#
16a7de
</color>
<color
name=
"darker_blue"
>
#ff00cc99
</color>
<color
name=
"date_picker_text_normal"
>
#ff999999
</color>
<color
name=
"calendar_header"
>
#ff999999
</color>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment