fixing some additional customization glitches

This commit is contained in:
tibbi 2020-11-08 21:05:50 +01:00
parent d6ff95e923
commit 5573a4eb18
2 changed files with 14 additions and 2 deletions

View file

@ -679,8 +679,21 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
}
if (scrollHorizontally && !isListViewType && config.folderStyle == FOLDER_STYLE_ROUNDED_CORNERS) {
(dir_name.layoutParams as RelativeLayout.LayoutParams).removeRule(RelativeLayout.BELOW)
(dir_thumbnail.layoutParams as RelativeLayout.LayoutParams).addRule(RelativeLayout.ABOVE, dir_name.id)
val photoCntParams = (photo_cnt.layoutParams as RelativeLayout.LayoutParams)
val nameParams = (dir_name.layoutParams as RelativeLayout.LayoutParams)
nameParams.removeRule(RelativeLayout.BELOW)
if (config.showFolderMediaCount == FOLDER_MEDIA_CNT_LINE) {
nameParams.addRule(RelativeLayout.ABOVE, photo_cnt.id)
nameParams.removeRule(RelativeLayout.ALIGN_PARENT_BOTTOM)
photoCntParams.removeRule(RelativeLayout.BELOW)
photoCntParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM)
} else {
nameParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM)
}
}
if (lockedFolderPaths.contains(directory.path)) {

View file

@ -61,7 +61,6 @@
android:layout_height="wrap_content"
android:layout_below="@+id/dir_thumbnail"
android:layout_alignStart="@+id/dir_thumbnail"
android:layout_alignParentBottom="true"
android:layout_toStartOf="@+id/dir_location"
android:ellipsize="middle"
android:paddingTop="@dimen/medium_margin"