From e62ddd8e5921fd4a7591731d6126c7d06af23a53 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sun, 27 Jan 2019 21:52:09 +0400 Subject: [PATCH] Fixed bug related with crash app (null on error views) --- .../java/ru/volgorobot/vrcatalog/view/MainActivity.java | 3 +++ app/src/main/res/layout/activity_searchable.xml | 8 ++++---- app/src/main/res/layout/content_main.xml | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java b/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java index 2cbde48..1bbe158 100644 --- a/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java +++ b/app/src/main/java/ru/volgorobot/vrcatalog/view/MainActivity.java @@ -68,6 +68,9 @@ public class MainActivity extends AppCompatActivity mSwipeRefreshLayout.setOnRefreshListener(MainActivity.this); mSwipeRefreshLayout.setColorSchemeResources(R.color.colorPrimary); + mErrorTextView = findViewById(R.id.errorTextView); + mConnectionErrorImageView = findViewById(R.id.connectionErrorImageView); + mPresenter = new MainPresenter(this, MainActivity.this); treeView = new TreeView(rootNode, MainActivity.this, new NodeViewFactory(MainActivity.this, this, this.mPresenter.getCoreModel())); diff --git a/app/src/main/res/layout/activity_searchable.xml b/app/src/main/res/layout/activity_searchable.xml index 8afd301..4bdcf45 100644 --- a/app/src/main/res/layout/activity_searchable.xml +++ b/app/src/main/res/layout/activity_searchable.xml @@ -22,20 +22,20 @@ + app:layout_constraintTop_toBottomOf="@+id/searchableConnectionErrorImageView" /> diff --git a/app/src/main/res/layout/content_main.xml b/app/src/main/res/layout/content_main.xml index 98a6740..e3e2877 100644 --- a/app/src/main/res/layout/content_main.xml +++ b/app/src/main/res/layout/content_main.xml @@ -30,20 +30,20 @@ + app:layout_constraintTop_toBottomOf="@+id/connectionErrorImageView" />