diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt | 16 |
1 files changed, 8 insertions, 8 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 05f8904..6e8ad37 100644 --- a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt +++ b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt | |||
@@ -10,8 +10,8 @@ import android.widget.AdapterView | |||
10 | import android.widget.ArrayAdapter | 10 | import android.widget.ArrayAdapter |
11 | import android.widget.TextView | 11 | import android.widget.TextView |
12 | import kotlinx.android.synthetic.main.base.* | 12 | import kotlinx.android.synthetic.main.base.* |
13 | import kotlinx.android.synthetic.main.fragment_list_view.* | ||
13 | import kotlinx.android.synthetic.main.fragment_network_list_header.* | 14 | import kotlinx.android.synthetic.main.fragment_network_list_header.* |
14 | import kotlinx.android.synthetic.main.page_start.* | ||
15 | import org.pacien.tincapp.R | 15 | import org.pacien.tincapp.R |
16 | import org.pacien.tincapp.context.AppPaths | 16 | import org.pacien.tincapp.context.AppPaths |
17 | import org.pacien.tincapp.extensions.Android.setElements | 17 | import org.pacien.tincapp.extensions.Android.setElements |
@@ -32,12 +32,12 @@ class StartActivity : BaseActivity(), AdapterView.OnItemClickListener, SwipeRefr | |||
32 | networkListAdapter = ArrayAdapter<String>(this, R.layout.fragment_list_item) | 32 | networkListAdapter = ArrayAdapter<String>(this, R.layout.fragment_list_item) |
33 | confChangeObserver = FileObserver(AppPaths.confDir().absolutePath, FileObserver.CHANGE, { _, _ -> onRefresh() }) | 33 | confChangeObserver = FileObserver(AppPaths.confDir().absolutePath, FileObserver.CHANGE, { _, _ -> onRefresh() }) |
34 | 34 | ||
35 | layoutInflater.inflate(R.layout.page_start, main_content) | 35 | layoutInflater.inflate(R.layout.fragment_list_view, main_content) |
36 | network_list_wrapper.setOnRefreshListener(this) | 36 | list_wrapper.setOnRefreshListener(this) |
37 | network_list.addHeaderView(layoutInflater.inflate(R.layout.fragment_network_list_header, network_list, false), null, false) | 37 | list.addHeaderView(layoutInflater.inflate(R.layout.fragment_network_list_header, list, false), null, false) |
38 | network_list.addFooterView(View(this), null, false) | 38 | list.addFooterView(View(this), null, false) |
39 | network_list.adapter = networkListAdapter | 39 | list.adapter = networkListAdapter |
40 | network_list.onItemClickListener = this | 40 | list.onItemClickListener = this |
41 | } | 41 | } |
42 | 42 | ||
43 | override fun onCreateOptionsMenu(m: Menu): Boolean { | 43 | override fun onCreateOptionsMenu(m: Menu): Boolean { |
@@ -72,7 +72,7 @@ class StartActivity : BaseActivity(), AdapterView.OnItemClickListener, SwipeRefr | |||
72 | runOnUiThread { | 72 | runOnUiThread { |
73 | networkListAdapter?.setElements(networks) | 73 | networkListAdapter?.setElements(networks) |
74 | network_list_placeholder.visibility = if (networkListAdapter?.isEmpty ?: true) View.VISIBLE else View.GONE | 74 | network_list_placeholder.visibility = if (networkListAdapter?.isEmpty ?: true) View.VISIBLE else View.GONE |
75 | network_list_wrapper.isRefreshing = false | 75 | list_wrapper.isRefreshing = false |
76 | } | 76 | } |
77 | } | 77 | } |
78 | 78 | ||