Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Commit

Permalink
Small bug in selected theme in the theme change dialog (III)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxieds committed Jun 29, 2019
1 parent 4494931 commit d1bd1c8
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -537,10 +537,12 @@ public void actionButtonAppSettings(View view) {
}
// set the correct current theme as the selected radio button:
RadioGroup themeRadioGroup = (RadioGroup) dialogView.findViewById(R.id.themeRadioGroup);
ArrayList<View> curThemeRadioBtns = new ArrayList<View>();
themeRadioGroup.findViewsWithText(curThemeRadioBtns, "Theme: " + storedAppTheme, android.view.View.FIND_VIEWS_WITH_TEXT);
if(curThemeRadioBtns.size() > 0) {
((RadioButton) curThemeRadioBtns.get(0)).setSelected(true);
for(int rb = 0; rb < themeRadioGroup.getChildCount(); rb++) {
RadioButton curThemeBtn = (RadioButton) themeRadioGroup.getChildAt(rb);
if(curThemeBtn.isEnabled() && curThemeBtn.getText().toString().equals("Theme: " + storedAppTheme)) {
curThemeBtn.setSelected(true);
break;
}
}
// finish constructing the theme selection dialog:
ScrollView themesScroller = new ScrollView(this);
Expand Down

0 comments on commit d1bd1c8

Please sign in to comment.