Posts

Showing posts with the label android-textview

Text Size Change in Adapter class updates text size in all activities

Text Size Change in Adapter class updates text size in all activities The following is my WordAdapter class WordAdapter public class WordAdapter extends ArrayAdapter<Word> { /** Resource ID for the background color for this list of words */ private int mColorResourceId; /** * Create a new {@link WordAdapter} object. * * @param context is the current context (i.e. Activity) that the adapter is being created in. * @param words is the list of {@link Word}s to be displayed. * @param colorResourceId is the resource ID for the background color for this list of words */ public WordAdapter(Context context, ArrayList<Word> words, int colorResourceId) { super(context, 0, words); mColorResourceId = colorResourceId; } @Override public View getView(final int position, View convertView, ViewGroup parent) { // Check if an existing view is being reused, otherwise inflate the view View listItemView = convertView; if (listItemView == null) { listItemView =...