Improve main activity user experience
This commit is contained in:
5
app/src/main/res/drawable/ic_power_off.xml
Normal file
5
app/src/main/res/drawable/ic_power_off.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="200dp" android:tint="@android:color/darker_gray"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="200dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
|
||||
</vector>
|
||||
5
app/src/main/res/drawable/ic_power_on.xml
Normal file
5
app/src/main/res/drawable/ic_power_on.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<vector android:height="200dp" android:tint="@color/colorAccent"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="200dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
|
||||
</vector>
|
||||
@@ -7,11 +7,19 @@
|
||||
android:orientation="vertical"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<Button
|
||||
<TextView
|
||||
android:id="@+id/prompt_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/main_activity_prompt_to_run"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/control_server_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="2"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#00000000"
|
||||
android:onClick="controlServer"
|
||||
android:text="@string/main_activity_run" />
|
||||
app:srcCompat="@drawable/ic_power_off" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
<string name="main_activity_run">Run</string>
|
||||
<string name="main_activity_stop">Stop</string>
|
||||
<string name="main_activity_prompt_to_run">Tap power on button to run the server</string>
|
||||
<string name="main_activity_prompt_to_stop">Tap power off button to stop the server</string>
|
||||
|
||||
<string name="service_notification_category_name">HTTP Server</string>
|
||||
<string name="service_notification_category_description">The fixed notification keeping the HTTP server alive</string>
|
||||
|
||||
Reference in New Issue
Block a user