Skip to content

Commit

Permalink
add binding adapters
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi Nosrati Sahlan committed Jan 2, 2020
1 parent a262a9a commit cb0206a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/java/io/mns/mpfm/utils/BindingAdapters.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.mns.mpfm.utils;

import android.view.View;

import androidx.databinding.BindingAdapter;

public class BindingAdapters {
@BindingAdapter("visibleGone")
public static void showHide(View view, boolean show) {
view.setVisibility(show ? View.VISIBLE : View.GONE);
}
}

0 comments on commit cb0206a

Please sign in to comment.