I’m developing a card game, based on higher wins. From my first question here assign int value to image for compare I’ve rewritten my code but now I’m stuck on randomization of cards and assignment to ImageView. I have a class card. In MainActivity: I have array of this cards: Now I need to …
Tag: android
When I open the file ActivityMainBindingImpl.java, there are some errors
I’m writing a program about basketball score. My program can run, but there are compilation errors in ActivityMainBindingImpl.java error1: Cannot inherit from final ‘com.example.score.databinding.ActivityMainBinding’ error2: ‘ActivityMainBinding()’ has private access in ‘co…
Attempt to invoke virtual method ‘void android.widget.ListView.setAdapter(android.widget.ListAdapter)’ on a null object reference :KOTLIN
I am getting this from Logcat 2022-01-07 20:27:46.539 14327-14327/com.example.donedoobnew2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.donedoobnew2, PID: 14327 java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.widget.ListView.setAdapter(android.widget.ListAd…
How can I store data with nested object data in Android? [Room]
I have a high dimensional dataset that it provides with a json structure (about 3000 objects, an array of each object and dozens of objects in that array.) I read them with the help of the volley library. I want to save this data. in the database and access it easily. how can I do it I couldn’t find exa…
How to make sure a player is touching the game piece before allowing them to move it
I am trying to make it so that the game piece (red square) cannot be moved unless the player initially clicks on it, but can then drag it freely until releasing it. Currently, if the player clicks anywhere on the the screen the game piece will move to their cursor/finger when they start moving it. If I try to…
Jetpack compose java.lang.IllegalStateException: Invalid applier
Answer You may be import wrong package from glance. Google provide glance for write appwidget with compose. For example LazyColumn, there are: androidx.glance.appwidget.layout.LazyColumn androidx.compose.foundation.lazy.LazyColumn
Detecting interactions between Canvas objects
In my current prototype I have a fixed grid of rectangles I draw on the canvas in a loop, and a red square “gamePiece” which can be dragged around the screen by a player’s finger (screenshot below). My goal is to make it so that the player square can interact with the grey squares, but IR…
Hide black bar under Samsung keyboard when user types on EditText
How to hide the keyboard black bar on Samsung smartphones when user types in edit text on android. I tried it with android:inputType=”textNoSuggestions|textVisiblePassword”, but it only hides the suggestions. This black bar. Answer You can’t. That’s part of the samsung keyboard. The ke…
com.bumptech.glide.load.engine.GlideException: Failed to load resource in kotlin?
class com.bumptech.glide.load.engine.GlideException: Failed to load resource class com.bumptech.glide.load.engine.GlideException: Failed to load resource in Android 10 only enter image description here I got the error from logcat. I have read the above two articles. I also used the method they introduced. It …
Want to list all the files in a child of firebase storage and share the ArrayList to set it in the recycler view for a android App [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year. Improve this question In my firebase storage i have a child which contains subfolder and on these …