Esempio n. 1
0
  public DurationPicker(Context context, AttributeSet attrs) {
    super(context, attrs);

    hours = new NumberPicker(context, attrs);
    minutes = new NumberPicker(context, attrs);
    seconds = new NumberPicker(context, attrs);

    hours.setOrientation(VERTICAL);
    minutes.setOrientation(VERTICAL);
    seconds.setOrientation(VERTICAL);

    setOrientation(HORIZONTAL);
    setLayoutParams(
        new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    addView(hours);
    addView(minutes);
    addView(seconds);
  }