From 289a83635d942dda4c37c5f46d79ae6dbea380f3 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 21 Jan 2020 13:01:28 +0100 Subject: [PATCH] OC bottom list improvement - same padding - add "create new" for creators Signed-off-by: tobiasKaminsky --- .../fragment/OCFileListBottomSheetDialog.java | 10 +- ...file_list_actions_bottom_sheet_creator.xml | 2 +- ...ile_list_actions_bottom_sheet_fragment.xml | 107 +++++++++--------- src/main/res/values/strings.xml | 2 + 4 files changed, 67 insertions(+), 54 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java b/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java index 9aa878801f..77444aa87c 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java +++ b/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java @@ -74,6 +74,9 @@ public class OCFileListBottomSheetDialog extends BottomSheetDialog { @BindView(R.id.creators) public LinearLayout creators; + @BindView(R.id.creators_container) + public LinearLayout creatorsContainer; + @BindView(R.id.menu_direct_camera_upload) public View cameraView; @@ -135,13 +138,16 @@ public class OCFileListBottomSheetDialog extends BottomSheetDialog { DirectEditing directEditing = new Gson().fromJson(json, DirectEditing.class); if (!directEditing.getCreators().isEmpty()) { - creators.setVisibility(View.VISIBLE); + creatorsContainer.setVisibility(View.VISIBLE); LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); for (Creator creator : directEditing.getCreators().values()) { View creatorView = vi.inflate(R.layout.file_list_actions_bottom_sheet_creator, null); - ((TextView) creatorView.findViewById(R.id.creator_name)).setText(creator.getName()); + ((TextView) creatorView.findViewById(R.id.creator_name)).setText( + String.format(fileActivity.getString(R.string.editor_placeholder), + fileActivity.getString(R.string.create_new), + creator.getName())); ImageView thumbnail = creatorView.findViewById(R.id.creator_thumbnail); thumbnail.setImageDrawable(MimeTypeUtil.getFileTypeIcon(creator.getMimetype(), diff --git a/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml b/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml index 0c7439cbe5..a6d87e3933 100644 --- a/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml +++ b/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml @@ -28,7 +28,7 @@ android:paddingLeft="@dimen/standard_padding" android:paddingTop="@dimen/standard_half_padding" android:paddingRight="@dimen/standard_padding" - android:paddingBottom="@dimen/standard_padding" + android:paddingBottom="@dimen/standard_half_padding" tools:ignore="UseCompoundDrawables"> - - + + - - + android:src="@drawable/file_doc" /> + android:textSize="@dimen/bottom_sheet_text_size" /> + android:src="@drawable/file_xls" /> + android:textSize="@dimen/bottom_sheet_text_size" /> + android:src="@drawable/file_ppt" /> + android:textSize="@dimen/bottom_sheet_text_size" /> - - - + + + + + + + + Add folder info creates folder info edit folder info + Create new + %1$s %2$s