Posts

Showing posts with the label spinner font size

Changing text size and color of spinner in Sketchware

Image
To change the text size and color of spinner dropdown list, follow the instructions given below. 1. In VIEW area of your Sketchware Android project, insert a Spinner spinner1 . 2. In LOGIC area, add a new String list list1 . 3. In onCreate event add items to the list. 4. After adding items to the String list, insert an add source directly block and put following code in it: spinner1.setAdapter(new ArrayAdapter (this, android.R.layout.simple_list_item_1, android.R.id.text1, list1) { @Override public View getView(int position, View convertView, ViewGroup parent) { TextView textView1 = (TextView) super.getView(position, convertView, parent); textView1.setTextColor(Color.RED); textView1.setTextSize(24); return textView1; } @Override public View getDropDownView(int position, View convertView, ViewGroup parent) { TextView textView1 = (TextView) super.getDropDownView(position, convertView, parent); textView1.setTextColor(Color.RED); textView1.setTextSize(24); retu...