public void setupView(Context context) { mContext = context; mCurrentUnit = null; mInflater = LayoutInflater.from(context); mRootView = (LinearLayout) mInflater.inflate(R.layout.data_options_view, this); mExpander = (ExpanderView) mRootView.findViewById(R.id.expander); mExpander.setExpandtext(getResources().getString(R.string.data_options)); mUnits = (Spinner) mRootView.findViewById(R.id.unit_picker); mUnits.setOnItemSelectedListener(this); mUnits.setAdapter( new ArrayAdapter<>(mContext, android.R.layout.simple_list_item_1, TransformHelper.UNITS)); mClearButton = (Button) mRootView.findViewById(R.id.clear_button); mClearButton.setOnClickListener(this); mPicker = (NumberPicker) mRootView.findViewById(R.id.picker); setupPicker(); mAutoScale = (CheckBox) mRootView.findViewById(R.id.auto_scale); mAutoScale.setOnCheckedChangeListener(this); }
public void expand(boolean val) { mExpander.expandView(val); }
public boolean isExpanded() { return mExpander.getExpanded(); }