From 8f628e33a46af51e56057c0e54605fdc36205c68 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 1 Jul 2017 11:46:40 +0200 Subject: [PATCH] replace top margin with padding at the destination directory picker --- .../simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt | 3 +-- app/src/main/res/layout/dialog_directory_picker.xml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt index ea4fcb14d..3a8152d63 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickDirectoryDialog.kt @@ -21,10 +21,9 @@ import kotlinx.android.synthetic.main.dialog_directory_picker.view.* class PickDirectoryDialog(val activity: SimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) { var dialog: AlertDialog var shownDirectories: ArrayList = ArrayList() - var view: View + var view: View = LayoutInflater.from(activity).inflate(R.layout.dialog_directory_picker, null) init { - view = LayoutInflater.from(activity).inflate(R.layout.dialog_directory_picker, null) (view.directories_grid.layoutManager as GridLayoutManager).apply { orientation = if (activity.config.scrollHorizontally) GridLayoutManager.HORIZONTAL else GridLayoutManager.VERTICAL spanCount = activity.config.dirColumnCnt diff --git a/app/src/main/res/layout/dialog_directory_picker.xml b/app/src/main/res/layout/dialog_directory_picker.xml index 57c9fb4e8..0a586affb 100644 --- a/app/src/main/res/layout/dialog_directory_picker.xml +++ b/app/src/main/res/layout/dialog_directory_picker.xml @@ -4,13 +4,13 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/directories_grid_holder" android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:paddingTop="@dimen/activity_margin">