Skip to content
Advertisement

Tag: android

Null pointer Exception in Android when using Glide

Here is the logcat output From my logcat the exception occurs when using Glide to load image. Line 100 is .into(uImage) Answer As far as I understand, you’re initializing the Views of BottomSheet wrong. If I’m not wrong, you’re trying to show this BottomSheet inside an Activity, if yes, try the below code:

Socket won’t send data after blocking queue .take()

Edit: I’ve found the problem ( see answer below ) I’m trying to write an Android application to send data to a running termux instance via TCP. In termux, I have netcat listening for incoming TCP connections and printing data to stdout using the command nc -l localhost 8080. In my android app, I have a thread that reads in

recyclerViewAdapter.getItemCount() returning 0 even when it has objects inside?

I’m building a Fragment with a RecyclerView which displays notices retrieved from my database. Everything works fine, except for this line of code: Problem: recyclerViewAdapter.getItemCount() This statement returns 0 even if the RecyclerViewAdapter has elements present. The full scenario is whenever the fragment loads, the Toast with the appropriate message pops up, but then after a slight delay, the first

When i retrive children from firebase using recylceview TextView Won’t Show

I’m using Android Studio when I run my app and add or show RecycleView list, text view shows only the title not data inside firebase this is the textviewaddCateogryclass What would be causing this? used the same data on firebase child. firebase realtime database Firebase ModelCategoryClass AdapterCategoryClass CategoryAddActivity class Answer The following lines of code: Should be changed to: Meaning

I can’t store values in the database DAO android

Hi I can’t store values in the database DAO android. I have User.class: DAO database: My Dtababase class is: My code Now my code don’t store new User(i can’t print “ok you are pretty”).Why? I have another question: i know that when you store data in the database you use threads but what do threads allow you to do? Answer

Advertisement