File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
java/org/cgutman/usbip/config Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 24
24
public class UsbIpConfig extends ComponentActivity {
25
25
private Button serviceButton ;
26
26
private TextView serviceStatus ;
27
+ private TextView serviceReadyText ;
27
28
28
29
private boolean running ;
29
30
@@ -37,10 +38,12 @@ private void updateStatus() {
37
38
if (running ) {
38
39
serviceButton .setText ("Stop Service" );
39
40
serviceStatus .setText ("USB/IP Service Running" );
41
+ serviceReadyText .setText (R .string .ready_text );
40
42
}
41
43
else {
42
44
serviceButton .setText ("Start Service" );
43
45
serviceStatus .setText ("USB/IP Service Stopped" );
46
+ serviceReadyText .setText ("" );
44
47
}
45
48
}
46
49
@@ -60,8 +63,9 @@ protected void onCreate(Bundle savedInstanceState) {
60
63
super .onCreate (savedInstanceState );
61
64
setContentView (R .layout .activity_usbip_config );
62
65
63
- serviceButton = (Button ) findViewById (R .id .serviceButton );
64
- serviceStatus = (TextView ) findViewById (R .id .serviceStatus );
66
+ serviceButton = findViewById (R .id .serviceButton );
67
+ serviceStatus = findViewById (R .id .serviceStatus );
68
+ serviceReadyText = findViewById (R .id .serviceReadyText );
65
69
66
70
running = isMyServiceRunning (UsbIpService .class );
67
71
Original file line number Diff line number Diff line change 12
12
android : layout_height =" wrap_content"
13
13
android : layout_centerHorizontal =" true"
14
14
android : textAppearance =" ?android:attr/textAppearanceLarge" />
15
+
15
16
<Button
16
17
android : id =" @+id/serviceButton"
17
18
android : layout_width =" wrap_content"
18
19
android : layout_height =" wrap_content"
19
20
android : layout_below =" @+id/serviceStatus"
20
21
android : layout_centerHorizontal =" true" />
21
-
22
+
23
+ <TextView
24
+ android : id =" @+id/serviceReadyText"
25
+ android : layout_width =" wrap_content"
26
+ android : layout_height =" wrap_content"
27
+ android : layout_centerVertical =" true"
28
+ android : layout_centerHorizontal =" true"
29
+ android : gravity =" center"
30
+ android : textAppearance =" ?android:attr/textAppearanceLarge" />
31
+
22
32
</RelativeLayout >
Original file line number Diff line number Diff line change 2
2
3
3
<string name =" app_name" >USB/IP Server</string >
4
4
<string name =" service_name" >USB/IP Server Service</string >
5
-
5
+
6
+ <string name =" ready_text" >Claim a USB device from your USB/IP client to get started!</string >
6
7
</resources >
You can’t perform that action at this time.
0 commit comments