Commits

Micha Kops committed efeae08

layout adjustments added, default timeout increased

Comments (0)

Files changed (5)

 	package="com.hascode.android.screenlock" android:versionCode="1"
 	android:versionName="1.0">
 	<uses-sdk android:minSdkVersion="8" />
-	<uses-permission android:name="android.permission.CHANGE_CONFIGURATION"></uses-permission>
-	<uses-permission android:name="android.permission.WRITE_APN_SETTINGS"></uses-permission>
 	<uses-permission android:name="android.permission.WRITE_SETTINGS"></uses-permission>
 
-	<application android:icon="@drawable/icon" android:label="@string/app_name">
+	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
 		<service android:enabled="true" android:name="LockControlService">
 		</service>
 		<receiver android:name="LockControlWidgetProvider">

gen/com/hascode/android/screenlock/R.java

         public static final int tvTime=0x7f080001;
         public static final int txtOff=0x7f080003;
         public static final int txtOn=0x7f080002;
+        public static final int txtVendor=0x7f080004;
         public static final int widget_root=0x7f080000;
     }
     public static final class layout {
         public static final int app_name=0x7f070001;
         public static final int configError=0x7f070004;
         public static final int hello=0x7f070000;
+        public static final int off=0x7f070007;
+        public static final int on=0x7f070006;
         public static final int screenIsLocked=0x7f070002;
         public static final int screenIsUnlocked=0x7f070003;
+        public static final int vendor=0x7f070005;
     }
     public static final class xml {
         public static final int lockwidget_provider=0x7f040000;
 	<TextView android:id="@+id/tvTime" android:layout_width="match_parent"
 		android:gravity="top|center_horizontal" android:paddingTop="30dp"
 		android:textColor="@android:color/black" android:text="Loading"
-		android:textSize="12pt" android:layout_height="wrap_content" />
-	<TextView android:text="On" android:id="@+id/txtOn"
-		android:textColor="@color/green" android:clickable="true"
-		android:layout_width="fill_parent" android:textSize="8pt"
-		android:layout_height="wrap_content" android:layout_marginLeft="@dimen/text_margin_left" android:layout_marginTop="@dimen/states_margin_top"/>
-	<TextView android:text="Off" android:id="@+id/txtOff"
-		android:textColor="@color/red" android:clickable="true"
-		android:layout_width="fill_parent" android:textSize="8pt"
-		android:layout_height="wrap_content" android:layout_marginLeft="@dimen/text_margin_left" android:layout_marginTop="@dimen/states_margin_top"/>
+		android:textSize="18sp" android:layout_height="wrap_content" />
+	<TextView android:text="@string/on" android:id="@+id/txtOn"
+		android:textColor="@color/green" android:gravity="center_horizontal"
+		android:layout_width="fill_parent" android:textSize="14sp"
+		android:layout_height="wrap_content" android:layout_marginTop="@dimen/states_margin_top" />
+	<TextView android:text="@string/off" android:id="@+id/txtOff"
+		android:textColor="@color/red" android:gravity="center_horizontal"
+		android:layout_width="fill_parent" android:textSize="14sp"
+		android:layout_height="wrap_content" android:layout_marginTop="@dimen/states_margin_top" />
+	<TextView android:layout_width="fill_parent" android:id="@+id/txtVendor"
+		android:textSize="9sp"
+		android:gravity="center_horizontal" android:textColor="@android:color/black"
+		android:layout_height="wrap_content" android:text="@string/vendor" android:layout_marginTop="12dp"/>
 </LinearLayout>

res/values/strings.xml

     <string name="screenIsLocked">Lock On</string>
     <string name="screenIsUnlocked">Lock Off</string>
     <string name="configError">Error</string>
+    <string name="vendor">hasCode.com</string>
+    <string name="on">On</string>
+    <string name="off">Off</string>
 </resources>

src/com/hascode/android/screenlock/LockControlService.java

 	public static final String ACTION_UNLOCK = "com.hascode.android.lockwidget.unlock";
 	public static final String ACTION_STATUS = "com.hascode.android.lockwidget.status";
 
-	private static final int DEFAULT_TIMEOUT_MILLIS = 6000;
+	private static final int DEFAULT_TIMEOUT_MILLIS = 30000;
 	private static final String APP_TAG = "com.hascode.android.lockwidget";
 
 	@Override