Java tutorial
//package com.java2s; import android.text.InputFilter; import android.widget.EditText; import java.util.ArrayList; import java.util.Arrays; public class Main { public static void setAllCapsInputFilter(EditText et) { InputFilter[] prefFilters; prefFilters = et.getFilters(); ArrayList<InputFilter> filters = new ArrayList<>(Arrays.asList(prefFilters)); filters.add(new InputFilter.AllCaps()); prefFilters = new InputFilter[filters.size()]; filters.toArray(prefFilters); et.setFilters(prefFilters); } }