I've declared a FloatingActionButton
and I want it to appear only when the app is accessed by admin, so I need to make it visible(as I made it by default invisible).
I tried using .setVisibility
, but it says .setVisibility
can only be called from within the same library.
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/add_event_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@mipmap/add_icon1"
/>