jacobmort / MuzeiGooglePhotos

Google Photos for Muzei
Other
6 stars 1 forks source link

SettingsActivity ANR #8

Open jacobmort opened 8 years ago

jacobmort commented 8 years ago

Happens occasionally, caused by this jank. Figure out a better way to dynamically set spinner value

// Stupid hack to get this to work
final int index = hoursIndex;
mBinding.spinner.post(new Runnable() {
    public void run() {
        mBinding.spinner.setSelection(index);
    }
});
jacobmort commented 8 years ago

Can't just do mBinding.spinner.setSelection(index); in onCreate since the spinner isn't initialized (getSelectedItem is null, getSelectedItemPosition is -1).