Commit 3d6a465e by cuiliang.shi

功能控制提示 UI适配37平台

1 parent 1ab76129
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
signingConfigs {
debug {
storeFile file('F:\\Cuiliang.shi\\demand\\hengfeng_loc\\agenew_a16_sos\\hengfeng_sos.jks')
storePassword 'agenewsos'
keyAlias = 'hengfeng_sos'
keyPassword 'agenewsos'
}
}
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
applicationId "com.toscl.location.hengfeng" applicationId "com.toscl.location.hengfeng"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 28 targetSdkVersion 28
versionCode 7 versionCode 11
versionName "0.7" versionName "0.7.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
......
...@@ -3,6 +3,7 @@ package com.toscl.location.hengfeng.activity; ...@@ -3,6 +3,7 @@ package com.toscl.location.hengfeng.activity;
import android.app.Activity; import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.telephony.SubscriptionManager;
import android.view.View; import android.view.View;
import android.widget.Toast; import android.widget.Toast;
...@@ -34,15 +35,17 @@ public class NavActivity extends Activity implements View.OnClickListener { ...@@ -34,15 +35,17 @@ public class NavActivity extends Activity implements View.OnClickListener {
startActivity(new Intent(this, ServiceInfoActivity.class)); startActivity(new Intent(this, ServiceInfoActivity.class));
break; break;
case R.id.service_setting: case R.id.service_setting:
// if (PreferencesUtil.getInstance(this).getBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false) if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){
// && PhoneUtils.hengdaServiceAvailable()) { Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show();
}else{
startActivity(new Intent(this, ServiceSettingActivity.class)); startActivity(new Intent(this, ServiceSettingActivity.class));
// } else { }
// Toast.makeText(this, getString(R.string.toast_tips_unavailable), Toast.LENGTH_SHORT).show();
// }
break; break;
case R.id.service_stop: case R.id.service_stop:
if (PreferencesUtil.getInstance(this).getBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false) if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){
Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show();
}else if (PreferencesUtil.getInstance(this).getBoolean(PreferencesUtil.HENG_FENG_IS_OEPN, false)
&& PhoneUtils.hengdaServiceAvailable(this)) { && PhoneUtils.hengdaServiceAvailable(this)) {
startActivity(new Intent(this, ServiceStopActivity.class)); startActivity(new Intent(this, ServiceStopActivity.class));
} else { } else {
...@@ -50,7 +53,11 @@ public class NavActivity extends Activity implements View.OnClickListener { ...@@ -50,7 +53,11 @@ public class NavActivity extends Activity implements View.OnClickListener {
} }
break; break;
case R.id.service_apply: case R.id.service_apply:
if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){
Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show();
}else{
startActivity(new Intent(this, ServiceApplyActivity.class)); startActivity(new Intent(this, ServiceApplyActivity.class));
}
break; break;
} }
} }
......
...@@ -40,7 +40,7 @@ public class ServiceApplyActivity extends Activity implements View.OnClickListen ...@@ -40,7 +40,7 @@ public class ServiceApplyActivity extends Activity implements View.OnClickListen
* */ * */
if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){ if (PhoneUtils.getSubId(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT) == SubscriptionManager.INVALID_SUBSCRIPTION_ID){
Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show(); Toast.makeText(this, getResources().getString(R.string.location_service_failed_tips), Toast.LENGTH_SHORT).show();
return; finish();
} }
mPhoneNumber = findViewById(R.id.phone_number); mPhoneNumber = findViewById(R.id.phone_number);
mPhoneNumber.setText(PhoneUtils.getLocalNumber(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT)); mPhoneNumber.setText(PhoneUtils.getLocalNumber(this, PreferencesUtil.HENG_FENG_DEFAULT_SLOT));
......
<?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"
xmlns:tools="http://schemas.android.com/tools" 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:background="#FFFFFF"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5px"> android:padding="5px">
<Button <Button
android:layout_gravity="center_vertical"
android:focusable="true"
android:id="@+id/service_apply" android:id="@+id/service_apply"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:focusable="true"
android:text="@string/title_apply" android:text="@string/title_apply"
android:textSize="25px"/> android:textColor="#000000"
android:textSize="25px" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5px"> android:padding="5px">
<Button <Button
android:layout_gravity="center_vertical"
android:focusable="true"
android:id="@+id/service_stop" android:id="@+id/service_stop"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:focusable="true"
android:text="@string/title_server_stop" android:text="@string/title_server_stop"
android:textSize="25px"/> android:textColor="#000000"
android:textSize="25px" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5px"> android:padding="5px">
<Button <Button
android:layout_gravity="center_vertical"
android:focusable="true"
android:id="@+id/service_setting" android:id="@+id/service_setting"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:focusable="true"
android:text="@string/title_service_setting" android:text="@string/title_service_setting"
android:textSize="25px"/> android:textColor="#000000"
android:textSize="25px" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5px"> android:padding="5px">
<Button <Button
android:layout_gravity="center_vertical"
android:focusable="true"
android:id="@+id/service_info" android:id="@+id/service_info"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:focusable="true"
android:text="@string/title_server_info" android:text="@string/title_server_info"
android:textSize="25px"/> android:textColor="#000000"
android:textSize="25px" />
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical"
android:background="#FFFFFF">
<LinearLayout <LinearLayout
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"> android:layout_weight="1"
android:orientation="vertical">
<TextView <TextView
android:layout_gravity="center"
android:textSize="24px"
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:layout_gravity="center"
android:padding="10px"
android:text="请输入在营业厅申请的套餐手机号"
android:textSize="24px" />
<LinearLayout <LinearLayout
style="@style/InputBoxStyle" style="@style/InputBoxStyle"
android:layout_marginTop="20px"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="20px">
<EditText <EditText
android:id="@+id/phone_number" android:id="@+id/phone_number"
style="@style/EditTextStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cursorVisible="true" android:cursorVisible="true"
android:hint="输入手机号码"
android:textCursorDrawable="@color/colorPrimary"
android:text="0"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="330px" android:hint="输入手机号码"
android:textSize="28px"
style="@style/EditTextStyle"
android:inputType="number" android:inputType="number"
android:layout_width="match_parent" android:minWidth="330px"
android:layout_height="wrap_content" /> android:text="0"
android:textCursorDrawable="@color/colorPrimary"
android:textSize="28px" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/bottom" android:id="@+id/bottom"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50px" android:layout_height="50px"
android:layout_alignParentBottom="true"
android:background="#ffffff" android:background="#ffffff"
android:layout_alignParentBottom="true"> android:orientation="horizontal">
<View android:background="#ffd3d3d3" android:layout_width="match_parent" android:layout_height="1dp" <View
android:layout_alignParentTop="true"/> android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="#ffd3d3d3" />
<TextView <TextView
android:id="@+id/bt_save" android:id="@+id/bt_save"
style="@style/TextStyleLsk"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="申请"
android:textColor="#000000"
android:textSize="30sp"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
style="@style/TextStyleLsk"/> android:text="申请"
android:textColor="#000000"
android:textSize="30sp" />
<TextView <TextView
android:id="@+id/bt_cancel" android:id="@+id/bt_cancel"
style="@style/TextStyleRsk"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="返回"
android:textColor="#090808"
android:textSize="30sp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
style="@style/TextStyleRsk"/> android:text="返回"
android:textColor="#090808"
android:textSize="30sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
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="#FFFFFF">
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView <TextView
android:padding="10px"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:textSize="24px" android:padding="10px"
android:text="@string/service_info"/> android:text="@string/service_info"
android:textSize="24px" />
</ScrollView> </ScrollView>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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:background="#FFFFFF">
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"> android:layout_weight="1"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
android:id="@+id/service_stop_tips" android:id="@+id/service_stop_tips"
android:layout_gravity="center"
android:textSize="22px"
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:layout_gravity="center"
android:padding="10px"
android:textColor="#000000"
android:text="您在营业厅申请的套餐手机号为0,请再次输入该号码以确认停止定位服务"
android:textSize="22px" />
<LinearLayout <LinearLayout
style="@style/InputBoxStyle" style="@style/InputBoxStyle"
android:layout_marginTop="5px"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="5px">
<EditText <EditText
android:id="@+id/phone_number" android:id="@+id/phone_number"
style="@style/EditTextStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:cursorVisible="true" android:cursorVisible="true"
android:hint="输入手机号码"
android:textCursorDrawable="@color/colorPrimary"
android:text=""
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:minWidth="330px" android:hint="输入手机号码"
android:textSize="28px"
style="@style/EditTextStyle"
android:inputType="number" android:inputType="number"
android:layout_width="match_parent" android:minWidth="330px"
android:layout_height="wrap_content" /> android:text=""
android:textCursorDrawable="@color/colorPrimary"
android:textSize="28px" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<RelativeLayout <RelativeLayout
android:id="@+id/bottom" android:id="@+id/bottom"
android:orientation="horizontal"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50px" android:layout_height="50px"
android:layout_alignParentBottom="true"
android:background="#ffffff" android:background="#ffffff"
android:layout_alignParentBottom="true"> android:orientation="horizontal">
<View android:background="#ffd3d3d3" android:layout_width="match_parent" android:layout_height="1dp" <View
android:layout_alignParentTop="true"/> android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_alignParentTop="true"
android:background="#ffd3d3d3" />
<TextView <TextView
android:id="@+id/bt_save" android:id="@+id/bt_save"
style="@style/TextStyleLsk"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="停止"
android:textColor="#000000"
android:textSize="30sp"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
style="@style/TextStyleLsk"/> android:text="停止"
android:textColor="#000000"
android:textSize="30sp" />
<TextView <TextView
android:id="@+id/bt_cancel" android:id="@+id/bt_cancel"
style="@style/TextStyleRsk"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="返回"
android:textColor="#090808"
android:textSize="30sp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
style="@style/TextStyleRsk"/> android:text="返回"
android:textColor="#090808"
android:textSize="30sp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="android:textColor">#000000</item>
</style> </style>
<style name="InputBoxStyle"> <style name="InputBoxStyle">
...@@ -22,6 +23,8 @@ ...@@ -22,6 +23,8 @@
<item name="android:layout_marginBottom">5dp</item> <item name="android:layout_marginBottom">5dp</item>
<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>
<item name="android:textColor">#000000</item>
</style> </style>
<style name="TextStyleRsk"> <style name="TextStyleRsk">
<item name="android:focusable">false</item> <item name="android:focusable">false</item>
...@@ -31,6 +34,7 @@ ...@@ -31,6 +34,7 @@
<style name="TextStyleLsk"> <style name="TextStyleLsk">
<item name="android:focusable">false</item> <item name="android:focusable">false</item>
<item name="android:clickable">false</item> <item name="android:clickable">false</item>
<item name="android:textColor">#000000</item>
<item name="android:focusableInTouchMode">false</item> <item name="android:focusableInTouchMode">false</item>
</style> </style>
</resources> </resources>
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!