Skip to main content

All Questions

Tagged with
0 votes
1 answer
238 views

'void android.widget.LinearLayout.setVisibility(int)' on a null object reference when i want to display a LinearLayout

I have a problem with a button that modifies the visibility of a LinearLayout I always get the error java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.LinearLayout....
11itachikun's user avatar
0 votes
2 answers
59 views

How to change location of Textview

I have a Linear Layout inside of Constraint Layout. The cardview visibility changes depending on the data. How to align start textview1 and textview2 if cardview visibility is invisible ?
k.kbr's user avatar
  • 45
1 vote
1 answer
169 views

Android: Changing Views visibility on Activity start | Hide Notification panel on Notification Button click

My app has a Notification that holds a Button. When the user clicks the Button, the app should open (if it was closed) and show a custom dialog, which I've created by a bunch of views. Showing the ...
Nitzan Daloomy's user avatar
-1 votes
1 answer
33 views

How to invisible a Linier layout from other activity without using Intent?

I have given here details about my project and I want that when I will click on the Button it will go to the second activity and also it disappears from the second activity layout. Button btnClick; @...
Mhs Shohrawardy's user avatar
1 vote
0 answers
59 views

Android: "Can't resolve method 'setVisibility' in group"

This piece of code fails to compile because the method setVisibility() cannot be resolved. public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { super.onViewCreated(view, ...
Mayur Chauhan's user avatar
0 votes
2 answers
106 views

How can i eliminate Empty spaces in recyclerView when trying to hide cards with null properties?

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 ...
Leo Rodenas's user avatar
0 votes
2 answers
919 views

How to change visibility of textview on button click without providing ID to them?

In this I need to know that how do I access a view without providing the Id to them in this there will be no id provided in any of the file. Without the use of external libraries like viewbinding, ...
Khush Pajwani's user avatar
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
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
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
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
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
7