Advertisement
Guest User

Untitled

a guest
Aug 11th, 2012
1,180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. How to add style to a NumberPicker in Android
  2. <style name="myPicker">
  3. <item name="android:textColor">#FFFFFF</item>
  4. </style>
  5.  
  6. np.setValue(10);
  7. np.setMinValue(5);
  8. np.setMaxValue(50);
  9. // retrieve the textview reference
  10. TextView npTextView = (TextView) np.giftAmount.getChildAt(1); // since indexing begins at 0
  11. npTextView.setTextColor(getResources().getColor(
  12. R.color.my_custom_color)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement