Мой findViewById не работает. это не связывает...
////мой фрагмент.contacts.xml
*<?xml version = "1.0" encoding = "utf-8"?>
<LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:app = "http://schemas.android.com/apk/res-auto"
xmlns:tools = "http://schemas.android.com/tools"
android:layout_width = "match_parent"
android:layout_height = "match_parent"
android:orientation = "vertical"
tools:context = ".MainActivity">
<EditText
android:id = "@+id/txtShowOnMap"
android:layout_width = "match_parent"
android:layout_height = "wrap_content"
android:layout_marginStart = "8dp"
android:layout_marginTop = "8dp"
android:layout_marginEnd = "8dp"
android:contentDescription = "@string/locationonmap"
android:importantForAutofill = "no"
android:inputType = "text"
android:labelFor = "@id/btnShowOnMap"
android:minHeight = "48dp"
android:text = "@string/store_location" />
<Button
android:id = "@+id/btnShowOnMap"
android:layout_width = "395dp"
android:layout_height = "wrap_content"
android:layout_marginStart = "8dp"
android:layout_marginEnd = "8dp"
android:text = "@string/map" />
</LinearLayout>*
////конец fragmentcontacts.xml
мои контактыfragment.kt





Пожалуйста, сделайте это view.findViewById Для фрагмента вам нужно добавить rootview.