aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt2
-rw-r--r--app/src/main/res/layout/fragment_network_list_empty_placeholder.xml5
-rw-r--r--app/src/main/res/layout/page_start.xml32
3 files changed, 27 insertions, 12 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
index 21f5199..c438be0 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
@@ -40,7 +40,7 @@ class StartActivity : BaseActivity(), AdapterView.OnItemClickListener {
40 private fun writeContent() { 40 private fun writeContent() {
41 network_list.addHeaderView(layoutInflater.inflate(R.layout.fragment_network_list_header, network_list, false), null, false) 41 network_list.addHeaderView(layoutInflater.inflate(R.layout.fragment_network_list_header, network_list, false), null, false)
42 network_list.addFooterView(View(this), null, false) 42 network_list.addFooterView(View(this), null, false)
43 network_list.emptyView = layoutInflater.inflate(R.layout.fragment_network_list_empty_placeholder, network_list, false) 43 network_list.emptyView = network_list_empty
44 network_list.adapter = ArrayAdapter<String>(this, R.layout.fragment_list_item, AppPaths.confDir().list()) 44 network_list.adapter = ArrayAdapter<String>(this, R.layout.fragment_list_item, AppPaths.confDir().list())
45 network_list.onItemClickListener = this 45 network_list.onItemClickListener = this
46 } 46 }
diff --git a/app/src/main/res/layout/fragment_network_list_empty_placeholder.xml b/app/src/main/res/layout/fragment_network_list_empty_placeholder.xml
deleted file mode 100644
index 169942f..0000000
--- a/app/src/main/res/layout/fragment_network_list_empty_placeholder.xml
+++ /dev/null
@@ -1,5 +0,0 @@
1<TextView
2 xmlns:android="http://schemas.android.com/apk/res/android"
3 android:id="@+id/network_list_empty"
4 style="@style/AppTheme.ListBlock.Placeholder"
5 android:text="@string/message_no_network_configuration_found"/>
diff --git a/app/src/main/res/layout/page_start.xml b/app/src/main/res/layout/page_start.xml
index fec55de..0eaf7b0 100644
--- a/app/src/main/res/layout/page_start.xml
+++ b/app/src/main/res/layout/page_start.xml
@@ -1,13 +1,33 @@
1<ListView 1<LinearLayout
2 xmlns:android="http://schemas.android.com/apk/res/android" 2 xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools" 3 xmlns:tools="http://schemas.android.com/tools"
4 android:id="@+id/network_list"
5 android:layout_width="match_parent" 4 android:layout_width="match_parent"
6 android:layout_height="match_parent" 5 android:layout_height="match_parent"
7 android:divider="@drawable/horizontal_line"
8 android:footerDividersEnabled="false"
9 android:headerDividersEnabled="false"
10 android:orientation="vertical" 6 android:orientation="vertical"
11 tools:context="org.pacien.tincapp.activities.StartActivity"> 7 tools:context="org.pacien.tincapp.activities.StartActivity">
12 8
13</ListView> 9 <ListView
10 android:id="@+id/network_list"
11 android:layout_width="match_parent"
12 android:layout_height="match_parent"
13 android:divider="@drawable/horizontal_line"
14 android:footerDividersEnabled="false"
15 android:headerDividersEnabled="false"/>
16
17 <LinearLayout
18 android:id="@+id/network_list_empty"
19 android:layout_width="match_parent"
20 android:layout_height="wrap_content"
21 android:orientation="vertical">
22
23 <TextView
24 style="@style/AppTheme.SectionTitle"
25 android:text="@string/title_connect_to_network"/>
26
27 <TextView
28 style="@style/AppTheme.ListBlock.Placeholder"
29 android:text="@string/message_no_network_configuration_found"/>
30
31 </LinearLayout>
32
33</LinearLayout>