Merge pull request #456 from thi/adjust-fingerprint-layouts

Adjust fingerprint layouts
This commit is contained in:
Dominik Schürmann 2014-03-20 19:08:42 +01:00
commit 7edc062147
3 changed files with 33 additions and 28 deletions

View File

@ -511,6 +511,11 @@ public class PgpKeyHelper {
public static SpannableStringBuilder colorizeFingerprint(String fingerprint) {
// add line breaks to have a consistent "image" that can be recognized
char[] chars = fingerprint.toCharArray();
chars[24] = '\n';
fingerprint = String.valueOf(chars);
SpannableStringBuilder sb = new SpannableStringBuilder(fingerprint);
try {
// for each 4 characters of the fingerprint + 1 space

View File

@ -51,13 +51,6 @@
android:text="@string/label_main_user_id"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/fingerprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="fingerprint"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/mainUserIdRest"
android:layout_width="wrap_content"
@ -89,6 +82,13 @@
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/fingerprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="fingerprint"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"

View File

@ -130,6 +130,25 @@
android:text="" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/tableRow">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:text="@string/label_fingerprint" />
<TextView
android:id="@+id/fingerprint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:typeface="monospace" />
</TableRow>
<TableRow>
<TextView
@ -160,25 +179,6 @@
android:layout_height="wrap_content" />
</TableRow>
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/tableRow">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingRight="10dip"
android:text="@string/label_fingerprint" />
<TextView
android:id="@+id/fingerprint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:typeface="monospace" />
</TableRow>
<TableRow>
<TextView