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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
317 additions
and
102 deletions
+317
-102
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
+0
-0
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
+23
-33
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
+0
-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 @@
...
@@ -22,6 +22,10 @@
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.READ_LOGS"
/>
<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"
/>
<uses-feature
android:name=
"android.hardware.camera"
/>
...
@@ -37,9 +41,10 @@
...
@@ -37,9 +41,10 @@
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
<activity
<activity
android:name=
".ui.activity.WelcomeActivity"
android:name=
".ui.activity.WelcomeActivity"
android:configChanges=
"orientation|keyboardHidden"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
"
l
andscape"
android:screenOrientation=
"
sensorL
andscape"
android:windowSoftInputMode=
"stateAlwaysHidden"
>
android:windowSoftInputMode=
"stateAlwaysHidden"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
@@ -50,13 +55,21 @@
...
@@ -50,13 +55,21 @@
<activity
<activity
android:name=
".ui.activity.MainActivity"
android:name=
".ui.activity.MainActivity"
android:configChanges=
"orientation|keyboardHidden"
android:label=
"@string/app_name"
android:label=
"@string/app_name"
android:launchMode=
"singleTask"
android:launchMode=
"singleTask"
android:screenOrientation=
"
l
andscape"
android:screenOrientation=
"
sensorL
andscape"
android:windowSoftInputMode=
"stateAlwaysHidden"
></activity>
android:windowSoftInputMode=
"stateAlwaysHidden"
></activity>
<service
android:name=
".utils.DownloadService"
/>
<service
android:name=
".utils.DownloadService"
/>
<receiver
android:name=
".service.BootBroadcastReceiver"
>
<intent-filter>
<action
android:name=
"android.intent.action.BOOT_COMPLETED"
/>
</intent-filter>
</receiver>
</application>
</application>
</manifest>
</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;
...
@@ -11,7 +11,9 @@ import android.support.annotation.Nullable;
import
android.text.Editable
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.text.TextWatcher
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.Display
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.MotionEvent
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.view.View
;
...
@@ -24,6 +26,7 @@ import com.google.gson.Gson;
...
@@ -24,6 +26,7 @@ import com.google.gson.Gson;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
import
com.ifavine.pay.R
;
import
com.ifavine.pay.R
;
import
com.ifavine.pay.api.APIWrapper
;
import
com.ifavine.pay.api.APIWrapper
;
import
com.ifavine.pay.common.AppContext
;
import
com.ifavine.pay.ui.base.BaseActivity
;
import
com.ifavine.pay.ui.base.BaseActivity
;
import
com.ifavine.pay.utils.BaseUtil
;
import
com.ifavine.pay.utils.BaseUtil
;
import
com.ifavine.pay.utils.DialogMainSetUtils
;
import
com.ifavine.pay.utils.DialogMainSetUtils
;
...
@@ -125,6 +128,8 @@ public class MainActivity extends BaseActivity {
...
@@ -125,6 +128,8 @@ public class MainActivity extends BaseActivity {
private
Dialog
dialogWindow
=
null
;
private
Dialog
dialogWindow
=
null
;
private
static
boolean
isStart
=
false
;
private
static
boolean
isStart
=
false
;
public
static
int
width
=
1350
;
public
static
int
height
=
720
;
@Override
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
@@ -135,7 +140,6 @@ public class MainActivity extends BaseActivity {
...
@@ -135,7 +140,6 @@ public class MainActivity extends BaseActivity {
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
//支付提示
//支付提示
soundPool
=
new
SoundPool
(
3
,
AudioManager
.
STREAM_MUSIC
,
100
);
soundPool
=
new
SoundPool
(
3
,
AudioManager
.
STREAM_MUSIC
,
100
);
soundSucess
=
soundPool
.
load
(
mContext
,
R
.
raw
.
success
,
1
);
//加载资源,得到soundId
soundSucess
=
soundPool
.
load
(
mContext
,
R
.
raw
.
success
,
1
);
//加载资源,得到soundId
...
@@ -151,7 +155,10 @@ public class MainActivity extends BaseActivity {
...
@@ -151,7 +155,10 @@ public class MainActivity extends BaseActivity {
if
(
TextUtils
.
isEmpty
(
WindowName
))
{
if
(
TextUtils
.
isEmpty
(
WindowName
))
{
DialogUtil
.
showOkDialog
(
mContext
,
null
,
"设置信息"
,
"请设置饭堂窗口和消费金额"
,
"确定"
,
null
);
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 {
...
@@ -204,10 +211,17 @@ public class MainActivity extends BaseActivity {
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
);
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_KEEP_SCREEN_ON
);
updateCanTeenName
();
updateCanTeenName
();
getServerDate
();
getServerDate
();
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
getServerDate
();
}
},
15
*
1000
);
initPayInfo
();
initPayInfo
();
//检查网络
//检查网络
Current_Count
=
0
;
Current_Count
=
0
;
startTimer
();
startTimer
();
startTimer2
();
if
(!
isStart
)
{
if
(!
isStart
)
{
handler
.
postDelayed
(
netRun
,
1000
);
handler
.
postDelayed
(
netRun
,
1000
);
handler
.
postDelayed
(
etRunnable
,
250
);
handler
.
postDelayed
(
etRunnable
,
250
);
...
@@ -230,6 +244,7 @@ public class MainActivity extends BaseActivity {
...
@@ -230,6 +244,7 @@ public class MainActivity extends BaseActivity {
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
super
.
onDestroy
();
super
.
onDestroy
();
stopTimer
();
stopTimer
();
stopTimer2
();
isStart
=
false
;
isStart
=
false
;
handler
.
removeCallbacks
(
netRun
);
handler
.
removeCallbacks
(
netRun
);
handler
.
removeCallbacks
(
etRunnable
);
handler
.
removeCallbacks
(
etRunnable
);
...
@@ -303,6 +318,9 @@ public class MainActivity extends BaseActivity {
...
@@ -303,6 +318,9 @@ public class MainActivity extends BaseActivity {
}
else
if
(
i
==
2
)
{
}
else
if
(
i
==
2
)
{
Current_Count_DialogInput
=
0
;
Current_Count_DialogInput
=
0
;
dialogInput
=
DialogMainSetUtils
.
showChangePwdDialog
(
mContext
,
"修改管理员密码"
,
null
,
null
,
true
);
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 {
...
@@ -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
()
{
private
Handler
handler
=
new
Handler
()
{
@Override
@Override
public
void
handleMessage
(
Message
msg
)
{
public
void
handleMessage
(
Message
msg
)
{
...
@@ -437,6 +513,11 @@ public class MainActivity extends BaseActivity {
...
@@ -437,6 +513,11 @@ public class MainActivity extends BaseActivity {
}
}
break
;
break
;
case
7
:
//关机
BaseUtil
.
shutdown
();
break
;
}
}
}
}
...
@@ -490,6 +571,7 @@ public class MainActivity extends BaseActivity {
...
@@ -490,6 +571,7 @@ public class MainActivity extends BaseActivity {
String
data
=
response
.
body
().
ModelJson
;
String
data
=
response
.
body
().
ModelJson
;
TLog
.
log
(
"aaa"
,
data
);
TLog
.
log
(
"aaa"
,
data
);
dateTime
=
BaseUtil
.
getDateFormat
(
data
,
"yyyy/MM/dd hh:mm:ss"
);
dateTime
=
BaseUtil
.
getDateFormat
(
data
,
"yyyy/MM/dd hh:mm:ss"
);
dateTime2
=
BaseUtil
.
getDateFormat
(
data
,
"yyyy/MM/dd hh:mm:ss"
);
initPayInfo
();
initPayInfo
();
}
}
}
}
...
@@ -569,9 +651,8 @@ public class MainActivity extends BaseActivity {
...
@@ -569,9 +651,8 @@ public class MainActivity extends BaseActivity {
});
});
}
}
Gson
gson
=
new
Gson
();
private
Gson
gson
=
new
Gson
();
//线路处理
private
void
GetCanteenWindows
()
{
private
void
GetCanteenWindows
()
{
String
Mac
=
SPUtil
.
getInstance
().
readString
(
"Mac"
);
String
Mac
=
SPUtil
.
getInstance
().
readString
(
"Mac"
);
Call
<
CommonListResponse
<
CanteenWindow
>>
call
=
Call
<
CommonListResponse
<
CanteenWindow
>>
call
=
...
@@ -685,7 +766,7 @@ public class MainActivity extends BaseActivity {
...
@@ -685,7 +766,7 @@ public class MainActivity extends BaseActivity {
return
false
;
return
false
;
}
}
private
final
static
int
MAX_Mi
=
1
0
;
private
final
static
int
MAX_Mi
=
6
0
;
private
int
Current_Count
=
0
;
private
int
Current_Count
=
0
;
/**
/**
...
@@ -696,5 +777,4 @@ public class MainActivity extends BaseActivity {
...
@@ -696,5 +777,4 @@ public class MainActivity extends BaseActivity {
// Settings.System.putInt(getContentResolver(), android.provider.Settings.System.SCREEN_OFF_TIMEOUT, 10 * 1000);
// 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
;
package
com
.
ifavine
.
pay
.
ui
.
activity
;
import
android.app.KeyguardManager
;
import
android.content.Context
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.Message
;
import
android.os.Message
;
import
android.os.PowerManager
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
...
@@ -12,6 +15,7 @@ import android.widget.ImageView;
...
@@ -12,6 +15,7 @@ import android.widget.ImageView;
import
com.ifavine.pay.R
;
import
com.ifavine.pay.R
;
import
com.ifavine.pay.common.AppContext
;
import
com.ifavine.pay.ui.base.BaseActivity
;
import
com.ifavine.pay.ui.base.BaseActivity
;
import
com.ifavine.pay.utils.MD5Util
;
import
com.ifavine.pay.utils.MD5Util
;
import
com.ifavine.pay.utils.SPUtil
;
import
com.ifavine.pay.utils.SPUtil
;
...
@@ -60,6 +64,28 @@ public class WelcomeActivity extends BaseActivity {
...
@@ -60,6 +64,28 @@ public class WelcomeActivity extends BaseActivity {
},
1000
);
},
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
@Override
protected
void
onPause
()
{
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;
...
@@ -24,6 +24,8 @@ import com.ifavine.pay.common.AppContext;
import
com.ifavine.pay.common.Constants
;
import
com.ifavine.pay.common.Constants
;
import
java.io.BufferedReader
;
import
java.io.BufferedReader
;
import
java.io.DataOutputStream
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.io.InputStreamReader
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.ParameterizedType
;
...
@@ -647,4 +649,62 @@ public class BaseUtil {
...
@@ -647,4 +649,62 @@ public class BaseUtil {
}
}
return
pics
;
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
This diff is collapsed.
Click to expand it.
TOP_Pay/app/src/main/java/com/ifavine/pay/utils/DialogUtil.java
View file @
9559e65e
...
@@ -11,6 +11,7 @@ import android.text.TextWatcher;
...
@@ -11,6 +11,7 @@ import android.text.TextWatcher;
import
android.text.method.PasswordTransformationMethod
;
import
android.text.method.PasswordTransformationMethod
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
...
@@ -59,6 +60,10 @@ public class DialogUtil {
...
@@ -59,6 +60,10 @@ public class DialogUtil {
dialog
.
setContentView
(
view
,
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
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
);
Button
btn_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
TextView
tv_title
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_title
);
TextView
tv_title
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_title
);
TextView
tv_msg
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
TextView
tv_msg
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
...
@@ -108,6 +113,10 @@ public class DialogUtil {
...
@@ -108,6 +113,10 @@ public class DialogUtil {
dialog
.
setContentView
(
view
,
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
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_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
TextView
tv_msg
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
TextView
tv_msg
=
(
TextView
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
...
@@ -219,6 +228,10 @@ public class DialogUtil {
...
@@ -219,6 +228,10 @@ public class DialogUtil {
dialog
.
setContentView
(
view
,
dialog
.
setContentView
(
view
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
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_ok
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_ok
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
Button
btn_cancel
=
(
Button
)
view
.
findViewById
(
R
.
id
.
dialog_cancel
);
final
EditText
tv_msg
=
(
EditText
)
view
.
findViewById
(
R
.
id
.
dialog_msg
);
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;
...
@@ -24,7 +24,7 @@ import com.ifavine.pay.R;
*/
*/
public
class
PopWindowMainSet
extends
PopupWindow
implements
View
.
OnClickListener
{
public
class
PopWindowMainSet
extends
PopupWindow
implements
View
.
OnClickListener
{
private
Context
context
;
private
Context
context
;
private
View
ll_1
,
ll_2
,
ll_3
;
private
View
ll_1
,
ll_2
,
ll_3
,
ll_4
;
private
CallBackPosition
call
;
private
CallBackPosition
call
;
public
PopWindowMainSet
(
Context
context
,
CallBackPosition
call
)
{
public
PopWindowMainSet
(
Context
context
,
CallBackPosition
call
)
{
...
@@ -40,9 +40,11 @@ public class PopWindowMainSet extends PopupWindow implements View.OnClickListene
...
@@ -40,9 +40,11 @@ public class PopWindowMainSet extends PopupWindow implements View.OnClickListene
ll_1
=
view
.
findViewById
(
R
.
id
.
ll_1
);
//发起群聊
ll_1
=
view
.
findViewById
(
R
.
id
.
ll_1
);
//发起群聊
ll_2
=
view
.
findViewById
(
R
.
id
.
ll_2
);
//添加好友
ll_2
=
view
.
findViewById
(
R
.
id
.
ll_2
);
//添加好友
ll_3
=
view
.
findViewById
(
R
.
id
.
ll_3
);
//添加好友
ll_3
=
view
.
findViewById
(
R
.
id
.
ll_3
);
//添加好友
ll_4
=
view
.
findViewById
(
R
.
id
.
ll_4
);
//
ll_1
.
setOnClickListener
(
this
);
ll_1
.
setOnClickListener
(
this
);
ll_2
.
setOnClickListener
(
this
);
ll_2
.
setOnClickListener
(
this
);
ll_3
.
setOnClickListener
(
this
);
ll_3
.
setOnClickListener
(
this
);
ll_4
.
setOnClickListener
(
this
);
setContentView
(
view
);
setContentView
(
view
);
initWindow
();
initWindow
();
}
}
...
@@ -103,6 +105,12 @@ public class PopWindowMainSet extends PopupWindow implements View.OnClickListene
...
@@ -103,6 +105,12 @@ public class PopWindowMainSet extends PopupWindow implements View.OnClickListene
call
.
selectIndex
(
2
);
call
.
selectIndex
(
2
);
}
}
break
;
break
;
case
R
.
id
.
ll_4
:
dismiss
();
if
(
call
!=
null
)
{
call
.
selectIndex
(
3
);
}
break
;
default
:
default
:
break
;
break
;
}
}
...
...
TOP_Pay/app/src/main/res/layout/activity_main.xml
View file @
9559e65e
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"1
5
dp"
android:layout_height=
"1
0
dp"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<Spinner
<Spinner
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:background=
"@color/bg_gray_dd"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:paddingBottom=
"10dp"
android:paddingBottom=
"10dp"
...
@@ -309,7 +309,7 @@
...
@@ -309,7 +309,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:background=
"@color/bg_gray_dd"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
...
@@ -343,7 +343,7 @@
...
@@ -343,7 +343,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"1
5
dp"
android:layout_marginTop=
"1
0
dp"
android:background=
"@color/bg_gray_dd"
android:background=
"@color/bg_gray_dd"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:paddingBottom=
"10dp"
android:paddingBottom=
"10dp"
...
@@ -628,7 +628,7 @@
...
@@ -628,7 +628,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"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:background=
"@color/bg_gray_dd"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingBottom=
"10dp"
android:paddingBottom=
"10dp"
...
...
TOP_Pay/app/src/main/res/layout/dialog_amt_set.xml
View file @
9559e65e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"
700dp
"
android:layout_height=
"
fill_parent
"
android:background=
"@color/toast_transparent"
android:background=
"@color/toast_transparent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/ll"
android:id=
"@+id/ll"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"
800dp
"
android:layout_height=
"
fill_parent
"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:background=
"@drawable/bg_white_radius"
...
@@ -35,13 +35,13 @@
...
@@ -35,13 +35,13 @@
<TextView
<TextView
android:id=
"@+id/dialog_title"
android:id=
"@+id/dialog_title"
android:layout_width=
"
1000dp
"
android:layout_width=
"
fill_parent
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"28dp"
/>
android:textSize=
"28dp"
/>
</LinearLayout>
</LinearLayout>
...
...
TOP_Pay/app/src/main/res/layout/dialog_common_confirm.xml
View file @
9559e65e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/bl
ack
"
android:textColor=
"@color/bl
ue
"
android:textSize=
"30sp"
android:textSize=
"30sp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
...
TOP_Pay/app/src/main/res/layout/dialog_common_input_confirm.xml
View file @
9559e65e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
...
@@ -45,7 +44,7 @@
...
@@ -45,7 +44,7 @@
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"28sp"
/>
android:textSize=
"28sp"
/>
</LinearLayout>
</LinearLayout>
...
...
TOP_Pay/app/src/main/res/layout/dialog_common_ok.xml
View file @
9559e65e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<ImageView
<ImageView
...
@@ -27,7 +26,7 @@
...
@@ -27,7 +26,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:textColor=
"@color/
font_black_26
"
android:textColor=
"@color/
blue
"
android:textSize=
"30sp"
android:textSize=
"30sp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
@@ -39,7 +38,7 @@
...
@@ -39,7 +38,7 @@
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"30sp"
android:textSize=
"30sp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
...
TOP_Pay/app/src/main/res/layout/dialog_pwd_set.xml
View file @
9559e65e
<?xml version="1.0" encoding="utf-8"?>
<?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_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/toast_transparent"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"600dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:layout_width=
"600dp
"
android:layout_width=
"fill_parent
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<ImageView
<ImageView
android:id=
"@+id/iv_cancel"
android:id=
"@+id/iv_cancel"
android:layout_width=
"25dp"
android:layout_width=
"25dp"
...
@@ -35,16 +22,25 @@
...
@@ -35,16 +22,25 @@
android:id=
"@+id/dialog_title"
android:id=
"@+id/dialog_title"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/font_black_32
"
android:textColor=
"@color/blue
"
android:textSize=
"28dp"
/>
android:textSize=
"28dp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_margin=
"8dp"
android:clickable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"600dp"
android:layout_width=
"600dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:gravity=
"center"
...
@@ -158,43 +154,37 @@
...
@@ -158,43 +154,37 @@
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/red"
android:textColor=
"@color/red"
android:textSize=
"28dp"
/>
android:textSize=
"28dp"
/>
</LinearLayout>
<View
<View
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"1dp"
android:layout_height=
"1dp"
android:layout_marginTop
=
"15dp"
android:layout_marginBottom
=
"15dp"
android:background=
"@color/main_gray"
/>
android:background=
"@color/main_gray"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"60dp
"
android:layout_height=
"wrap_content
"
android:gravity=
"center"
>
android:gravity=
"center"
>
<Button
<Button
android:id=
"@+id/dialog_cancel"
android:id=
"@+id/dialog_cancel"
android:layout_width=
"200dp"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"5
dp"
android:layout_marginRight=
"50
dp"
android:background=
"@null
"
android:background=
"@drawable/btn_click_white_grey
"
android:text=
"@string/toolbar_cancel"
android:text=
"@string/toolbar_cancel"
android:textColor=
"@color/font_blue_16"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
android:textSize=
"28dp"
/>
<View
android:layout_width=
"1dp"
android:layout_height=
"fill_parent"
android:background=
"@color/main_gray"
/>
<Button
<Button
android:id=
"@+id/dialog_ok"
android:id=
"@+id/dialog_ok"
android:layout_width=
"200dp"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_height=
"45dp"
android:layout_marginRight=
"5
dp"
android:layout_marginLeft=
"50
dp"
android:background=
"@null
"
android:background=
"@drawable/btn_click_white_grey
"
android:text=
"@string/toolbar_confirm"
android:text=
"@string/toolbar_confirm"
android:textColor=
"@color/font_blue_16"
android:textColor=
"@color/font_blue_16"
android:textSize=
"28dp"
/>
android:textSize=
"28dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
\ No newline at end of file
TOP_Pay/app/src/main/res/layout/dialog_report_local.xml
View file @
9559e65e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"700dp"
android:layout_height=
"700dp"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
android:layout_height=
"800dp"
android:layout_height=
"800dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:clickable=
"true"
android:focusable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:focusableInTouchMode=
"true"
...
...
TOP_Pay/app/src/main/res/layout/dialog_report_record.xml
View file @
9559e65e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"700dp"
android:layout_height=
"700dp"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
android:layout_alignParentLeft=
"true"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:layout_alignParentTop=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:clickable=
"true"
android:focusable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:focusableInTouchMode=
"true"
...
...
TOP_Pay/app/src/main/res/layout/dialog_report_sum.xml
View file @
9559e65e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"700dp"
android:layout_height=
"700dp"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
android:layout_height=
"800dp"
android:layout_height=
"800dp"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:clickable=
"true"
android:clickable=
"true"
android:focusable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:focusableInTouchMode=
"true"
...
...
TOP_Pay/app/src/main/res/layout/dialog_rst_num_set.xml
View file @
9559e65e
...
@@ -2,41 +2,35 @@
...
@@ -2,41 +2,35 @@
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@
color/toast_transparent
"
android:background=
"@
drawable/bg_white_radius
"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:layout_width=
"
600dp
"
android:layout_width=
"
fill_parent
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:background=
"@drawable/bg_white_radius"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:layout_width=
"600dp"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"70dp"
android:gravity=
"center"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<ImageView
<ImageView
android:id=
"@+id/iv_cancel"
android:id=
"@+id/iv_cancel"
android:layout_width=
"25dp"
android:layout_width=
"25dp"
android:layout_height=
"25dp"
android:layout_height=
"25dp"
android:layout_marginRight=
"5dp"
android:layout_marginTop=
"5dp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<TextView
<TextView
android:id=
"@+id/dialog_title"
android:id=
"@+id/dialog_title"
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"10dp"
android:gravity=
"center"
android:gravity=
"center"
android:textColor=
"@color/
font_black_32
"
android:textColor=
"@color/
blue
"
android:textSize=
"30dp"
/>
android:textSize=
"30dp"
/>
</LinearLayout>
</LinearLayout>
...
@@ -154,6 +148,7 @@
...
@@ -154,6 +148,7 @@
<View
<View
android:layout_width=
"fill_parent"
android:layout_width=
"fill_parent"
android:layout_height=
"1dp"
android:layout_height=
"1dp"
android:layout_marginBottom=
"15dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:background=
"@color/main_gray"
/>
android:background=
"@color/main_gray"
/>
...
@@ -163,21 +158,6 @@
...
@@ -163,21 +158,6 @@
android:gravity=
"center"
>
android:gravity=
"center"
>
<Button
<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:id=
"@+id/dialog_clear"
android:layout_width=
"200dp"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_height=
"45dp"
...
@@ -188,20 +168,25 @@
...
@@ -188,20 +168,25 @@
android:textSize=
"30dp"
android:textSize=
"30dp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<View
<Button
android:layout_width=
"1dp"
android:id=
"@+id/dialog_cancel"
android:layout_height=
"fill_parent"
android:layout_width=
"200dp"
android:background=
"@color/main_gray"
/>
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
<Button
android:id=
"@+id/dialog_ok"
android:id=
"@+id/dialog_ok"
android:layout_width=
"200dp"
android:layout_width=
"200dp"
android:layout_height=
"45dp"
android:layout_height=
"45dp"
android:layout_margin
Right=
"5
dp"
android:layout_margin
Left=
"50
dp"
android:background=
"@
null
"
android:background=
"@
drawable/btn_click_white_grey
"
android:text=
"@string/toolbar_confirm"
android:text=
"@string/toolbar_confirm"
android:textColor=
"@color/font_blue_16"
android:textColor=
"@color/font_blue_16"
android:textSize=
"
30
dp"
/>
android:textSize=
"
28
dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
TOP_Pay/app/src/main/res/layout/dialog_shutdown_set.xml
0 → 100644
View file @
9559e65e
This diff is collapsed.
Click to expand it.
TOP_Pay/app/src/main/res/layout/pop_main_set.xml
View file @
9559e65e
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
android:id=
"@+id/ll_3"
android:id=
"@+id/ll_3"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"60dp"
android:layout_height=
"60dp"
android:layout_marginBottom=
"25dp"
android:gravity=
"center_horizontal"
android:gravity=
"center_horizontal"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -58,6 +57,24 @@
...
@@ -58,6 +57,24 @@
android:textColor=
"@color/black"
android:textColor=
"@color/black"
android:textSize=
"25sp"
/>
android:textSize=
"25sp"
/>
</LinearLayout>
</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>
</LinearLayout>
TOP_Pay/app/src/main/res/values/colors.xml
View file @
9559e65e
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
<color
name=
"line_background"
>
#ffcccccc
</color>
<color
name=
"line_background"
>
#ffcccccc
</color>
<color
name=
"done_text_color_normal"
>
#ff333333
</color>
<color
name=
"done_text_color_normal"
>
#ff333333
</color>
<color
name=
"done_text_color_disabled"
>
#ffcccccc
</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=
"darker_blue"
>
#ff00cc99
</color>
<color
name=
"date_picker_text_normal"
>
#ff999999
</color>
<color
name=
"date_picker_text_normal"
>
#ff999999
</color>
<color
name=
"calendar_header"
>
#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