Fix resource names, add small test

This commit is contained in:
Dominik Schürmann 2014-07-28 01:23:38 +02:00
parent 61944b9e39
commit b2f7e839e1
77 changed files with 12 additions and 7 deletions

View File

@ -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);
}
} }
} }
} }

View File

Before

Width:  |  Height:  |  Size: 911 B

After

Width:  |  Height:  |  Size: 911 B

View File

Before

Width:  |  Height:  |  Size: 1008 B

After

Width:  |  Height:  |  Size: 1008 B

View File

Before

Width:  |  Height:  |  Size: 911 B

After

Width:  |  Height:  |  Size: 911 B

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 675 B

View File

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 748 B

View File

Before

Width:  |  Height:  |  Size: 675 B

After

Width:  |  Height:  |  Size: 675 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -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>

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 995 B

After

Width:  |  Height:  |  Size: 995 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB