Skip to content

Tag: android

Why my gif only loads if i click in the ImageView?

The problem that i’m having is that the gif only loads if i click in the image. I made a ViewHolderCreator class that builds the view. There is a method onCreateViewHolder that will tell which type it is.There are various types. This is the list in the class: The specific gif that i want is CI_IMAGE and…

i cant update value in SQLite

I have this table to sqlite: And this is my method to Update value: And i add a object variable in my activity: So, in activity I use this to change value using update method: But this not works because when I press the button: Class: Nothing happens because the value is (1) one all the time. What’s wro…

Program directly goes to else statement

When enter input and check for the result it only show the function from else. How can i fix it. it skips if and else if and directly goes to else statement. Here is my code Answer I think you have to change your code to the following: Edit: (please correct me if im wrong) As you can see in

How to detect phone system is dark theme or light theme?

Here is the code for the detect dark/light theme when we using the application. How do I detect the dark/light theme when we start an application? Answer I just found it Maybe this can help you OR you can go in this link Android – How to detect if night mode is on when using AppCompatDelegate.MODE_NIGHT…

Define text color based on value using AsyncTask

So basically my AsyncTask get the value from the url and when i execute i wanna show green text or red text if contains (“-“). I have search around and none of the option worked for me. i do have a RecyclerView.ViewHolder but don’t know how to incorporate before i execute. Everything works, …