Fix resource names, add small test
This commit is contained in:
1 parent
61944b9e39
commit
b2f7e839e1
77 files changed
+12
-7
No files matched your search
@@ -22,6 +22,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.graphics.PorterDuff;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -437,7 +438,7 @@ public class KeyListFragment extends LoaderFragment
|
|||||||
TextView mMainUserIdRest;
|
TextView mMainUserIdRest;
|
||||||
FrameLayout mStatusLayout;
|
FrameLayout mStatusLayout;
|
||||||
TextView mRevoked;
|
TextView mRevoked;
|
||||||
ImageView mVerified;
|
ImageView mStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -448,7 +449,7 @@ public class KeyListFragment extends LoaderFragment
|
|||||||
holder.mMainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest);
|
holder.mMainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest);
|
||||||
holder.mStatusLayout = (FrameLayout) view.findViewById(R.id.status_layout);
|
holder.mStatusLayout = (FrameLayout) view.findViewById(R.id.status_layout);
|
||||||
holder.mRevoked = (TextView) view.findViewById(R.id.revoked);
|
holder.mRevoked = (TextView) view.findViewById(R.id.revoked);
|
||||||
holder.mVerified = (ImageView) view.findViewById(R.id.verified);
|
holder.mStatus = (ImageView) view.findViewById(R.id.status_image);
|
||||||
view.setTag(holder);
|
view.setTag(holder);
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
@@ -486,7 +487,7 @@ public class KeyListFragment extends LoaderFragment
|
|||||||
// this is a secret key
|
// this is a secret key
|
||||||
h.mStatusLayout.setVisibility(View.VISIBLE);
|
h.mStatusLayout.setVisibility(View.VISIBLE);
|
||||||
h.mRevoked.setVisibility(View.GONE);
|
h.mRevoked.setVisibility(View.GONE);
|
||||||
h.mVerified.setVisibility(View.GONE);
|
h.mStatus.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
// this is a public key - show if it's revoked
|
// this is a public key - show if it's revoked
|
||||||
|
|
||||||
@@ -496,13 +497,17 @@ public class KeyListFragment extends LoaderFragment
|
|||||||
if(isRevoked || isExpired) {
|
if(isRevoked || isExpired) {
|
||||||
h.mStatusLayout.setVisibility(View.VISIBLE);
|
h.mStatusLayout.setVisibility(View.VISIBLE);
|
||||||
h.mRevoked.setVisibility(View.VISIBLE);
|
h.mRevoked.setVisibility(View.VISIBLE);
|
||||||
h.mVerified.setVisibility(View.GONE);
|
h.mStatus.setVisibility(View.GONE);
|
||||||
h.mRevoked.setText(isRevoked ? R.string.revoked : R.string.expired);
|
h.mRevoked.setText(isRevoked ? R.string.revoked : R.string.expired);
|
||||||
} else {
|
} else {
|
||||||
boolean isVerified = cursor.getInt(INDEX_VERIFIED) > 0;
|
boolean isVerified = cursor.getInt(INDEX_VERIFIED) > 0;
|
||||||
h.mStatusLayout.setVisibility(isVerified ? View.VISIBLE : View.GONE);
|
h.mStatusLayout.setVisibility(isVerified ? View.VISIBLE : View.GONE);
|
||||||
h.mRevoked.setVisibility(View.GONE);
|
h.mRevoked.setVisibility(View.GONE);
|
||||||
h.mVerified.setVisibility(isVerified ? View.VISIBLE : View.GONE);
|
h.mStatus.setVisibility(isVerified ? View.VISIBLE : View.GONE);
|
||||||
|
if (isVerified) {
|
||||||
|
h.mStatus.setColorFilter(getResources().getColor(R.color.result_green),
|
||||||
|
PorterDuff.Mode.MULTIPLY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -58,9 +58,9 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/verified"
|
android:id="@+id/status_image"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:src="@drawable/key_certify_ok_depth0"
|
android:src="@drawable/status_signature_verified_cutout"
|
||||||
android:padding="16dp" />
|
android:padding="16dp" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user