From 7549140a6c4f2194d016ab7c4ec66552a939c8c7 Mon Sep 17 00:00:00 2001 From: bohdan-go-wombat Date: Wed, 24 Apr 2024 16:20:43 +0300 Subject: [PATCH] slight change to the metaapp in order to fix the issue with tests for DIA-3574-update-sdk-dep-view-binding --- .../com/sourcepointmeta/metaapp/ui/MainActivity.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/samples/metaapp/src/main/java/com/sourcepointmeta/metaapp/ui/MainActivity.kt b/samples/metaapp/src/main/java/com/sourcepointmeta/metaapp/ui/MainActivity.kt index 8cc8768db..398924536 100644 --- a/samples/metaapp/src/main/java/com/sourcepointmeta/metaapp/ui/MainActivity.kt +++ b/samples/metaapp/src/main/java/com/sourcepointmeta/metaapp/ui/MainActivity.kt @@ -3,16 +3,22 @@ package com.sourcepointmeta.metaapp.ui import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.sourcepointmeta.metaapp.R +import com.sourcepointmeta.metaapp.databinding.MainActivityBinding import com.sourcepointmeta.metaapp.ui.propertylist.PropertyListFragment class MainActivity : AppCompatActivity() { + private lateinit var binding: MainActivityBinding + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setContentView(R.layout.main_activity) + + binding = MainActivityBinding.inflate(layoutInflater) + setContentView(binding.root) + if (savedInstanceState == null) { supportFragmentManager.beginTransaction() - .replace(R.id.container, PropertyListFragment()) + .replace(binding.container.id, PropertyListFragment()) .commitNow() } }