Commit ee7d297c authored by Viktor De Pasquale's avatar Viktor De Pasquale

Partially reverted developer section changes

parent a70c0174
...@@ -106,7 +106,7 @@ sealed class DeveloperItem : ComparableRvItem<DeveloperItem>() { ...@@ -106,7 +106,7 @@ sealed class DeveloperItem : ComparableRvItem<DeveloperItem>() {
object App : DeveloperItem() { object App : DeveloperItem() {
override val items = override val items =
listOf(HomeItem.PayPal.App, HomeItem.Twitter.App) listOf(HomeItem.PayPal.App, HomeItem.Twitter.App)
override val icon = R.drawable.ic_mainline_dev override val icon = R.drawable.ic_app_dev
override val name = R.string.home_links_app override val name = R.string.home_links_app
} }
......
package com.topjohnwu.magisk.redesign.home package com.topjohnwu.magisk.redesign.home
import android.graphics.Insets import android.graphics.Insets
import android.os.Bundle
import android.view.View
import androidx.recyclerview.widget.LinearSnapHelper
import com.topjohnwu.magisk.R import com.topjohnwu.magisk.R
import com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding import com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding
import com.topjohnwu.magisk.redesign.compat.CompatFragment import com.topjohnwu.magisk.redesign.compat.CompatFragment
...@@ -21,8 +18,4 @@ class HomeFragment : CompatFragment<HomeViewModel, FragmentHomeMd2Binding>() { ...@@ -21,8 +18,4 @@ class HomeFragment : CompatFragment<HomeViewModel, FragmentHomeMd2Binding>() {
activity.title = resources.getString(R.string.section_home) activity.title = resources.getString(R.string.section_home)
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
LinearSnapHelper().attachToRecyclerView(binding.homeSupportList)
}
} }
\ No newline at end of file
...@@ -698,19 +698,35 @@ ...@@ -698,19 +698,35 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView <include
android:id="@+id/home_support_list" item="@{viewModel.items[0]}"
dividerHorizontal="@{R.drawable.divider_l1}" layout="@layout/item_developer"
itemBinding="@{viewModel.itemDeveloperBinding}" viewModel="@{viewModel}"
items="@{viewModel.items}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1"
android:layout_marginTop="@dimen/l1" android:layout_marginTop="@dimen/l1"
android:clipToPadding="false" android:layout_marginEnd="@dimen/l1" />
android:orientation="horizontal"
android:paddingStart="@dimen/l1" <include
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" item="@{viewModel.items[1]}"
tools:listitem="@layout/item_developer" /> layout="@layout/item_developer"
viewModel="@{viewModel}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1"
android:layout_marginTop="@dimen/l1"
android:layout_marginEnd="@dimen/l1" />
<include
item="@{viewModel.items[2]}"
layout="@layout/item_developer"
viewModel="@{viewModel}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1"
android:layout_marginTop="@dimen/l1"
android:layout_marginEnd="@dimen/l1" />
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment