diff --git a/app/src/main/java/com/gh/common/view/NestedRecyclerView.kt b/app/src/main/java/com/gh/common/view/NestedRecyclerView.kt index bf8cdce203..99744a2504 100644 --- a/app/src/main/java/com/gh/common/view/NestedRecyclerView.kt +++ b/app/src/main/java/com/gh/common/view/NestedRecyclerView.kt @@ -1,6 +1,7 @@ package com.gh.common.view import android.content.Context +import android.os.Build import android.support.v4.view.NestedScrollingParent import android.support.v7.widget.RecyclerView import android.util.AttributeSet @@ -84,7 +85,9 @@ open class NestedRecyclerView : RecyclerView, NestedScrollingParent { nestedScrollTargetWasUnableToScroll = false } - super.onNestedScrollAccepted(child, target, axes) + if (Build.VERSION.SDK_INT >= 21) { + super.onNestedScrollAccepted(child, target, axes) + } } diff --git a/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt b/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt index 2e42b7cb08..9c809e4709 100644 --- a/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt @@ -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) diff --git a/app/src/main/res/layout/game_horizontal_list.xml b/app/src/main/res/layout/game_horizontal_list.xml index e160152e3b..90a2b373f9 100644 --- a/app/src/main/res/layout/game_horizontal_list.xml +++ b/app/src/main/res/layout/game_horizontal_list.xml @@ -9,7 +9,9 @@ + android:layout_height = "wrap_content" + android:paddingLeft = "5dp" + android:paddingRight = "5dp"/> diff --git a/app/src/main/res/layout/item_category.xml b/app/src/main/res/layout/item_category.xml index 00a945e889..abbb83070c 100644 --- a/app/src/main/res/layout/item_category.xml +++ b/app/src/main/res/layout/item_category.xml @@ -56,7 +56,7 @@ diff --git a/app/src/main/res/layout/layout_sub_category.xml b/app/src/main/res/layout/layout_sub_category.xml index 2cca492f79..42acc4f9e6 100644 --- a/app/src/main/res/layout/layout_sub_category.xml +++ b/app/src/main/res/layout/layout_sub_category.xml @@ -1,13 +1,14 @@