Skip to main content

All Questions

Tagged with
0 votes
2 answers
491 views

How to set visibility GONE of a Linear Layout which is inside a scroll view and contains two TextViews inside?

The main layout is a Linear layout inside that a scroll view is there which contain sublayouts. Here is my layout [omitted everything except the specific layout (marked with red) as it will be very ...
s4surajverma's user avatar
0 votes
1 answer
53 views

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 ...
Richard Wilson's user avatar
27 votes
3 answers
949 views

Why is the data array in java.util.ArrayList package-private?

In the java.util.ArrayList class, the object array for the list's elements is defined as package-private: transient Object[] elementData; // non-private to simplify nested class access The comment ...
Andreas Schörgenhumer's user avatar
0 votes
3 answers
222 views

Visibility guarantees of atomic variables

Having read lots about volatile, atomic and visibility, one question remains. Following works across threads, "a" is visible all the time, when "b" is updated/read: int a; volatile ...
lockfreecode's user avatar
0 votes
2 answers
101 views

Creating subText with visible/invisible method across TextViews

I have created two textViews that the first one is the main title and the second one is the subtext of the title. So I want to make the subtexts visibility to depend on clicking the main title. It ...
Cingen's user avatar
  • 59
0 votes
1 answer
911 views

Issue with RecyclerView and GONE visibility

I am having an issue with RecyclerView and the visibility of some views of their CardViews. As you can see in images 1 and 2, I have a CardView with some TextViews in a RelativeLayout and an ...
Emili Bellot's user avatar
1 vote
0 answers
26 views

SharedPreferences always returning true (recycler view)

I'm using sharedpreference to save boolean when clicking on a button, and use it at the start of the activity to set visibilities states. The problem is that it seems to be always returning true, and ...
Hugo Becker's user avatar
0 votes
1 answer
127 views

Unable to change visibility based on sharedpreference inside recyclerAdapter (Viewpager2)

I got a Viewpager2 adapter , with 2 EditText and 2 TextView in it. At the beginning, the EditTexts are visible, and the Textviews are gone. If I click on a button, if what is written inside 1 (or both)...
Hugo Becker's user avatar
-1 votes
1 answer
645 views

how to change visibility a view in a fragment from the activity

As stated in the title how can change visibility a view in a fragment from the activity? My code has a launch activity and a fragment. I want to change the visibility of a view inside fragment from ...
Ali Azimi's user avatar
1 vote
1 answer
653 views

WHY Java doesn't have the concept of Subpackage visibility [duplicate]

Java doesn't have the concept of Subpackage visibility I know that :( Java: Subpackage visibility? so if I have a Class A (package visible) inside the package com.example.foo and another Class B (...
gixlg's user avatar
  • 1,313
2 votes
1 answer
1k views

Java Android Badge Drawable not working properly after configuration change

I have a Bottom Navigation view with a badge drawable that shows new chats. This badges are updated upon a listener to Firebase database, where I store the notification counter. When this value ...
E. Tocchi's user avatar
-2 votes
2 answers
109 views

variable visibility from calling function [duplicate]

I have 2 classes. In one class i have 4 variables. I instantiate another class and use methods which use these variables. I dont want to pass them as parameters. They are set to public. Both classes ...
xxsurajbxx's user avatar
3 votes
1 answer
1k views

How to make Java class invisible outside its module for other non-modular projects?

Recently I've found out that if a package inside a module contains public interfaces or classes they are being exported automatically and hence unintentionally visible outside the module in case when ...
diziaq's user avatar
  • 7,542
1 vote
1 answer
132 views

How to handle ConstraintLayout horizontal & vertical with view.GONE

already use vertical and horizontal chain in constraint for handle visibility gone. But they are not enought for the thing i want to do. I need to set a view like this example: 1 2 3 4 5 6 And, for ...
Lethans's user avatar
  • 11
0 votes
1 answer
806 views

Show/Hide BottomNavigationView for specific fragment

In my android application, I want the bottom menu bar to disappear when the user focuses the SearchView (this also pops the soft keyboard up). When the SearchView loses focus, I want to show the ...
George's user avatar
  • 409

15 30 50 per page
1 2
3
4 5
31