gui: Add display of forwarder status

Change-Id: I6748bea615ea2f56d9b222ce34e12e449cec7f9d
diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml
index 9fa4afa..7a8c93a 100644
--- a/app/src/main/res/layout/fragment_main.xml
+++ b/app/src/main/res/layout/fragment_main.xml
@@ -1,17 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
+<ScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    style="@style/default_linear_layout_padding"
-    >
+    android:layout_height="wrap_content">
+
+  <LinearLayout
+      style="@style/default_linear_layout_padding"
+      android:layout_width="match_parent"
+      android:layout_height="match_parent"
+      android:orientation="vertical"
+      >
 
     <TextView
+        style="?android:listSeparatorTextViewStyle"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:text="@string/pref_category_title_general"
-        style="?android:listSeparatorTextViewStyle"
         />
 
     <Switch
@@ -22,4 +26,106 @@
         android:text="@string/checking_on_nfd"
         />
 
-</LinearLayout>
\ No newline at end of file
+    <LinearLayout android:id="@+id/status_view"
+                  android:layout_width="match_parent"
+                  android:layout_height="wrap_content"
+                  android:orientation="vertical"
+                  android:visibility="gone">
+
+      <TextView style="?android:listSeparatorTextViewStyle"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/pref_category_title_status"
+                />
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/version" />
+
+        <TextView android:id="@+id/version"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/uptime" />
+
+        <TextView android:id="@+id/uptime"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/name_tree_entries" />
+
+        <TextView android:id="@+id/name_tree_entries"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/fib_entries" />
+
+        <TextView android:id="@+id/fib_entries"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/pit_entries" />
+
+        <TextView android:id="@+id/pit_entries"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/measurement_entries" />
+
+        <TextView android:id="@+id/measurement_entries"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/cs_entries" />
+
+        <TextView android:id="@+id/cs_entries"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/in_interests" />
+
+        <TextView android:id="@+id/in_interests"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/out_interests" />
+
+        <TextView android:id="@+id/out_interests"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/in_data" />
+
+        <TextView android:id="@+id/in_data"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+      <LinearLayout style="@style/main_fragment_linear_layout">
+        <TextView style="@style/main_fragment_list_title"
+                  android:text="@string/out_data" />
+
+        <TextView android:id="@+id/out_data"
+                  style="@style/main_fragment_list_value" />
+      </LinearLayout>
+
+    </LinearLayout>
+  </LinearLayout>
+</ScrollView>
diff --git a/app/src/main/res/layout/status_item.xml b/app/src/main/res/layout/status_item.xml
new file mode 100644
index 0000000..549de06
--- /dev/null
+++ b/app/src/main/res/layout/status_item.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/main_fragment_linear_layout">
+    <TextView style="@style/main_fragment_list_title"
+              android:id="@+id/title" />
+
+    <TextView style="@style/main_fragment_list_value"
+              android:id="@+id/value" />
+</LinearLayout>
diff --git a/app/src/main/res/values/strings_main_activity.xml b/app/src/main/res/values/strings_main_activity.xml
index 9a41a2f..8b67095 100644
--- a/app/src/main/res/values/strings_main_activity.xml
+++ b/app/src/main/res/values/strings_main_activity.xml
@@ -1,7 +1,19 @@
 <resources>
     <!-- General -->
     <string name="pref_category_title_general">General</string>
-    <string name="pref_category_title_general_key">General_Key</string>
+    <string name="pref_category_title_status">NFD Status</string>
+
+    <string name="version">Version</string>
+    <string name="uptime">Uptime</string>
+    <string name="name_tree_entries">NameTree entries</string>
+    <string name="fib_entries">FIB entries</string>
+    <string name="pit_entries">PIT Entries</string>
+    <string name="measurement_entries">Measurement entries</string>
+    <string name="cs_entries">CS entries</string>
+    <string name="in_interests">In interests</string>
+    <string name="out_interests">Out interests</string>
+    <string name="in_data">In data</string>
+    <string name="out_data">Out data</string>
 
     <string-array name="pref_sync_face_titles">
         <item>localhost</item>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 08a8a5c..f851cec 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -58,4 +58,25 @@
         <item name="android:layout_gravity">right</item>
     </style>
 
+    <style name="main_fragment_linear_layout">
+        <item name="android:orientation">horizontal</item>
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+    </style>
+
+    <style name="main_fragment_list_title">
+        <item name="android:layout_width">wrap_content</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:textColor">@android:color/primary_text_light</item>
+    </style>
+
+    <style name="main_fragment_list_value">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
+        <item name="android:gravity">right</item>
+        <item name="android:textColor">@android:color/secondary_text_dark</item>
+        <item name="android:layout_gravity">right</item>
+    </style>
 </resources>