android:icon="@drawable/ic_gravity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:label="@string/app_name">
- <activity android:name=".shutdown_activity"></activity>
+ <activity android:name=".shutdown_activity">
+ <intent-filter>
+ <action android:name="com.ic.action.SHUT_DOWN_PAGE" />
+ <category android:name=" android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
<activity android:name=".FactoryReset_activity"></activity>
<activity android:name=".GPSActivity"
android:configChanges="keyboardHidden|orientation|screenSize|locale|screenLayout|mcc|mnc|layoutDirection">
\r
public class shutdown_activity extends BaseActivity {\r
\r
- String TAG="shutdown_activity";\r
+ String TAG = "shutdown_activity";\r
Button btn_yes;\r
Button btn_no;\r
\r
super.onCreate(savedInstanceState);\r
setContentView(R.layout.activity_shutdown_activity);\r
setclicklistener(true);\r
- if(FTUtils.isA9()){\r
+ if (FTUtils.isA9()) {\r
btn_yes.setVisibility(View.GONE);\r
}\r
\r
}\r
\r
- private void setclicklistener(boolean b){\r
- btn_yes =(Button)findViewById(R.id.btn_yes);\r
- btn_no =(Button)findViewById(R.id.btn_no);\r
-\r
- if (b==true){\r
+ private void setclicklistener(boolean b) {\r
+ btn_yes = (Button) findViewById(R.id.btn_yes);\r
+ btn_no = (Button) findViewById(R.id.btn_no);\r
+ if (b == true) {\r
btn_yes.setClickable(true);\r
btn_yes.setEnabled(true);\r
btn_yes.setOnClickListener(new View.OnClickListener() {\r
@Override\r
public void onClick(View v) {\r
+ findViewById(R.id.bottom_tbn_container).setVisibility(View.GONE);\r
+ findViewById(R.id.shutdownText).setVisibility(View.GONE);\r
//log("shutdown");\r
finish();\r
try {\r
-\r
//获得ServiceManager类\r
- Class ServiceManager = Class\r
+ Class ServiceManager = Class\r
.forName("android.os.ServiceManager");\r
\r
//获得ServiceManager的getService方法\r
//调用asInterface方法获取IPowerManager对象\r
Object oIPowerManager = asInterface.invoke(null, oRemoteService);\r
//获得shutdown()方法\r
- Method shutdown = oIPowerManager.getClass().getMethod("shutdown",boolean.class,boolean.class);\r
+ Method shutdown = oIPowerManager.getClass().getMethod("shutdown", boolean.class, boolean.class);\r
//调用shutdown()方法\r
- shutdown.invoke(oIPowerManager,false,true);\r
+ shutdown.invoke(oIPowerManager, false, true);\r
\r
} catch (Exception e) {\r
Log.e(TAG, e.toString(), e);\r
}\r
});\r
}\r
+\r
//(0~20,0~20),(130~170,0~20),(130~170,120~170),(0~20,120~170)\r
- int[][] mapx={{0,40},{130,240},{0,40},{130,240}};\r
- int[][] mapy={{100,240},{100,240},{0,40},{0,40}};\r
- int touchindex=0;\r
+ int[][] mapx = {{0, 40}, {130, 240}, {0, 40}, {130, 240}};\r
+ int[][] mapy = {{100, 240}, {100, 240}, {0, 40}, {0, 40}};\r
+ int touchindex = 0;\r
\r
@Override\r
public boolean dispatchTouchEvent(MotionEvent ev) {\r
case MotionEvent.ACTION_UP:\r
//抬起时启动定时\r
float x = ev.getX();\r
- float y= ev.getY();\r
- if(FTUtils.isA9()){\r
- if ((x >mapx[touchindex][0] && x < mapx[touchindex][1] ) && (y > mapy[touchindex][0] && y < mapy[touchindex][1])){\r
+ float y = ev.getY();\r
+ if (FTUtils.isA9()) {\r
+ if ((x > mapx[touchindex][0] && x < mapx[touchindex][1]) && (y > mapy[touchindex][0] && y < mapy[touchindex][1])) {\r
touchindex++;\r
- if (touchindex ==4){\r
- touchindex=0;\r
+ if (touchindex == 4) {\r
+ touchindex = 0;\r
btn_yes.setVisibility(View.VISIBLE);\r
\r
}\r
- }else{\r
- touchindex=0;\r
+ } else {\r
+ touchindex = 0;\r
}\r
}\r
break;\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/no_pressed" />
+ <item android:drawable="@drawable/no" />
+</selector>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/yes_pressed" />
+ <item android:drawable="@drawable/yes" />
+</selector>
\ No newline at end of file
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
android:layout_width="match_parent"\r
android:layout_height="match_parent"\r
- android:orientation="vertical"\r
- android:background="@android:color/white">\r
+ android:background="@android:color/background_dark"\r
+ android:orientation="vertical">\r
\r
\r
<LinearLayout\r
android:layout_height="wrap_content"\r
android:layout_centerInParent="true"\r
android:orientation="vertical">\r
+\r
<TextView\r
android:id="@+id/shutdownText"\r
android:layout_width="wrap_content"\r
android:layout_gravity="center|center_horizontal|center_vertical"\r
android:text="@string/poweroff"\r
android:textAlignment="center"\r
- android:textColor="@color/black"\r
+ android:textColor="@color/white"\r
android:textSize="36sp"\r
android:textStyle="bold" />\r
</LinearLayout>\r
\r
- <LinearLayout\r
- android:layout_width="match_parent"\r
+ <!-- <LinearLayout-->\r
+ <!-- android:layout_width="match_parent"-->\r
+ <!-- android:layout_height="wrap_content"-->\r
+ <!-- android:layout_alignParentBottom="true"-->\r
+ <!-- android:layout_centerHorizontal="true"-->\r
+ <!-- android:orientation="horizontal">-->\r
+\r
+ <!-- <Button-->\r
+\r
+ <!-- style="@style/button_white_text"-->\r
+ <!-- android:layout_width="0dp"-->\r
+ <!-- android:layout_height="40dp"-->\r
+ <!-- android:layout_weight="1"-->\r
+ <!-- android:background="@drawable/button_no_s09"-->\r
+ <!-- android:text="@string/rf_no"-->\r
+ <!-- android:textColor="#fff"-->\r
+ <!-- android:visibility="visible" />-->\r
+\r
+ <!-- <Button-->\r
+\r
+ <!-- style="@style/button_white_text"-->\r
+ <!-- android:layout_width="0dp"-->\r
+ <!-- android:layout_height="40dp"-->\r
+ <!-- android:layout_weight="1"-->\r
+ <!-- android:background="@drawable/button_yes_s09"-->\r
+ <!-- android:text="@string/rf_yes"-->\r
+ <!-- android:textColor="#fff"-->\r
+ <!-- android:visibility="visible" />-->\r
+\r
+ <!-- </LinearLayout>-->\r
+\r
+ <RelativeLayout\r
+ android:id="@+id/bottom_tbn_container"\r
+ android:layout_width="wrap_content"\r
android:layout_height="wrap_content"\r
android:layout_alignParentBottom="true"\r
- android:layout_centerHorizontal="true"\r
- android:orientation="horizontal" >\r
+ android:layout_marginLeft="2.0dip"\r
+ android:layout_marginRight="2.0dip"\r
+ android:layout_marginBottom="2.0dip">\r
\r
- <Button\r
+ <ImageButton\r
android:id="@+id/btn_no"\r
- style="@style/button_white_text"\r
- android:layout_width="0dp"\r
- android:layout_height="40dp"\r
- android:layout_weight="1"\r
- android:background="#DA5B17"\r
- android:text="@string/rf_no"\r
- android:textColor="#fff"\r
- android:visibility="visible" />\r
-\r
- <Button\r
- android:id="@+id/btn_yes"\r
- style="@style/button_white_text"\r
- android:layout_width="0dp"\r
- android:layout_height="40dp"\r
- android:layout_weight="1"\r
- android:background="#DA5B17"\r
- android:text="@string/rf_yes"\r
- android:textColor="#fff"\r
- android:visibility="visible" />\r
+ android:layout_width="150.0dip"\r
+ android:layout_height="80.0dip"\r
+ android:layout_alignParentLeft="true"\r
+ android:background="@drawable/button_no_s09" />\r
\r
- </LinearLayout>\r
+ <ImageButton\r
+ android:id="@+id/btn_yes"\r
+ android:layout_width="150.0dip"\r
+ android:layout_height="80.0dip"\r
+ android:layout_alignParentRight="true"\r
+ android:background="@drawable/button_yes_s09" />\r
+ </RelativeLayout>\r
</RelativeLayout>\r
<!-- end -->\r
\r
\r
-\r
<!-- add by tyy 2016.9.2 -->\r
\r
<string name="result">测试结果</string>\r
<string name="china_dianxin"> "中国电信" </string>\r
<string name="sim_fail1"> "SIM卡过期" </string>\r
<string name="benji"> " 工厂测试" </string>\r
- <string name="poweroff">关机</string>\r
+ <string name="poweroff">确定关机?</string>\r
<string name="gongcheng"> "工厂测试" </string>\r
<string name="moshi"> "工程模式" </string>\r
<string name="shintool"> "地图拷贝工具" </string>\r
<string name="start_test_new">Start Testing</string>\r
<string name="benji">Factory test</string>\r
<string name="resunme">Reset恢复出厂设置</string>\r
- <string name="poweroff">PowerOff关机</string>\r
+ <string name="poweroff">确定关机?</string>\r
<string name="tip2">Logo: pass (green), not pass (red), not measured (white)</string>\r
\r
<string name="clear_new">Clear the test data</string>\r
distributionPath=wrapper/dists\r
zipStoreBase=GRADLE_USER_HOME\r
zipStorePath=wrapper/dists\r
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip\r
+distributionUrl=file:///D://TrillGatesWorks//Gradle//gradle-5.4.1-all.zip\r