Project

General

Profile

« Previous | Next » 

Revision 011fcfe0

Added by Leszek Koltunski over 4 years ago

Improve setting text size in Spinners (forgotten part).

View differences:

src/main/java/org/distorted/states/RubikStatePlay.java
411 411
      levels[i] = act.getString(R.string.lv_placeholder,i+1);
412 412
      }
413 413

  
414
    mSpinnerAdapter = new ArrayAdapter<>(act,android.R.layout.simple_spinner_item, levels);
414
    mSpinnerAdapter = new ArrayAdapter<String>(act, android.R.layout.simple_spinner_item, levels)
415
      {
416
      @NonNull
417
      public View getView(int position, View convertView, @NonNull ViewGroup parent)
418
        {
419
        View v = super.getView(position, convertView, parent);
420
        TextView tv = ((TextView) v);
421
        tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, mButtonSize);
422
        return v;
423
        }
424
      };
425

  
415 426
    mSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
416 427
    mLevelSpinner.setAdapter(mSpinnerAdapter);
417 428
    }

Also available in: Unified diff