mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-23 17:22:16 -05:00
Disable selection of user ids and keys in view key
This commit is contained in:
parent
a85b217756
commit
a63488cce3
@ -371,8 +371,8 @@ public class ViewKeyActivity extends ActionBarActivity {
|
||||
|
||||
protected void onPostExecute(Void unused) {
|
||||
// Register callback to set NDEF message
|
||||
mNfcAdapter.setNdefPushMessageCallback(mNdefCallback
|
||||
, ViewKeyActivity.this);
|
||||
mNfcAdapter.setNdefPushMessageCallback(mNdefCallback,
|
||||
ViewKeyActivity.this);
|
||||
// Register callback to listen for message-sent success
|
||||
mNfcAdapter.setOnNdefPushCompleteCallback(mNdefCompleteCallback,
|
||||
ViewKeyActivity.this);
|
||||
|
@ -27,6 +27,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.helper.OtherHelper;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
|
||||
@ -172,4 +173,16 @@ public class ViewKeyKeysAdapter extends CursorAdapter {
|
||||
return view;
|
||||
}
|
||||
|
||||
// Disable selection of items, http://stackoverflow.com/a/4075045
|
||||
@Override
|
||||
public boolean areAllItemsEnabled() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Disable selection of items, http://stackoverflow.com/a/4075045
|
||||
@Override
|
||||
public boolean isEnabled(int position) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -191,4 +191,24 @@ public class ViewKeyUserIdsAdapter extends CursorAdapter implements AdapterView.
|
||||
return view;
|
||||
}
|
||||
|
||||
// Disable selection of items for lists without checkboxes, http://stackoverflow.com/a/4075045
|
||||
@Override
|
||||
public boolean areAllItemsEnabled() {
|
||||
if (mCheckStates == null) {
|
||||
return false;
|
||||
} else {
|
||||
return super.areAllItemsEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
// Disable selection of items for lists without checkboxes, http://stackoverflow.com/a/4075045
|
||||
@Override
|
||||
public boolean isEnabled(int position) {
|
||||
if (mCheckStates == null) {
|
||||
return false;
|
||||
} else {
|
||||
return super.isEnabled(position);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user