Skip to content

Commit 2be118a

Browse files
author
davidgraeff
committed
Make Lint happy; Add copy of strings for english local; Change about dialog content; Add packages; Add group name support
1 parent 822d134 commit 2be118a

38 files changed

+936
-429
lines changed

AndroidManifest.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="oly.netpowerctrl"
4-
android:versionCode="1"
5-
android:versionName="1.0" >
4+
android:versionCode="3"
5+
android:versionName="1.2" >
66

77
<uses-sdk android:minSdkVersion="14"
88
android:targetSdkVersion="17" />
@@ -39,7 +39,7 @@
3939
</activity>
4040

4141
<activity
42-
android:name="oly.netpowerctrl.main.DeviceControlActivity"
42+
android:name="oly.netpowerctrl.devicecontrol.DeviceControlActivity"
4343
android:configChanges="keyboardHidden|orientation|screenSize"
4444
android:theme="@style/Theme.CustomLightTheme">
4545
</activity>
@@ -51,7 +51,7 @@
5151
android:exported="true">
5252
</activity>
5353

54-
<activity android:name="oly.netpowerctrl.service.WidgetConfig">
54+
<activity android:name="oly.netpowerctrl.widget.WidgetConfig">
5555
<intent-filter>
5656
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
5757
</intent-filter>
@@ -70,7 +70,7 @@
7070
<receiver
7171
android:icon="@drawable/netpowerctrl"
7272
android:label="@string/app_name"
73-
android:name="oly.netpowerctrl.service.DeviceWidgetProvider" >
73+
android:name="oly.netpowerctrl.widget.DeviceWidgetProvider" >
7474
<intent-filter >
7575
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
7676
</intent-filter>

res/layout/about.xml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,25 @@
1919
android:layout_width="fill_parent"
2020
android:layout_height="wrap_content"
2121
android:layout_gravity="center"
22-
android:gravity="center" />
22+
android:gravity="center"
23+
android:linksClickable="true"
24+
android:autoLink="web"/>
2325

2426
</TableRow>
2527

2628
<TableRow>
27-
<TextView
28-
android:id="@+id/tvAboutCopyright"
29+
<Button
30+
android:id="@+id/tvAboutStore"
31+
android:layout_width="fill_parent"
32+
android:layout_height="wrap_content"
33+
android:layout_span="2" />
34+
</TableRow>
35+
<TableRow>
36+
<Button
37+
android:id="@+id/tvAboutSource"
2938
android:layout_width="fill_parent"
3039
android:layout_height="wrap_content"
31-
android:textSize="10dip"
32-
android:textStyle="italic"
33-
android:layout_span="2"
34-
android:layout_margin="8dip"
35-
android:textColor="#cccccc" />
40+
android:layout_span="2" />
3641
</TableRow>
42+
3743
</TableLayout>

res/layout/device_list_item.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
android:paddingRight="12dip" >
1010

1111
<LinearLayout
12-
xmlns:android="http://schemas.android.com/apk/res/android"
1312
android:layout_width="0dp"
1413
android:layout_height="wrap_content"
1514
android:layout_marginBottom="5dp"

res/layout/group_list_item.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="fill_parent"
4+
android:layout_height="wrap_content"
5+
android:baselineAligned="true"
6+
android:gravity="center_vertical"
7+
android:orientation="horizontal"
8+
android:paddingLeft="16dip"
9+
android:paddingRight="12dip" >
10+
11+
<LinearLayout
12+
android:layout_width="0dp"
13+
android:layout_height="wrap_content"
14+
android:layout_marginBottom="5dp"
15+
android:layout_marginTop="5dp"
16+
android:layout_weight="1"
17+
android:orientation="vertical" >
18+
19+
<TextView
20+
android:id="@+id/group_list_name"
21+
android:layout_width="fill_parent"
22+
android:layout_height="wrap_content"
23+
android:textSize="16sp"
24+
android:textStyle="bold" />
25+
26+
<TextView
27+
android:id="@+id/group_list_details"
28+
android:layout_width="fill_parent"
29+
android:layout_height="wrap_content"
30+
android:textSize="16sp" />
31+
</LinearLayout>
32+
33+
<View
34+
android:layout_width="1dp"
35+
android:layout_height="fill_parent"
36+
android:layout_marginBottom="10dp"
37+
android:layout_marginTop="10dp"
38+
android:background="#80808080" />
39+
40+
<ImageButton
41+
android:id="@+id/btnRemoveGroup"
42+
android:layout_width="wrap_content"
43+
android:layout_height="wrap_content"
44+
android:background="@android:drawable/list_selector_background"
45+
android:contentDescription="@string/delete_device"
46+
android:padding="5dp"
47+
android:src="@drawable/ic_menu_delete" />
48+
49+
</LinearLayout>

res/layout/outlet_list_item.xml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="fill_parent"
44
android:layout_height="wrap_content"
5-
android:baselineAligned="true"
6-
android:gravity="center_vertical"
75
android:orientation="horizontal"
86
android:paddingLeft="16dip"
97
android:paddingRight="12dip" >
108

9+
<Spinner
10+
android:id="@+id/outlet_list_spinner"
11+
android:layout_width="0dp"
12+
android:layout_height="wrap_content"
13+
android:layout_weight="0.30" />
14+
1115
<TextView
12-
android:id="@+id/outlet_list_item"
13-
android:layout_width="0dip"
16+
android:id="@+id/outlet_list_text"
17+
android:layout_width="0dp"
1418
android:layout_height="wrap_content"
15-
android:layout_weight="0.48"
16-
android:layout_marginBottom="5dp"
17-
android:layout_marginTop="5dp"
19+
android:layout_gravity="fill"
20+
android:layout_weight="0.70"
1821
android:text="" />
19-
22+
2023
</LinearLayout>

res/layout/shortcut_activity.xml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:orientation="vertical" >
6+
7+
<ListView
8+
android:id="@+id/lvOutletSelect"
9+
android:layout_width="match_parent"
10+
android:layout_height="0dp"
11+
android:layout_marginBottom="5dp"
12+
android:layout_marginTop="5dp"
13+
android:layout_weight="1" >
14+
15+
</ListView>
16+
17+
<LinearLayout
18+
style="?android:attr/buttonBarStyle"
19+
android:layout_width="match_parent"
20+
android:layout_height="wrap_content"
21+
android:gravity="bottom|right"
22+
android:padding="5dp"
23+
android:orientation="horizontal" >
24+
25+
<Button
26+
style="?android:attr/buttonBarButtonStyle"
27+
android:id="@+id/btnCancelShortcut"
28+
android:layout_width="0dp"
29+
android:layout_height="wrap_content"
30+
android:layout_weight="1"
31+
android:text="@android:string/cancel"
32+
android:drawableLeft="@drawable/ic_menu_close_clear_cancel" />
33+
34+
<Button
35+
style="?android:attr/buttonBarButtonStyle"
36+
android:id="@+id/btnAcceptShortcut"
37+
android:layout_width="0dp"
38+
android:layout_height="wrap_content"
39+
android:layout_weight="1"
40+
android:text="@android:string/ok"
41+
android:drawableLeft="@android:drawable/ic_menu_save" />
42+
43+
</LinearLayout>
44+
45+
</LinearLayout>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
33
<item android:id="@+id/menu_add_device" android:title="@string/menu_add_device"></item>
4+
<item android:id="@+id/menu_remove_group" android:title="@string/menu_remove_group"></item>
45
</menu>

res/raw/about.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<h3>NET-PwrCtrl</h3>
1+
<h3>NET-PwrCtrl</h3>
2+
VersionX<br>
23

3-
Version 1.0<br>
4-
Copyright 2012<br>
5-
<b>www.nittka.com</b>
4+
© 2013 <b>David Gräff</b><br>
5+
© 2012 <b><a href="http://www.nittka.com">Oliver Nittka</a></b><br><br>

res/values-de/strings.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
<string name="device_name_summary">Beliebige Bezeichnung für dieses Gerät.</string>
3535
<string name="device_ip">Hostname or IP</string>
3636
<string name="device_ip_summary">Der Hostname oder die IP-Adresse für dieses Gerät.</string>
37+
<string name="device_mac">MAC Adresse</string>
38+
<string name="device_mac_summary">Die MAC Adresse des Geräts.</string>
3739
<string name="device_default_ports">Standard UDP-Ports?</string>
3840
<string name="device_send_udp">UDP-Port zum Senden</string>
3941
<string name="device_send_udp_summary">Siehe \"Empfangen\" in der Web-Oberfläche des Gerätes.</string>
@@ -47,6 +49,7 @@
4749
<string name="device_outlets_summary">Konfiguration der einzelnen Steckdosen des Gerätes</string>
4850

4951
<string name="menu_add_device">Neues Gerät</string>
52+
<string name="menu_remove_group">Gruppe entfernen</string>
5053
<string name="menu_about">Über</string>
5154
<string name="menu_cancel">Abbruch</string>
5255
<string name="menu_delete_all">Alle löschen</string>
@@ -69,7 +72,22 @@
6972
<string name="outlet_delete">Löschen</string>
7073

7174
<string name="choose_widget_device">Bitte wählen Sie ein Gerät für dieses Widget</string>
75+
<string name="choose_shortcut_outlets">Erstelle Shortcut/Gruppe</string>
7276
<string name="all_outlets">Steckdosen</string>
7377
<string name="groups">Gruppen</string>
7478
<string name="devices">Geräte</string>
79+
80+
<string name="groupname">Gruppename</string>
81+
<string name="groupname_long">Bitte geben Sie einen neuen Gruppennamen ein</string>
82+
83+
<string name="off">Aus</string>
84+
<string name="on">An</string>
85+
<string name="toggle">Wechsel</string>
86+
87+
<string-array name="shortcutchoices">
88+
<item>Ignorieren</item>
89+
<item>Aussschalten</item>
90+
<item>Einschalten</item>
91+
<item>Umschalten</item>
92+
</string-array>
7593
</resources>

0 commit comments

Comments
 (0)