I am using Three NumberPickers to create a DatePicker in different calendar system, and trying to set typeface to NumberPicker controls. according to this post on SO, i looked at number_picker.xml. the numberpicker is created using two ImageButton and one EditText as Follows:
<merge>
<ImageButton ... />
<EditText .../>
<ImageButton ... />
</merge>
so, as a sample, i used the following code for year NumberPickers:
NumberPicker date_y = (NumberPicker) findViewById(R.id.np_year);
Typeface tf;
tf = Typeface.createFromAsset(getAssets(),"fonts/bnazaninbd.ttf");
EditText et = (EditText) date_y.getChildAt(0);
et.setTypeface(tf);
1st problem is why getChildAt(0) works for Edit text, though Edit text is 2nd object and it should be getChildAt(1).
2nd, the editText font changes when the Activity loads (but just the EditText, and not to texts at above and bottom of it), but as the numberpicker slids, the Typeface changes back to its original.