All Questions
Tagged with visibility java
451
questions
0
votes
1
answer
61
views
How do I check the visibillitiy of an element in a if-statement?
im trying to check onCancelListener of my timerpicker-dialog the visibility of an radio-button (rdi_1), and want to setChecked(true) if visibility is VISIBLE.
timePickerDialog.setOnCancelListener(new ...
2
votes
2
answers
160
views
why setVisibility in fragment doesn't work?
the ProgressBar doesn't disappear in the fragment also items aren't loaded in the RecyclerView, When the code was in the body of onCreate of the main activity ,it was working
I am making fragment ...
1
vote
4
answers
760
views
How to get invisible button on other button click
I have 2 buttons for display.
The 1st button is Unpressed - that displayed before the user clicks on it and the 2nd button is pressed that displayed after the user clicks on it.
After User click on ...
0
votes
0
answers
57
views
Unable to create instance of class in sub-package
Why I can not create in class KeyboardController instance of Frame like:
Frame frame=new Frame();
It is not recognized by IDEA.
Is it because classes in lower package can not see and work with ...
0
votes
1
answer
57
views
how can I save editText visibility state (View.GONE)?
I have a problem with editText visibility. In the beginning of my code I've set visibility to GONE
editText.setVisibility(View.GONE);
This part is fine, it sets my editText to GONE. However if i ...
2
votes
1
answer
3k
views
IntelliJ: get a warning if I call a method annotated with @VisibleForTesting
I have the following use case:
I want to Unit-test a private method (I really want to).
Now, there are different approaches, but I want to choose the approach "make the method package private".
In ...
0
votes
1
answer
3k
views
Not implementing a method from an abstract class (and making it not accessible)
I was trying to create some Java classes with some shared methods among them and with some other methods only available for some of those classes (and each of those methods are supposed to be ...
0
votes
1
answer
46
views
Why does the visibility of m method change the output in this way? I expected the opposite to occur [duplicate]
Title edit: "my* method" So the root of the problem is the method pmA3. It is present both in class A and in class B. Method lookup would suggest that when pmA3 gets called, it would look for the ...
1
vote
1
answer
160
views
Visibility isn't set immediately in Android Studio
When setting the visibility of an ImageView in Java, only the result is displayed, not the intermediate states of the View. The result is just fine, but between start and end the progress bar isn't ...
0
votes
1
answer
151
views
Create expand animation for default recyclerView (changing view's visibility from gone to visible)
Do i necessairly need to change my recyclerView to expandableRecyclerView for doing animation of expand + animation of arrow drop down -> arrow up? Is there any way to implement simple slide down ...
0
votes
1
answer
663
views
Visibility of a default constructor in Java 11? [duplicate]
What is the visibility of a default constructor in Java11?
This is different from what is the default visibility of a constructor.
0
votes
1
answer
133
views
I am not reducing visibility from interface yet I get the "Cannot reduce visibility" compile error [duplicate]
I am working on a employee management system for training, and I made some interfaces so I can work from there.
As I was working on it, one of my methods gave me a compiler error, saying that I could ...
4
votes
1
answer
2k
views
How to work around that there's no subpackage visibility in Java
When I'm writing a new component with DDD I try to have one single public class in a package with all collaborators of my component package protected.
That usually plays out very nicely, because ...
1
vote
1
answer
301
views
Increase visibility of interface
I have two packages:
1. com.test.hidden:
Contains an protected interface MyListener and a public class FancyClass with a public method for registering MyListener objects:
package com.test.hidden;
...
0
votes
1
answer
62
views
Package-private member visibility in complex inheritance / package combinations - Qiuck General Rule to verify visibility
If Base and Derived classes are in different packages then package-private member from Base shall not be inherited and thus it shall be absent in Derived, that is such member shall be inaccessible ...