package de.thedevstack.conversationsplus.utils.ui; import android.support.annotation.IdRes; import android.view.View; /** * Created by steckbrief on 11.01.2017. */ public class ViewUtil { public static T visible(View parentView, @IdRes int textViewId) { T tv = (T) parentView.findViewById(textViewId); if (null != tv) { tv.setVisibility(View.VISIBLE); } return tv; } public static T invisible(View parentView, @IdRes int textViewId) { T tv = (T) parentView.findViewById(textViewId); if (null != tv) { tv.setVisibility(View.INVISIBLE); } return tv; } public static T gone(View parentView, @IdRes int textViewId) { T tv = (T) parentView.findViewById(textViewId); if (null != tv) { tv.setVisibility(View.GONE); } return tv; } }