diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt index 09136d02..7394ec31 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/HomeFragment.kt @@ -72,23 +72,24 @@ class HomeFragment : Home() { } } - view.findViewById(R.id.viewpager_container).visibility = View.VISIBLE - view.findViewById(R.id.changelog_button).setOnClickListener { cardExpandCollapse() - } } + } private fun cardExpandCollapse() { - val viewPagerContainer = view?.findViewById(R.id.viewpager_container) + val viewPagerContainer = view?.findViewById(R.id.viewpager) + val tabLayoutContainer = view?.findViewById(R.id.tablayout) val arrow = view?.findViewById(R.id.changelog_button) val arrowAnimation: RotateAnimation if (isExpanded) { viewPagerContainer?.visibility = View.GONE + tabLayoutContainer?.visibility = View.GONE isExpanded = false arrowAnimation = RotateAnimation(180f, 0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f) } else { viewPagerContainer?.visibility = View.VISIBLE + tabLayoutContainer?.visibility = View.VISIBLE isExpanded = true arrowAnimation = RotateAnimation(0f, 180f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f) } diff --git a/app/src/main/res/layout/include_changelogs.xml b/app/src/main/res/layout/include_changelogs.xml index ad4fb20b..ed3a8393 100644 --- a/app/src/main/res/layout/include_changelogs.xml +++ b/app/src/main/res/layout/include_changelogs.xml @@ -28,34 +28,26 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/arrow_down" - android:backgroundTint="@android:color/transparent" - android:layout_alignParentEnd="true" /> + android:layout_alignParentEnd="true" + android:background="@android:color/transparent"/> - + android:background="?colorSurfaceVariant" + app:tabIndicatorColor="?colorPrimary" + app:tabSelectedTextColor="?colorPrimary" + app:tabTextColor="?colorPrimary" + app:layout_constraintTop_toBottomOf="parent" /> - - - - - +