Empty spaces in recyclerView when trying to hide cards with null properties Hi, i’m new here. So this is my first question. I am trying to use the google Books API for a task and when I implement everything, I see many books without image, title or author, that for obvious reasons I do not want them to appear in
Tag: visibility
Intellij cannot resolve method even though it is public (Java)
I have googled this a lot, invalidated the cache, and I can’t seem to find an answer. For background, this is a timetabling system using constraint solving. I have a custom class called Period with public methods getStart() and getEnd(). I also have an abstract class Constraint<V, D> and a subclass DemAvailConstratint<Demonstrator, Period>. It is in this subclass (and similarly
Make display data textviews invisible until a city is searched
I set my textviews on my weather app to display the data for cities when searched on my search panel (i.e temp_out.setText(response.body().getMain().getTemp() + ” ℃”););. It works quite fine only that the textviews used to display those data still reflect on the app(i.e temp_out). I want to set it up in such a way that the textviews will be invisible
JMM guarantees about final as field and non final reference to the object
I try to understand final fields semantic. Lets research code: public class App { final int[] data; static App instance; public App() { this.data = new int[]{1, 0}; …
Method scope inside Java switch statement
In a rather loose way this question follows on from my previous one. The context here is building Android APKs with Phonegap CLI configured, via build-extras.gradle to use Java 7. Here is my code I am having some difficulty understanding two issues here As far as I can tell even without that last return I have defined a clear path
Android – RecyclerView with one layout, multiple setVisibility
I have a basically all in one layout which has everything needed for my app’s main feed. All variable items (images, video thumbnails.. Etc.) are set to GONE at first and set to VISIBLE when it is needed. The problem is sometimes, might be due to RecyclerView’s recycling behavior, the item which is supposedto be GONE is VISIBLE in the
What happens between setVisible() and a component being painted?
I have a JScrollPane that contains a JPanel which then contains some custom components which are an extension of JPanel (they are all the same type). This JScrollPane is set invisible before the containing JFrame is shown. When the user selects a JCheckBox I use setVisible() to show the scroll pane. The first time the pane is shown however there
Why can attributes in Java be public?
As everybody knows, Java follows the paradigms of object orientation, where data encapsulation says, that fields (attributes) of an object should be hidden for the outer world and only accessed via methods or that methods are the only interface of the class for the outer world. So why is it possible to declare a field in Java as public, which