ImportKeys: Restore NonInteractive behavior
Hides container of buttons when NonInteractive is enabled. In this way user can't interact with the list.
This commit is contained in:
@@ -114,12 +114,13 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
||||
return result;
|
||||
}
|
||||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
public ImportKeysListItemBinding binding;
|
||||
|
||||
public ViewHolder(View view) {
|
||||
super(view);
|
||||
binding = DataBindingUtil.bind(view);
|
||||
binding.setNonInteractive(mNonInteractive);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +179,7 @@ public class ImportKeysAdapter extends RecyclerView.Adapter<ImportKeysAdapter.Vi
|
||||
b.expand.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
boolean downloaded = mDownloaded[position] = !mDownloaded[position];
|
||||
boolean downloaded = mDownloaded[position] = !mDownloaded[position];
|
||||
b.extraContainer.setVisibility(downloaded ? View.VISIBLE : View.GONE);
|
||||
b.expand.animate().rotation(downloaded ? 180 : 0).start();
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<import type="android.view.View" />
|
||||
<import type="org.sufficientlysecure.keychain.ui.util.Highlighter" />
|
||||
|
||||
<variable name="nonInteractive" type="boolean" />
|
||||
|
||||
<variable name="standardColor" type="int" />
|
||||
<variable name="revokedExpiredColor" type="int" />
|
||||
<variable name="secretColor" type="int" />
|
||||
@@ -97,7 +99,8 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
android:padding="8dp"
|
||||
android:visibility="@{nonInteractive ? View.GONE : View.VISIBLE}">
|
||||
|
||||
<Button
|
||||
android:id="@+id/import_key"
|
||||
|
||||
Reference in New Issue
Block a user