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

All Questions

0 votes
1 answer
223 views

Using RemoteViews to set Visibility of widget button

I've got a widget with one button which I want to display as either Green, Amber or Red - I need to be able to change from one to another programmatically after the widget is loaded. I have tried a ...
Marshal Anderson's user avatar
1 vote
4 answers
761 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 ...
Michael's user avatar
  • 429
0 votes
2 answers
506 views

TableLayout Visibility GONE working only on second click on button

I have a problem with a TableLayout. I'm trying to hide all its content when I click on a "Clear" button. However, it works only when I click twice on the button. I also have two radio buttons that ...
Maxouille's user avatar
  • 2,831
1 vote
2 answers
60 views

How can i make my button become visible with TextChanger?

I made a button invisble in xml, I want to make button visible again when a certain string value in my EditText is made. I have used TextWatcher check when the value is met using an if statement. ...
RadiactiveDuck's user avatar
1 vote
3 answers
47 views

JavaScript Function Activation Issues

I have another question that's been bugging my mind since I started using js fairly recently so that my app would be nicely responsive but I've been hit with another block here. As the title says I ...
Arkonsol's user avatar
  • 139
0 votes
1 answer
27 views

Button is not getting displayed after the ViewPager tag

I am creating a gallery and in this I am using a ViewPager tag to create a gallery. Just down to it I want to create a button of "Back" whose actions I am specifying in the "onclick" function. My ...
shikher.mishra's user avatar
2 votes
3 answers
155 views

Change button alignment of buttonA when buttonB is GONE

I have placed two buttons prev and next in a RelativeLayout. When I reach the last page of my app, I am disabling the next button using : next.setVisibility(View.GONE); The alignment of prev button ...
Vamshidhar R's user avatar
1 vote
1 answer
75 views

Android: On Click gradual visibility change

I have got a little problem which is for me impossible to solve. I've got lots of TableRows called Radek_X and they are set to be android:visibility="gone". And I need that if you for the first time, ...
J Sol's user avatar
  • 67
0 votes
4 answers
2k views

How do I change button visibility from other class?

So basically I have a button in my MainActivity Button button1 = (Button)findViewById(R.id.button1); button1.setVisibility(View.GONE); What is the way to change my button visibility from my ...
Sadboy's user avatar
  • 3
0 votes
1 answer
931 views

Android change Button visibility after do onClick

If I call method in onClick() one time it works, but if I call it twice time in the onClick() method it doesn't work. private void changeVisible() { if(progressBar.getVisibility() == View....
SBrx's user avatar
  • 1
0 votes
1 answer
38 views

Having trouble with regaining button visibility

I have a couple of buttons that I set to visible and gone on a button click, but when I try to call the state of the button in onResume, it is crashing. What am i doing wrong in my code? Any help ...
Android Newbie's user avatar
0 votes
2 answers
159 views

How do I show a button within my thread here? java android

I've been trying to make a button visible when the counter == 7 but it just keeps crashing whenever I add a method showButton(). This is the method that makes the button visible: public void ...
eanewt's user avatar
  • 1
4 votes
1 answer
60 views

A button with comment having already clicked will not show up the next time user opens app

I want that a button with comment having already clicked will not show up the next time user opens app. I searched on google and understood that I should use shared preferences but I don't know how to ...
Mir Hussain's user avatar
-1 votes
3 answers
362 views

Android: To set a button invisible

On double tap, buttons to be toggled visible/invisible. I created my layout dynamically. Its working if the btns are initially visible but I want them initially invisible. My DoubleTap fn is public ...
Sri's user avatar
  • 85
2 votes
2 answers
3k views

Visibility of Gone takes still space of particular control in android?

I am using the LinearLayout and inside there's button I am making visibilty gone based on supported states. SupportedStatuses are true then making Button as Visible but SupprtedStatuse are false then ...
Swift's user avatar
  • 887

15 30 50 per page