Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions app/src/main/java/uk/lgl/modmenu/FloatingModMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ private void featureList(String[] listFT, LinearLayout linearLayout) {
}
}

private View Switch(final int featNum, final String featName, boolean swiOn) {
private View Switch(final int featNum, final String featName, boolean swiOn) {
final Switch switchR = new Switch(activity);
ColorStateList buttonStates = new ColorStateList(
new int[][]{
Expand All @@ -542,21 +542,14 @@ private View Switch(final int featNum, final String featName, boolean swiOn) {
switchR.setText(featName);
switchR.setTextColor(TEXT_COLOR_2);
switchR.setPadding(10, 5, 0, 5);
switchR.setChecked(swiOn);
switchR.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
public void onCheckedChanged(CompoundButton compoundButton, boolean bool) {
switch (featNum) {
case -1: //Save perferences
if (bool == false)
break;
case -3:
scrollView.setLayoutParams(bool ? scrlLLExpanded : scrlLL);
break;
}
Changes(activity, featNum, featName, 0, bool, "");
}
});
return switchR;
}
}


private View SeekBar(final int featNum, final String featName, final int min, final int max) {
// Remove loadedProg since Changes is void
Expand Down
Loading