Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

In my layout i display a stream widget (the WidgetFPV one) which contains a surface onto which a camera stream is projected via DJI'S MSDK5 sdk. I also have a card mapCard which hosts a MapBox map ...
Stelios Papamichail's user avatar
0 votes
0 answers
95 views

Question: I’m developing an Android app using Jetpack Compose and Fragments. I’m experiencing an issue where the view inside a Fragment is not visible when the app returns from the background under ...
임세현's user avatar
1 vote
1 answer
67 views

I am new in Android development and can not fully understand this template for ViewBinding using abstract class. More precisely, I don’t understand why we prode inflater argument into bindingInflater ...
NikshA36's user avatar
0 votes
1 answer
65 views

In one project I was working, has 2 layouts for a custom view. For 220 screenWidthDp has different layout. View ids are same in both layouts. Currently layouts are loaded like this Configuration ...
Abu Yousuf's user avatar
  • 6,172
2 votes
1 answer
144 views

I'm working on an Android project using data binding, and I've encountered a warning in the SpotBugs violation report that I'm not sure how to address. Here's the setup: <?xml version="1.0&...
Ahsan Murtaza's user avatar
1 vote
1 answer
2k views

When I use codes generated by android studio automatically and ViewBinding together, the programme will crash. ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets -> ...
Weird_dog's user avatar
3 votes
2 answers
83 views

I'm migrating from kotlinx.android.synthetic to ViewBindings. I have two layouts(for phones and tablets) with the same set of ids: class GameActivity: AppCompatActivity() { lateinit var binding: ...
undefined's user avatar
  • 685
0 votes
1 answer
59 views

I'm working on an Android Studio activity in which I have to calculate area and perimeter. I used intent to pass and access variables that will be used in another activity where the computations will ...
EJ Lin's user avatar
  • 11
0 votes
0 answers
61 views

I'm working on an activity in android studio in which I need to compute area and perimeter. I used intent and view Binding to access and pass the value of the user input in the edit Text to another ...
EJ Lin's user avatar
  • 11
0 votes
1 answer
854 views

I am working on a project in Android Studio when I ran into an issue where it kept crashing when I attempted to run it on a real device. It worked perfectly fine at first, however as I used ...
EJ Lin's user avatar
  • 11
0 votes
1 answer
157 views

I have around 15 fragments that mostly use the same code, I also have created a BaseFragment for ViewBinding that works, so that I don't need to write that part every time. However there are other ...
Jesús Santoyo's user avatar
0 votes
1 answer
45 views

enter image description here When I try genarate view binding for kotlin, its giving red line on inflate and I cannot run project. package com.example.wiewbinding import androidx.appcompat.app....
Maelstrom's user avatar
0 votes
2 answers
88 views

I am creating a weather app in which the recycler view is suppose to show today's forecast but is not showing anything. I am also not getting any kind of error in my code. I have tried everything I ...
Harsh Shrimali's user avatar
0 votes
2 answers
308 views

I've tried many tutorials and solutions on internet but couldn't make mine work. Basically I want a layout like this to work as 7 RadioButtons: I have my CustomRadioButton class that I want it to ...
vr4u's user avatar
  • 61
1 vote
1 answer
83 views

I have an issue with ViewBinding in a Fragment for an EditText line in the Activity. The Fragment launches a dialog to ask a user if they want to clear the EditText line. The EditText line is set up ...
AJW's user avatar
  • 1,587
-1 votes
1 answer
332 views

I am updating an app. In the new program, I intend to use View Binding because butterknife library does not work. My codes are as follows. How do I use the new method? The previous code uses the ...
Ali Hosein pour's user avatar
0 votes
1 answer
56 views

I want to change text of TextView which is in inner ConstraintLayout. When I try binding.lyricViewTitle.text = it.title, binding.lyricViewTitle text is changed(I check with Debug), but lyricViewTitle ...
4rigener's user avatar
  • 386
0 votes
1 answer
52 views

I used multiple include tags in a xml layout like this: <include android:id="@+id/firstView" layout="@layout/layout_edit_text" android:layout_width="...
SadeQ digitALLife's user avatar
5 votes
2 answers
664 views

After enabling viewbinding using: android { ... buildFeatures { viewBinding = true } } We can use ViewBinding, the problem is that we need to use binding. prefix before accesing ...
slaviboy's user avatar
  • 1,962
1 vote
0 answers
36 views

My project is not finding the reference to the 1st monster01. binding.monster01.setOnClickListener { viewMonsterImage(R.drawable.monster01) } Here is the whole section: class MainActivity : ...
jefferymason's user avatar
2 votes
0 answers
553 views

I am loading a fragment inside Jetpack Compose AndroidViewBinding as shown below, val fragmentManager = (LocalContext.current as? FragmentActivity)?.supportFragmentManager AndroidViewBinding( ...
hasan_shaikh's user avatar
  • 1,500
1 vote
0 answers
39 views

This question could be applied to many other cases. In a android fragment class implemented with Kotlin, it's common to see this using View Binding and SafeArgs: class MyFragment: Fragment(){ var ...
mcventur's user avatar
0 votes
1 answer
513 views

i have twenty different activities with the same MaterialTextView (same name in all activities) in all activities (in the onCreate event), i initialize the textview with the same text: textview.text = ...
seba123neo's user avatar
  • 4,768
0 votes
1 answer
96 views

I am new to view binding. If I use findViewById and pass the data string data using intent's putExtra, everything is working fine. But it is not working with view Binding. class MainActivity : ...
Puneet Chhabra's user avatar
0 votes
1 answer
99 views

In my application I used ViewBinding for access to views and for this I create Base Fragment and write below codes. In onDestroy method I want null the views but show me error. My BaseFragment codes:...
Jojo Drink's user avatar
0 votes
1 answer
107 views

My app has two fragments: HomeFragment and StatusFragment. HomeFragment binds some connection info to the UI. Info is obtained from broadcast receiver. At the beginning, data binding works in ...
Reza Asadian's user avatar
0 votes
1 answer
40 views

I have base activity implementing some features for every screen of my app. Every child activity then overrides method with its XML layout. BaseActivity @Override protected void onCreate(Bundle ...
Sk1X1's user avatar
  • 1,381
0 votes
2 answers
89 views

I'm having to migrate to ViewBinding in my Android app to comply with the latest target versions. I'm really struggling to get a dialog box created using CardView to display correctly. The below is ...
Gadget-Man's user avatar
-1 votes
1 answer
47 views

I make an app which use API and should show some basic data (exchange rates) on the screen. But elements of recyclerView doesn't appear on the screen. I can see only textview. Trying to find a problem ...
Dmytro's user avatar
  • 3
0 votes
0 answers
71 views

I have a fragment that uses viewbinding through eventhandlers. The eventhandlers are setup and taken down in onResume() and onPause(). In rare cases accessing the view through events results in a ...
mrbang's user avatar
  • 366
1 vote
1 answer
2k views

I'm stucked like 5 days in this problem! I'm unable to bind the view using viewBinding clause in Android Studio, I believe the problem is in "build.gradle" file. Initially, I tried to build ...
Danilo Volles's user avatar
0 votes
2 answers
1k views

I have: MainActivity MainFragment MainViewModel SecondActivity ThirdActivity I have a button in fragment_main.xml. I can easily pass it android:onClick="navigate" and have the function ...
Zeek Aran's user avatar
  • 686
0 votes
1 answer
21 views

Following the exact documentation but can't figure out why it's not working... https://developer.android.com/topic/libraries/view-binding The class is never generated for my MainActivity activity_main....
WHOATEMYNOODLES's user avatar
1 vote
1 answer
228 views

I've overrided addView(child: View?) in my custom view and inflating layout causes NullPointerException. My code: TestView.kt package com.example.testandroid import android.content.Context import ...
coreorb's user avatar
  • 11
0 votes
0 answers
21 views

I have three different blocks in my application. I'm trying to make a data binding. Right now, I'm trying to figure out how to bind at least two layouts together. This is part of my layout that I have ...
Red_button's user avatar
0 votes
0 answers
53 views

I have to implement custom button looks like next picture and this, button.xml (layout resource) <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget....
Tmdhoon2's user avatar
0 votes
1 answer
93 views

i am trying to make a map based app where i used a floating bar action button to change through one window to another i wanted another back button so i used toolbar which i mentioned in my xml ...
Abhay tiwari's user avatar
0 votes
1 answer
44 views

I have a multi module application. In the module ui I have the item I want to show in the RecyclerView, in the module checkout there is the fragment that contains the RecyclerView. CheckoutFragment ...
giordy16's user avatar
  • 383
1 vote
1 answer
975 views

I have a navhostfragment inside an AndroidViewBinding in a Composable function. However, when I press the back button on the phone, the app closes. How can I avoid this and just go up in the ...
Sukitha Udugamasooriya's user avatar
0 votes
2 answers
1k views

I Created a Custom Toolbar and placed it in activity, but I got this error : java.lang.IllegalStateException: Activity com.example.citiesdistance.feature.main.MainActivity@3a04806 does not have an ...
Nima Khalili's user avatar
0 votes
1 answer
126 views

Wanting to switch to version 8.0 of AGP for my Android project I had to refactor a lot of java classes where the developer before me used ButterKnife to bind variables to layout elements. The last ...
Lubron's user avatar
  • 89
0 votes
1 answer
177 views

I renamed a class, then gradled the ability to enable viewBinding. When I import the class, it doesn't find the renamed class, but the one with the old class name. Can you give me a hand? ...
Paul's user avatar
  • 4,618
1 vote
1 answer
126 views

I'm using M3 TextField with XML data binding. I want to send input to ViewModel and if is valid, text field's text should equal to this input, else should no change on TextField's text. Here is XML ...
Mustafa Tatarhan's user avatar
0 votes
1 answer
102 views

I have a RecyclerView that shows a list with livedata. RecyclerView adapter is prepared with viewBinding. My problem is that the RecyclerView does not show the items, but when I scroll the ...
Nima Khalili's user avatar
0 votes
1 answer
313 views

I'm new to Android development, so I just got the hang of Gradle and just ran my app for the first time. However, I have no idea why it keeps crashing because I don't really know how to read the error ...
TimatoPaste's user avatar
0 votes
3 answers
2k views

I am trying to implement an form screen with many EditTexts, Switches, etc. I have a fragment with viewBinding and viewModel that holds a StateFlow "formData". Every field in UI have its own ...
Baterka's user avatar
  • 3,812
0 votes
0 answers
2k views

I have a problem with using the feature 'viewBinding' - at first look everything seems to work, however when I took a closer look on my build.gradle file I could see that in fact buildFeatures { ...
boojoom's user avatar
2 votes
1 answer
2k views

Since Kotlin 1.8 made view binding compulsory so I implemented it in main activity and fragment. But I am getting error inflating the class fragment Here is the main activity class. I think there is ...
Arpit Gupta's user avatar
0 votes
2 answers
250 views

I need to finish() the Activity that the RecyclerView is in when an item/row is tapped. I looked this up but most of the answers referred to the old way of doing things when using context and (context ...
Lance Samaria's user avatar
0 votes
1 answer
52 views

I have a layout with view pager and tabs layout. Viewpager contains two layouts for fragments fragmentpage1 and fragmentpage2. In fragmentpage1.xml i have an imageview who's id is "myimgbtn&...
Issasafar's user avatar

1
2 3 4 5
10