我想在closeDialog()调用时重新绑定视图。我认为我应该以某种方式将视图标记为肮脏的。如果这是采取的正确措施,我将如何做?我的代码:
public final class SettingsAdapter extends RecyclerView.Adapter<SettingViewHolder>
implements DialogInterface.OnClickListener, SeekBar.OnSeekBarChangeListener
{
private SettingsFragmentView mView;
private Context mContext;
private ArrayList<SettingsItem> mSettings;
private SettingsItem mClickedItem;
private int mSeekbarProgress;
private AlertDialog mDialog;
private TextView mTextSliderValue;
public SettingsAdapter(SettingsFragmentView view, Context context)
{
mView = view;
mContext = context;
}
// Unrelated code removed here
@Override
public void onClick(DialogInterface dialog, int which)
{
if (mClickedItem instanceof SingleChoiceSetting)
{
SingleChoiceSetting scSetting = (SingleChoiceSetting) mClickedItem;
int value = getValueForSingleChoiceSelection(scSetting, which);
MenuTag menuTag = scSetting.getMenuTag();
if(menuTag != null)
{
if (menuTag.isGCPadMenu())
{
mView.onGcPadSettingChanged(menuTag, value);
}
慕后森
相关分类