分类页适配高 DPI 设备

This commit is contained in:
chenjuntao
2018-06-28 10:41:13 +08:00
parent aaa9aab066
commit 37b6e6bce0
4 changed files with 12 additions and 7 deletions

View File

@ -55,7 +55,7 @@ class CategoryDirectoryAdapter(context: Context, var categoryTitle: String) : Li
unexpandableCategoryList.forEachIndexed({ index, c ->
when (index % 3) {
0 -> {
val params = LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.MATCH_PARENT)
val params = LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT)
if (subCategoryView != null) params.setMargins(0, marginTop, 0, 0)
subCategoryView = SubCategoryView(binding.root.context)