Skip to content

Commit

Permalink
fix openMF#1730: Text Error in FormToggleButton fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
PatelVatsalB21 committed Jan 26, 2021
1 parent c59191c commit 5503f20
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ public FormToggleButton(Context context, String name) {

switchButton = new SwitchCompat(context);
switchButton.setLayoutParams(weightedLayoutParams);
switchButton.setPadding(0, 0, 0, 20);
switchButton.setGravity(Gravity.CENTER_HORIZONTAL);
switchButton.setSwitchMinWidth(50);
switchButton.setShowText(true);
switchButton.setChecked(false);
switchButton.setTextOn("True");
switchButton.setTextOff("False");
switchButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
Expand Down

0 comments on commit 5503f20

Please sign in to comment.