diff options
3 files changed, 49 insertions, 54 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java index 1c35a8316..422a12a2e 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptListFragment.java @@ -42,8 +42,6 @@ import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; -import android.view.ContextMenu; -import android.view.ContextMenu.ContextMenuInfo; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; @@ -597,7 +595,9 @@ public class DecryptListFragment holder.vProgress.setProgress(model.mProgress); holder.vProgress.setMax(model.mMax); - holder.vProgressMsg.setText(model.mProgressMsg); + if (model.mProgressMsg != null) { + holder.vProgressMsg.setText(model.mProgressMsg); + } } private void bindItemSuccess(ViewHolder holder, final ViewModel model) { @@ -627,7 +627,6 @@ public class DecryptListFragment holder.vFilesize.setText(FileHelper.readableFileSize(size)); } - // TODO thumbnail from OpenPgpMetadata? if (model.mIcon != null) { holder.vThumbnail.setImageDrawable(model.mIcon); } else { diff --git a/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml b/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml index 9ea92a1bd..d58542e62 100644 --- a/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml +++ b/OpenKeychain/src/main/res/layout/decrypt_list_entry.xml @@ -24,33 +24,34 @@ android:outAnimation="@anim/fade_out" android:id="@+id/view_animator" android:measureAllChildren="false" - custom:initialView="2" + custom:initialView="0" + android:minHeight="?listPreferredItemHeightSmall" + android:animateLayoutChanges="true" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:orientation="vertical" - android:paddingTop="4dp" - android:paddingBottom="4dp"> + android:orientation="horizontal"> <ProgressBar android:id="@+id/progress" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:indeterminate="false" - style="@style/Widget.AppCompat.ProgressBar.Horizontal" - android:progress="40" + android:layout_width="30dp" + android:layout_height="30dp" + android:padding="4dp" android:layout_gravity="center_vertical" /> <TextView android:id="@+id/progress_msg" android:layout_width="match_parent" - android:layout_height="match_parent" - android:text="" - tools:text="Progress Message" - android:layout_gravity="center_vertical" /> + android:layout_height="wrap_content" + android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" + android:layout_gravity="center_vertical" + android:text="@string/progress_processing" + android:textAppearance="?android:attr/textAppearanceMedium" + /> </LinearLayout> <!-- --> @@ -245,49 +246,43 @@ </LinearLayout> <LinearLayout + android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> + tools:ignore="UseCompoundDrawables"> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" + <ImageView + android:layout_width="wrap_content" android:layout_height="wrap_content" - tools:ignore="UseCompoundDrawables"> - - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="4dp" - android:src="@drawable/status_signature_invalid_cutout_24dp" - android:tint="@color/android_red_light" - android:layout_gravity="center_vertical" /> - - <TextView - android:id="@+id/result_error_msg" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textAppearance="?android:attr/textAppearanceMedium" - android:layout_marginLeft="8dp" - android:layout_marginTop="8dp" - android:layout_marginBottom="8dp" - android:text="" - android:layout_gravity="center_vertical" - tools:text="Error processing data!" /> + android:padding="4dp" + android:src="@drawable/status_signature_invalid_cutout_24dp" + android:tint="@color/android_red_light" + android:layout_gravity="center_vertical" /> - <ImageView - android:id="@+id/result_error_log" - android:scaleType="center" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:clickable="true" - android:padding="6dp" - android:background="?android:selectableItemBackground" - android:src="@drawable/ic_view_list_grey_24dp" - android:layout_gravity="center_vertical" /> + <TextView + android:id="@+id/result_error_msg" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textAppearance="?android:attr/textAppearanceMedium" + android:layout_marginLeft="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:layout_marginBottom="8dp" + android:text="" + android:layout_gravity="center_vertical" + tools:text="Error processing data!" /> - </LinearLayout> + <ImageView + android:id="@+id/result_error_log" + android:scaleType="center" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:clickable="true" + android:padding="6dp" + android:background="?android:selectableItemBackground" + android:src="@drawable/ic_view_list_grey_24dp" + android:layout_gravity="center_vertical" /> </LinearLayout> diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index f3651371a..ff52b11b1 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -1341,5 +1341,6 @@ <string name="view_internal">"View in OpenKeychain"</string> <string name="error_preparing_data">"Error preparing data!"</string> <string name="label_clip_title">"Encrypted Data"</string> + <string name="progress_processing">Processing…</string> </resources> |