I'm using the following code to programmatically create a switch:
Switch s = new Switch(mActivity);
s.setText(text);
s.setBackground(selectorDrawable);
s.setTypeface(mFont);
s.setTextSize(mEntriesTextSize);
s.setTextSize(8);
s.setTag(command);
s.setVisibility(View.VISIBLE);
s.setPadding(mEntriesSidesPadding,
mEntriesUpDownPadding, mEntriesSidesPadding,
mEntriesUpDownPadding);
s.setChecked(on);
// attempted to change height here...
s.setOnCheckedChangeListener(mOnCheckedListener);
mLayout.addView(s, mLayoutParams);
returnView = s;
How might I go about changing the height of the actual switch on screen (not the text height, the height of the ON/OFF switch itself)
I've tried
setMaxHeight(), setMinHeight(), setHeight()
but nothing seems to work.