mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #10636 from t895/getBindingAdapterPosition
Android: Replace deprecated method calls for adapter position
This commit is contained in:
commit
4b6a47396e
@ -59,7 +59,7 @@ public final class CheckBoxSettingViewHolder extends SettingViewHolder
|
||||
|
||||
mCheckbox.toggle();
|
||||
|
||||
getAdapter().onBooleanClick(mItem, getAdapterPosition(), mCheckbox.isChecked());
|
||||
getAdapter().onBooleanClick(mItem, getBindingAdapterPosition(), mCheckbox.isChecked());
|
||||
|
||||
setStyle(mTextSettingName, mItem);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public final class FilePickerViewHolder extends SettingViewHolder
|
||||
return;
|
||||
}
|
||||
|
||||
int position = getAdapterPosition();
|
||||
int position = getBindingAdapterPosition();
|
||||
if (mFilePicker.getRequestType() == MainPresenter.REQUEST_DIRECTORY)
|
||||
{
|
||||
getAdapter().onFilePickerDirectoryClick(mItem, position);
|
||||
|
@ -61,7 +61,7 @@ public final class InputBindingSettingViewHolder extends SettingViewHolder
|
||||
return;
|
||||
}
|
||||
|
||||
getAdapter().onInputBindingClick(mItem, getAdapterPosition());
|
||||
getAdapter().onInputBindingClick(mItem, getBindingAdapterPosition());
|
||||
|
||||
setStyle(mTextSettingName, mItem);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class RumbleBindingViewHolder extends SettingViewHolder
|
||||
return;
|
||||
}
|
||||
|
||||
getAdapter().onInputBindingClick(mItem, getAdapterPosition());
|
||||
getAdapter().onInputBindingClick(mItem, getBindingAdapterPosition());
|
||||
|
||||
setStyle(mTextSettingName, mItem);
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public abstract class SettingViewHolder extends RecyclerView.ViewHolder
|
||||
builder
|
||||
.setPositiveButton(R.string.ok, (dialog, whichButton) ->
|
||||
{
|
||||
getAdapter().clearSetting(item, getAdapterPosition());
|
||||
getAdapter().clearSetting(item, getBindingAdapterPosition());
|
||||
bind(item);
|
||||
Toast.makeText(context, R.string.setting_cleared, Toast.LENGTH_SHORT).show();
|
||||
dialog.dismiss();
|
||||
|
@ -98,7 +98,7 @@ public final class SingleChoiceViewHolder extends SettingViewHolder
|
||||
return;
|
||||
}
|
||||
|
||||
int position = getAdapterPosition();
|
||||
int position = getBindingAdapterPosition();
|
||||
if (mItem instanceof SingleChoiceSetting)
|
||||
{
|
||||
getAdapter().onSingleChoiceClick((SingleChoiceSetting) mItem, position);
|
||||
|
@ -67,7 +67,7 @@ public final class SliderViewHolder extends SettingViewHolder
|
||||
return;
|
||||
}
|
||||
|
||||
getAdapter().onSliderClick(mItem, getAdapterPosition());
|
||||
getAdapter().onSliderClick(mItem, getBindingAdapterPosition());
|
||||
|
||||
setStyle(mTextSettingName, mItem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user