-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
After trying to do something like:
<ImageButton android:id="@+id/exo_prev"
style="@style/ExoMediaButton.Previous"
android:tint="@color/white"
android:visibility="gone" />
I noticed that the button doesn't appear on Android studio preview but appears when I'm running the app. I then checked the source code and found that it comes from here:
private void setButtonEnabled(boolean enabled, @Nullable View view) {
if (view == null) {
return;
}
view.setEnabled(enabled);
view.setAlpha(enabled ? buttonAlphaEnabled : buttonAlphaDisabled);
view.setVisibility(VISIBLE); // HERE
}
Is there a way to override the visibility or should I do a PR (replacing VISIBLE by view.visibility) ?
EDIT:
Just to be clear, I think it should be possible to display it just under some conditions instead of displaying it automatically. In my case, I have an activity for the portrait mode (shouldn't get displayed) and another for the landscape (should get displayed).
Reactions are currently unavailable