service: Logging of console output to UI
Change-Id: I89fb0c0672581c1723a2216e63d7fd2be0e2f6e1
Refs: #2434
diff --git a/app/src/main/res/layout/activity_log.xml b/app/src/main/res/layout/activity_log.xml
new file mode 100644
index 0000000..93f58f0
--- /dev/null
+++ b/app/src/main/res/layout/activity_log.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ListView
+ android:id="@+id/log_output"
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="0dp">
+ </ListView>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index cb17103..ee8e9b5 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
- android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
- android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ tools:context=".MainActivity">
<Button
android:id="@+id/nfd_button"
@@ -12,6 +15,14 @@
android:layout_height="wrap_content"
android:onClick="toggleNfdState"
android:enabled="false"
- android:text="Checking on NFD Service ..." />
+ android:text="@string/checking_on_nfd" />
+
+ <Button
+ android:id="@+id/launch_logger"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/nfd_button"
+ android:onClick="launchLogActivity"
+ android:text="@string/launch_logger" />
</RelativeLayout>
diff --git a/app/src/main/res/layout/log_item.xml b/app/src/main/res/layout/log_item.xml
new file mode 100644
index 0000000..6b0b6e1
--- /dev/null
+++ b/app/src/main/res/layout/log_item.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:id="@+id/log_line"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+
+</LinearLayout>
\ No newline at end of file