Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
石璀亮
/
agenew_a16_sos
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0e55d7e9
authored
Jul 31, 2019
by
cuiliang.shi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
底部菜单ui更新
1 parent
4801cc15
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
175 additions
and
122 deletions
app/build.gradle
app/src/main/java/com/toscl/location/hengfeng/activity/ServiceApplyActivity.java
app/src/main/java/com/toscl/location/hengfeng/activity/ServiceSettingActivity.java
app/src/main/java/com/toscl/location/hengfeng/activity/ServiceStopActivity.java
app/src/main/res/layout/service_apply.xml
app/src/main/res/layout/service_settting.xml
app/src/main/res/layout/service_stop.xml
app/src/main/res/values/styles.xml
app/build.gradle
View file @
0e55d7e
...
@@ -6,8 +6,8 @@ android {
...
@@ -6,8 +6,8 @@ android {
applicationId
"com.toscl.location.hengfeng"
applicationId
"com.toscl.location.hengfeng"
minSdkVersion
23
minSdkVersion
23
targetSdkVersion
28
targetSdkVersion
28
versionCode
4
versionCode
5
versionName
"0.
4
"
versionName
"0.
5
"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
}
buildTypes
{
buildTypes
{
...
@@ -21,7 +21,7 @@ android {
...
@@ -21,7 +21,7 @@ android {
android
.
applicationVariants
.
all
{
variant
->
android
.
applicationVariants
.
all
{
variant
->
variant
.
outputs
.
all
{
variant
.
outputs
.
all
{
// _${defaultConfig.versionName}
// _${defaultConfig.versionName}
outputFileName
=
"LocationService.apk"
outputFileName
=
"LocationService
_${defaultConfig.versionName}
.apk"
}
}
}
}
compileOptions
{
compileOptions
{
...
...
app/src/main/java/com/toscl/location/hengfeng/activity/ServiceApplyActivity.java
View file @
0e55d7e
...
@@ -8,6 +8,7 @@ import android.content.Intent;
...
@@ -8,6 +8,7 @@ import android.content.Intent;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.telephony.SubscriptionManager
;
import
android.telephony.SubscriptionManager
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.Toast
;
import
android.widget.Toast
;
...
@@ -61,6 +62,16 @@ public class ServiceApplyActivity extends Activity implements View.OnClickListen
...
@@ -61,6 +62,16 @@ public class ServiceApplyActivity extends Activity implements View.OnClickListen
}
}
}
}
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_MENU
){
String
phoneNumber
=
mPhoneNumber
.
getText
().
toString
();
apiPostServiceApply
(
phoneNumber
);
return
true
;
}
return
super
.
onKeyDown
(
keyCode
,
event
);
}
private
void
apiPostServiceApply
(
String
phoneNumber
)
{
private
void
apiPostServiceApply
(
String
phoneNumber
)
{
JSONObject
jsonBody
=
new
JSONObject
();
JSONObject
jsonBody
=
new
JSONObject
();
try
{
try
{
...
...
app/src/main/java/com/toscl/location/hengfeng/activity/ServiceSettingActivity.java
View file @
0e55d7e
...
@@ -8,6 +8,7 @@ import android.content.Context;
...
@@ -8,6 +8,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.ArrayAdapter
;
import
android.widget.ArrayAdapter
;
import
android.widget.EditText
;
import
android.widget.EditText
;
...
@@ -103,6 +104,15 @@ public class ServiceSettingActivity extends Activity implements View.OnClickList
...
@@ -103,6 +104,15 @@ public class ServiceSettingActivity extends Activity implements View.OnClickList
}
}
}
}
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_MENU
){
saveSetting
();
return
true
;
}
return
super
.
onKeyDown
(
keyCode
,
event
);
}
private
void
saveSetting
()
{
private
void
saveSetting
()
{
int
startIndex
=
mSpinnerForStartDate
.
getSelectedItemPosition
();
int
startIndex
=
mSpinnerForStartDate
.
getSelectedItemPosition
();
int
endIndex
=
mSpinnerForEndDate
.
getSelectedItemPosition
();
int
endIndex
=
mSpinnerForEndDate
.
getSelectedItemPosition
();
...
...
app/src/main/java/com/toscl/location/hengfeng/activity/ServiceStopActivity.java
View file @
0e55d7e
...
@@ -7,6 +7,7 @@ import android.content.Context;
...
@@ -7,6 +7,7 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -62,6 +63,20 @@ public class ServiceStopActivity extends Activity implements View.OnClickListene
...
@@ -62,6 +63,20 @@ public class ServiceStopActivity extends Activity implements View.OnClickListene
}
}
}
}
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
if
(
keyCode
==
KeyEvent
.
KEYCODE_MENU
){
if
(
mEtPhoneNumber
.
getText
().
toString
()
.
equals
(
PreferencesUtil
.
getInstance
(
this
).
getString
(
PreferencesUtil
.
HENG_FENG_PHONE
,
""
)))
{
apiStopService
();
}
else
{
Toast
.
makeText
(
this
,
getResources
().
getString
(
R
.
string
.
tips_phone_unvalid
),
Toast
.
LENGTH_SHORT
).
show
();
}
return
true
;
}
return
super
.
onKeyDown
(
keyCode
,
event
);
}
private
void
apiStopService
()
{
private
void
apiStopService
()
{
JSONObject
jsonBody
=
new
JSONObject
();
JSONObject
jsonBody
=
new
JSONObject
();
try
{
try
{
...
...
app/src/main/res/layout/service_apply.xml
View file @
0e55d7e
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_height=
"match_parent"
>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent
"
android:layout_height=
"0dp
"
android:orientation=
"vertical
"
>
android:layout_weight=
"1
"
>
<TextView
<TextView
android:layout_gravity=
"center"
android:layout_gravity=
"center"
...
@@ -12,8 +15,7 @@
...
@@ -12,8 +15,7 @@
android:padding=
"10px"
android:padding=
"10px"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"请输入在营业厅申请的套餐手机号"
android:text=
"请输入在营业厅申请的套餐手机号"
/>
tools:ignore=
"MissingConstraints"
/>
<LinearLayout
<LinearLayout
style=
"@style/InputBoxStyle"
style=
"@style/InputBoxStyle"
...
@@ -36,39 +38,41 @@
...
@@ -36,39 +38,41 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
</LinearLayout>
android:layout_marginTop=
"50dp"
<RelativeLayout
android:id=
"@+id/bottom"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content"
>
android:layout_height=
"
50px"
<LinearLayout
android:background=
"#ffffff"
android:layout_width=
"0dp"
android:layout_alignParentBottom=
"true"
>
android:layout_weight=
"1"
android:layout_height=
"wrap_content
"
<View
android:background=
"#ffd3d3d3"
android:layout_width=
"match_parent"
android:layout_height=
"1dp
"
android:layout_
gravity=
"bottom"
>
android:layout_
alignParentTop=
"true"
/
>
<Button
android:focusable=
"true"
<TextView
android:id=
"@+id/bt_save"
android:id=
"@+id/bt_save"
android:layout_gravity=
"center_vertical"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/dialog_save"
android:text=
"申请"
android:textSize=
"25sp"
/>
android:textColor=
"#000000"
</LinearLayout>
android:textSize=
"30sp"
android:layout_centerVertical=
"true"
android:layout_alignParentLeft=
"true"
android:layout_marginLeft=
"20dp"
style=
"@style/TextStyleLsk"
/>
<LinearLayout
<TextView
android:orientation=
"horizontal"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
>
<Button
android:layout_gravity=
"center_vertical"
android:focusable=
"true"
android:id=
"@+id/bt_cancel"
android:id=
"@+id/bt_cancel"
android:layout_width=
"match_par
ent"
android:layout_width=
"wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/dialog_cancel"
android:text=
"返回"
android:textSize=
"25sp"
/>
android:textColor=
"#090808"
</LinearLayout>
android:textSize=
"30sp"
</LinearLayout>
android:layout_centerVertical=
"true"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"20dp"
style=
"@style/TextStyleRsk"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/service_settting.xml
View file @
0e55d7e
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<
ScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools
"
android:orientation=
"vertical
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
<ScrollView
android:orientation=
"vertical"
android:orientation=
"vertical"
android:padding=
"10dp"
>
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<LinearLayout
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"0dp"
android:orientation=
"vertical"
>
android:layout_weight=
"1"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -153,46 +157,42 @@
...
@@ -153,46 +157,42 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
<LinearLayout
<RelativeLayout
android:id=
"@+id/bottom"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"50px"
android:layout_marginTop=
"15px"
>
android:background=
"#ffffff"
android:layout_alignParentBottom=
"true"
>
<LinearLayout
<View
android:background=
"#ffd3d3d3"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_width=
"0dp"
android:layout_alignParentTop=
"true"
/>
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_weight=
"1"
>
<Button
<TextView
android:id=
"@+id/bt_save"
android:id=
"@+id/bt_save"
android:layout_width=
"match_parent"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:focusable=
"true"
android:text=
"@string/dialog_save"
android:textSize=
"25sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:text=
"设置"
android:layout_weight=
"1"
android:textColor=
"#000000"
android:orientation=
"horizontal"
>
android:textSize=
"30sp"
android:layout_centerVertical=
"true"
android:layout_alignParentLeft=
"true"
android:layout_marginLeft=
"20dp"
style=
"@style/TextStyleLsk"
/>
<Button
<TextView
android:id=
"@+id/bt_cancel"
android:id=
"@+id/bt_cancel"
android:layout_width=
"match_par
ent"
android:layout_width=
"wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:text=
"返回"
android:focusable=
"true"
android:textColor=
"#090808"
android:text=
"@string/dialog_cancel"
android:textSize=
"30sp"
android:textSize=
"25sp"
/>
android:layout_centerVertical=
"true"
</LinearLayout>
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"20dp"
</LinearLayout>
style=
"@style/TextStyleRsk"
/>
</LinearLayout>
</ScrollView>
</RelativeLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/service_stop.xml
View file @
0e55d7e
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
android:orientation=
"vertical"
>
<ScrollView
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
@@ -16,8 +19,7 @@
...
@@ -16,8 +19,7 @@
android:padding=
"10px"
android:padding=
"10px"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"您在营业厅申请的套餐手机号为0,请再次输入该号码以确认停止定位服务"
android:text=
"您在营业厅申请的套餐手机号为0,请再次输入该号码以确认停止定位服务"
/>
tools:ignore=
"MissingConstraints"
/>
<LinearLayout
<LinearLayout
style=
"@style/InputBoxStyle"
style=
"@style/InputBoxStyle"
...
@@ -40,41 +42,42 @@
...
@@ -40,41 +42,42 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
</LinearLayout>
android:layout_marginTop=
"20dp"
</ScrollView>
<RelativeLayout
android:id=
"@+id/bottom"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"50px"
<LinearLayout
android:background=
"#ffffff"
android:layout_width=
"0dp"
android:layout_alignParentBottom=
"true"
>
android:layout_weight=
"1"
android:layout_height=
"wrap_content
"
<View
android:background=
"#ffd3d3d3"
android:layout_width=
"match_parent"
android:layout_height=
"1dp
"
android:layout_gravity=
"bottom"
>
android:layout_alignParentTop=
"true"
/
>
<Button
android:focusable=
"true"
<TextView
android:id=
"@+id/bt_save"
android:id=
"@+id/bt_save"
android:layout_gravity=
"center_vertical"
android:layout_width=
"wrap_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/dialog_save"
android:text=
"停止"
android:textSize=
"25sp"
/>
android:textColor=
"#000000"
</LinearLayout>
android:textSize=
"30sp"
android:layout_centerVertical=
"true"
android:layout_alignParentLeft=
"true"
android:layout_marginLeft=
"20dp"
style=
"@style/TextStyleLsk"
/>
<LinearLayout
<TextView
android:orientation=
"horizontal"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
>
<Button
android:layout_gravity=
"center_vertical"
android:focusable=
"true"
android:id=
"@+id/bt_cancel"
android:id=
"@+id/bt_cancel"
android:layout_width=
"match_par
ent"
android:layout_width=
"wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/dialog_cancel"
android:text=
"返回"
android:textSize=
"25sp"
/>
android:textColor=
"#090808"
</LinearLayout>
android:textSize=
"30sp"
</LinearLayout>
android:layout_centerVertical=
"true"
</LinearLayout>
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"20dp"
style=
"@style/TextStyleRsk"
/>
</ScrollView>
</RelativeLayout>
\ No newline at end of file
</LinearLayout>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
0e55d7e
...
@@ -23,5 +23,14 @@
...
@@ -23,5 +23,14 @@
<item
name=
"android:layout_marginLeft"
>
10dp
</item>
<item
name=
"android:layout_marginLeft"
>
10dp
</item>
<item
name=
"android:background"
>
@null
</item>
<item
name=
"android:background"
>
@null
</item>
</style>
</style>
<style
name=
"TextStyleRsk"
>
<item
name=
"android:focusable"
>
false
</item>
<item
name=
"android:clickable"
>
true
</item>
<item
name=
"android:focusableInTouchMode"
>
false
</item>
</style>
<style
name=
"TextStyleLsk"
>
<item
name=
"android:focusable"
>
false
</item>
<item
name=
"android:clickable"
>
false
</item>
<item
name=
"android:focusableInTouchMode"
>
false
</item>
</style>
</resources>
</resources>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment