aboutsummaryrefslogtreecommitdiffstats
path: root/org_apg/res/layout
diff options
context:
space:
mode:
authorDominik <dominik@dominikschuermann.de>2012-10-31 15:18:19 +0100
committerDominik <dominik@dominikschuermann.de>2012-10-31 15:18:19 +0100
commit555381c4e2ef07a3da95296af5041dfc118bcacb (patch)
treeeac51d171137a218f8022b53b85ee44903568f41 /org_apg/res/layout
parent825ec676d0d6c7c1307de2465cc5dac28a8e0531 (diff)
downloadopen-keychain-555381c4e2ef07a3da95296af5041dfc118bcacb.tar.gz
open-keychain-555381c4e2ef07a3da95296af5041dfc118bcacb.tar.bz2
open-keychain-555381c4e2ef07a3da95296af5041dfc118bcacb.zip
fix crash in KeyListAdapter by changing from different child layouts to one, which is changed on the fly in bindChildView()
Diffstat (limited to 'org_apg/res/layout')
-rw-r--r--org_apg/res/layout/key_list_child_item.xml (renamed from org_apg/res/layout/key_list_child_item_master_key.xml)72
-rw-r--r--org_apg/res/layout/key_list_child_item_sub_key.xml72
-rw-r--r--org_apg/res/layout/key_list_child_item_user_id.xml33
3 files changed, 44 insertions, 133 deletions
diff --git a/org_apg/res/layout/key_list_child_item_master_key.xml b/org_apg/res/layout/key_list_child_item.xml
index 998ba256f..868989cf6 100644
--- a/org_apg/res/layout/key_list_child_item_master_key.xml
+++ b/org_apg/res/layout/key_list_child_item.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
+<!--
+ Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,67 +15,82 @@
limitations under the License.
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:singleLine="true"
- android:paddingLeft="10dip"
- android:layout_marginRight="?android:attr/scrollbarSize"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
- android:layout_width="fill_parent">
+ android:layout_marginRight="?android:attr/scrollbarSize"
+ android:orientation="vertical"
+ android:singleLine="true" >
<LinearLayout
- android:layout_height="wrap_content"
+ android:id="@+id/keyLayout"
android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
android:orientation="horizontal"
- android:paddingRight="3dip">
+ android:paddingLeft="8dip"
+ android:paddingRight="3dip" >
<ImageView
android:id="@+id/ic_masterKey"
- android:src="@drawable/key_small"
- android:paddingRight="6dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"/>
+ android:layout_gravity="center_vertical"
+ android:paddingRight="6dip"
+ android:src="@drawable/key_small" />
<TextView
android:id="@+id/keyId"
- android:text="Key ID"
- android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="5dip"
- android:typeface="monospace"/>
+ android:text="Key ID"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:typeface="monospace" />
<TextView
android:id="@+id/keyDetails"
- android:text="(RSA, 1024bit)"
- android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
+ android:layout_height="wrap_content"
+ android:text="(RSA, 1024bit)"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center_vertical"
android:gravity="right"
android:orientation="horizontal"
android:paddingBottom="2dip"
- android:paddingTop="2dip"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center_vertical">
+ android:paddingTop="2dip" >
<ImageView
android:id="@+id/ic_encryptKey"
- android:src="@drawable/encrypted_small"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
+ android:layout_height="wrap_content"
+ android:src="@drawable/encrypted_small" />
<ImageView
android:id="@+id/ic_signKey"
- android:src="@drawable/signed_small"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
+ android:layout_height="wrap_content"
+ android:src="@drawable/signed_small" />
</LinearLayout>
+ </LinearLayout>
+ <LinearLayout
+ android:id="@+id/userIdLayout"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="36dip"
+ android:singleLine="true" >
+
+ <TextView
+ android:id="@+id/userId"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="3dip"
+ android:text="User ID"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
</LinearLayout>
-</LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/org_apg/res/layout/key_list_child_item_sub_key.xml b/org_apg/res/layout/key_list_child_item_sub_key.xml
deleted file mode 100644
index ac7c217a6..000000000
--- a/org_apg/res/layout/key_list_child_item_sub_key.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:singleLine="true"
- android:paddingLeft="40dip"
- android:layout_marginRight="?android:attr/scrollbarSize"
- android:layout_height="?android:attr/listPreferredItemHeight"
- android:layout_width="fill_parent">
-
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="fill_parent"
- android:orientation="horizontal"
- android:paddingRight="3dip">
-
- <TextView
- android:id="@+id/keyId"
- android:text="Key ID"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="5dip"
- android:typeface="monospace"/>
-
- <TextView
- android:id="@+id/keyDetails"
- android:text="(RSA, 1024bit)"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
- <LinearLayout
- android:gravity="right"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:paddingBottom="2dip"
- android:paddingTop="2dip"
- android:layout_gravity="center_vertical">
-
- <ImageView
- android:id="@+id/ic_encryptKey"
- android:src="@drawable/encrypted_small"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
- <ImageView
- android:id="@+id/ic_signKey"
- android:src="@drawable/signed_small"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
-
- </LinearLayout>
-
- </LinearLayout>
-
-</LinearLayout>
diff --git a/org_apg/res/layout/key_list_child_item_user_id.xml b/org_apg/res/layout/key_list_child_item_user_id.xml
deleted file mode 100644
index 598dcef22..000000000
--- a/org_apg/res/layout/key_list_child_item_user_id.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 Thialfihar <thi@thialfihar.org>
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:paddingLeft="40dip"
- android:layout_marginRight="?android:attr/scrollbarSize"
- android:singleLine="true"
- android:layout_width="fill_parent"
- android:layout_height="?android:attr/listPreferredItemHeight">
-
- <TextView
- android:id="@+id/userId"
- android:text="User ID"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="3dip"/>
-
-</LinearLayout>