Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
240 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
1 answer
84 views

android Xml layout, visibility gone resize my parent layout

i have an issue with my xml layout i have a switch which is supposed to hide / activate the visibility of one my layout but when i hide my layout, somehow my root layout width is modified here is my ...
vincent mazyad's user avatar
0 votes
1 answer
464 views

Make visible single View in RelativeLayout

I have a RelativeLayout which contains a LinearLayout containing 2 buttons. I would like to make those buttons visible without making the whole RelativeLayout or LinearLayout visible. While debugging, ...
Coleen's user avatar
  • 124
1 vote
1 answer
551 views

Stack in Hiding and unhiding layout in Android Studio

I'm struggling with my app. It should work like the following. Every time I click the button it will hide the layout with an id of pic1 and if its already hidden it will unhide when I click the ...
Gabriel Mamites's user avatar
34 votes
3 answers
27k views

toggle visibility of chain group in constraint layout

In previous xml layout, I have multiple view groups with few elements inside. Hide each view group will also hide all of its child elements. Since I wanted to have flat structure and tried ...
Tixeon's user avatar
  • 930
-1 votes
2 answers
70 views

Button wont turn visible when clicking

I have a button i would like to make visible and invisible on every click of an image view. I have tried setting Invisible/Visible but it won't work. this is my code: public class ...
Liraz Shaka Amir's user avatar
3 votes
2 answers
16k views

Android setVisibility(View.Visible) not working on a layout

I have a layout that I am trying to make visible and it is currently not working. The layout I want to make visible has the id "goal_reminder" below. The visibility is set to "GONE" in the xml. Here ...
Tabernaster's user avatar
0 votes
1 answer
430 views

TextView is not visible in Android 5.1.1

I have following xml: <RelativeLayout android:id="@+id/exerciseNameLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:alpha="1" android:...
Ramdeep Singh's user avatar
1 vote
3 answers
3k views

Android set visibility not working

I have a TextView and an Image within my LinearLayout if a phone value gets passed through to the activity through an intent, then I set the visibility of the layout that contains the text and image ...
Rafa's user avatar
  • 3,319
4 votes
1 answer
2k views

What is visibility in XML? dimen, string, etc (Android)

I want to have different visibility for each version (JB, KK and L). Then, I have some attr.xml files for each version, before I was using dimen value to set its height to 0 or X dpi, but now I need ...
JavierSegoviaCordoba's user avatar
0 votes
2 answers
51 views

Reconstructing Layout for Newly Visible Components

if(v.getId()==keyboard.getId()) { //DisplayMetrics displaymetrics = new DisplayMetrics(); //getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); ...
jonathan lam's user avatar
1 vote
1 answer
710 views

ANDROID (Java) - Progress bar visibility on page finished loading not working?

The progress bar and webview works fine but when the page is finished loading the progress bar still remains? When I have loaded the page the progress bar visibility doesn't dissapear/change to GONE? ...
Hoërskool Eldoraigne's user avatar
1 vote
1 answer
388 views

Set visibility via bindings - dimens.xml

Is it possible to set the visibility via bindings? (dimens.xml) <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="...
Informatic0re's user avatar
0 votes
2 answers
131 views

How to handle the hiding from LinearLayouts?

I have a LinearLayout in a ListView and when I click a Button i want to show or hide anything in the LinearLayout. row = inflater.inflate(R.layout.info_top_rows_layout, parent, false); ...
H.Protagonist's user avatar
10 votes
4 answers
13k views

android:visibility attribute in preferences xml not working? (Android 2.3)

Take for example this small preference.xml file: <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen android:title="@string/sig_title" xmlns:android="http://schemas.android.com/apk/res/...
BlooregardQKazoo's user avatar

15 30 50 per page