long click on name to open settings

This commit is contained in:
Milos Kozak 2017-11-02 17:47:41 +01:00
parent 20c66e3b6f
commit a7077a8a6a

View file

@ -270,6 +270,23 @@ public class ConfigBuilderFragment extends Fragment {
}, null); }, null);
} }
}); });
holder.name.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
final PluginBase plugin = (PluginBase) v.getTag();
PasswordProtection.QueryPassword(getContext(), R.string.settings_password, "settings_password", new Runnable() {
@Override
public void run() {
Intent i = new Intent(getContext(), PreferencesActivity.class);
i.putExtra("id", plugin.getPreferencesId());
startActivity(i);
}
}, null);
return false;
}
});
} else { } else {
holder = (PluginViewHolder) view.getTag(); holder = (PluginViewHolder) view.getTag();
} }