Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. public class MyPref extends Preference {
  2. private static final String TAG = "MyPref";
  3.  
  4. public MyPref(Context context, AttributeSet attrs) {
  5. super(context, attrs);
  6. }
  7.  
  8. @Override
  9. protected void onBindView(View view) {
  10. super.onBindView(view);
  11. View v = view.findViewById(android.R.id.widget_frame);
  12. if (v != null) {
  13. v.setVisibility(View.VISIBLE);
  14. GradientDrawable d = new GradientDrawable();
  15. d.setCornerRadius(12);
  16. d.setColor(0xaaff0000);
  17. v.setBackground(d);
  18. }
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement