package quickutils.core.categories; import android.app.Activity; import android.view.View; /** * Created by cesarferreira on 9/6/14. */ public class view { /** * Simpler version of {@link View#findViewById(int)} which infers the target type. */ @SuppressWarnings({"unchecked", "UnusedDeclaration"}) public static <T extends View> T findById(View view, int id) { return (T) view.findViewById(id); } /** * Simpler version of {@link Activity#findViewById(int)} which infers the target type. */ @SuppressWarnings({"unchecked", "UnusedDeclaration"}) public static <T extends View> T findById(Activity activity, int id) { return (T) activity.findViewById(id); } }