Java tutorial
//package com.java2s; //License from project: Open Source License import android.support.annotation.Nullable; import android.view.View; public class Main { public static void handle(View v, @Nullable String s) { v.setVisibility(s == null || s.isEmpty() ? View.GONE : View.VISIBLE); } }