#pragma once #include #include #include class OptionPicker:public RelativeLayout{ protected: NumberPicker*mNumberPicker; TextView* mText1,*mText2; std::vectormValues; NumberPicker::OnValueChangeListener mOnValueChangedListener; public: OptionPicker(int,int); OptionPicker(Context*,const AttributeSet&attr); NumberPicker&getPicker(); void setText(const std::string&text); void setText(const std::string&,const std::string&); void setOnValueChangedListener(NumberPicker::OnValueChangeListener onValueChangedListener); /*values used for uart commandid,names used for display,values.size==names.size*/ void setValuedName(const std::vector&values,const std::vector&names); void showOptions(bool on); void setValue(int value); int getValue()const; };