Android-Bootstrap icon indicating copy to clipboard operation
Android-Bootstrap copied to clipboard

Cannot show or hide Bootstrap button (visibility change)

Open CazimirRoman opened this issue 5 years ago • 4 comments

Hi,

Calling setVisibility(View.GONE) or setVisibility(View.VISIBLE) does not have any effect on a BootstrapButton object. Also setting these flags in the XML does not change the visibility. The only option as I see it is to change the width to Odp. Thoughts?

CazimirRoman avatar Aug 14 '18 22:08 CazimirRoman

Did you find a solution to the problem?

kksal55 avatar Sep 26 '18 15:09 kksal55

I'm facing the same issue with this, I'm trying to figure out why... if I find something, I'll post it here!

LluisFelip avatar Jan 14 '19 19:01 LluisFelip

I found a "kind-of-workaround"... By using databinding for the visibility, it seems it works properly.

I suppose the rendering phase when it isn't applying the visibility you set in the xml (or in the onCreate/onResume or wherever you are setting the visibility dynamically) is in the very beginning. So, using databinding, it updates the visibility state later, and it applies it correctly.

Anyway, I just realised this library hasn't been updated for a couple years.

LluisFelip avatar Jan 14 '19 20:01 LluisFelip

This does not seem to be an issue in 2.3.0

I suspect this commit to the 2.3.2 release to be causing the issue: https://github.com/Bearded-Hen/Android-Bootstrap/commit/0edd1ae7271fc680792d5bbefab8ee9582ed6db9

Have not fully investigated it but looks as if a non-empty string will cause AwesomeTextView to have visibility set to VISIBLE, not considering if it was set to GONE or HIDDEN.

cyrixmorten avatar Jan 25 '19 00:01 cyrixmorten