diff --git a/app/build.gradle b/app/build.gradle index 5accc54a8..d4ebe9100 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -129,7 +129,6 @@ dependencies { //Google's Goodies implementation "com.google.android.material:material:1.9.0" - implementation "com.google.android.flexbox:flexbox:3.0.0" implementation "com.google.code.gson:gson:2.10.1" //AndroidX diff --git a/app/src/main/java/com/aurora/store/view/epoxy/controller/FlexLayoutManager.kt b/app/src/main/java/com/aurora/store/view/epoxy/controller/FlexLayoutManager.kt deleted file mode 100644 index 5669bdd83..000000000 --- a/app/src/main/java/com/aurora/store/view/epoxy/controller/FlexLayoutManager.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Aurora Store - * Copyright (C) 2021, Rahul Kumar Patel - * - * Aurora Store is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * Aurora Store is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Aurora Store. If not, see . - * - */ - -package com.gara.store.view.epoxy.controller - -import android.content.Context -import android.util.AttributeSet -import android.view.ViewGroup -import androidx.recyclerview.widget.RecyclerView -import com.google.android.flexbox.FlexboxLayoutManager - -class FlexLayoutManager : FlexboxLayoutManager { - constructor(context: Context?) : super(context) - constructor(context: Context?, flexDirection: Int) : super(context, flexDirection) - constructor(context: Context?, flexDirection: Int, flexWrap: Int) : super( - context, - flexDirection, - flexWrap - ) - - constructor( - context: Context?, - attrs: AttributeSet?, - defStyleAttr: Int, - defStyleRes: Int - ) : super(context, attrs, defStyleAttr, defStyleRes) - - override fun generateLayoutParams(lp: ViewGroup.LayoutParams): RecyclerView.LayoutParams { - return LayoutParams(lp) - } -} \ No newline at end of file diff --git a/app/src/main/java/com/aurora/store/view/ui/onboarding/AccentFragment.kt b/app/src/main/java/com/aurora/store/view/ui/onboarding/AccentFragment.kt index a1eaf48b5..2e787b26b 100644 --- a/app/src/main/java/com/aurora/store/view/ui/onboarding/AccentFragment.kt +++ b/app/src/main/java/com/aurora/store/view/ui/onboarding/AccentFragment.kt @@ -29,6 +29,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewAnimationUtils import android.view.ViewGroup +import androidx.recyclerview.widget.StaggeredGridLayoutManager import com.aurora.store.R import com.aurora.store.data.model.Accent import com.aurora.store.databinding.FragmentOnboardingAccentBinding @@ -44,7 +45,6 @@ import com.aurora.store.util.save import com.aurora.store.view.custom.CubicBezierInterpolator import com.aurora.store.view.epoxy.views.AccentViewModel_ import com.aurora.store.view.ui.commons.BaseFragment -import com.gara.store.view.epoxy.controller.FlexLayoutManager import com.google.gson.reflect.TypeToken import java.nio.charset.StandardCharsets import kotlin.math.sqrt @@ -94,7 +94,8 @@ class AccentFragment : BaseFragment() { private fun attachRecycler() { with(B.epoxyRecycler) { - layoutManager = FlexLayoutManager(requireContext()) + setHasFixedSize(true) + layoutManager = StaggeredGridLayoutManager(5, StaggeredGridLayoutManager.VERTICAL) } }