diff --git a/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/DataSetTableActivity.kt b/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/DataSetTableActivity.kt index b16f784076..07870ed8a1 100644 --- a/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/DataSetTableActivity.kt +++ b/app/src/main/java/org/dhis2/usescases/datasets/dataSetTable/DataSetTableActivity.kt @@ -184,9 +184,8 @@ class DataSetTableActivity : ActivityGlobalAbstract(), DataSetTableContract.View } }) .onNoConnectionListener { - val contextView = findViewById(R.id.navigationBar) Snackbar.make( - contextView, + binding.root, R.string.sync_offline_check_connection, Snackbar.LENGTH_SHORT, ).show() diff --git a/app/src/main/java/org/dhis2/usescases/programEventDetail/ProgramEventDetailActivity.kt b/app/src/main/java/org/dhis2/usescases/programEventDetail/ProgramEventDetailActivity.kt index 642fbe283d..3fac0ea471 100644 --- a/app/src/main/java/org/dhis2/usescases/programEventDetail/ProgramEventDetailActivity.kt +++ b/app/src/main/java/org/dhis2/usescases/programEventDetail/ProgramEventDetailActivity.kt @@ -273,9 +273,8 @@ class ProgramEventDetailActivity : } }) .onNoConnectionListener { - val contextView = findViewById(R.id.navigationBar) Snackbar.make( - contextView, + binding.root, R.string.sync_offline_check_connection, Snackbar.LENGTH_SHORT, ).show() @@ -524,9 +523,8 @@ class ProgramEventDetailActivity : } }) .onNoConnectionListener { - val contextView = findViewById(R.id.rootView) Snackbar.make( - contextView, + binding.root, R.string.sync_offline_check_connection, Snackbar.LENGTH_SHORT, ).show()