Drop dependency upon expansionpanel library
Deprecated Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -148,9 +148,6 @@ dependencies {
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:${versions.navigation}"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:${versions.navigation}"
|
||||
|
||||
//UI Addons
|
||||
implementation "com.github.florent37:expansionpanel:1.2.4"
|
||||
|
||||
//Easy Permission
|
||||
implementation "com.github.quickpermissions:quickpermissions-kotlin:0.4.1"
|
||||
|
||||
|
||||
@@ -21,8 +21,10 @@ package com.aurora.store.view.epoxy.views.app
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.view.isVisible
|
||||
import com.airbnb.epoxy.CallbackProp
|
||||
import com.airbnb.epoxy.ModelProp
|
||||
import com.airbnb.epoxy.ModelView
|
||||
@@ -92,12 +94,12 @@ class AppUpdateView : RelativeLayout {
|
||||
context.getString(R.string.details_changelog_unavailable)
|
||||
|
||||
B.headerIndicator.setOnClickListener {
|
||||
B.expansionLayout.let {
|
||||
if (it.isExpanded) {
|
||||
it.collapse(true)
|
||||
} else {
|
||||
it.expand(true)
|
||||
}
|
||||
if (B.txtChangelog.isVisible) {
|
||||
B.headerIndicator.load(R.drawable.ic_arrow_down)
|
||||
B.txtChangelog.visibility = View.GONE
|
||||
} else {
|
||||
B.headerIndicator.load(R.drawable.ic_arrow_up)
|
||||
B.txtChangelog.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
app/src/main/res/drawable/ic_arrow_down.xml
Normal file
10
app/src/main/res/drawable/ic_arrow_down.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_arrow_up.xml
Normal file
10
app/src/main/res/drawable/ic_arrow_up.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7.41,15.41L12,10.83l4.59,4.58L18,14l-6,-6 -6,6z" />
|
||||
</vector>
|
||||
@@ -29,13 +29,10 @@
|
||||
android:paddingStart="@dimen/padding_normal"
|
||||
android:paddingEnd="@dimen/padding_small">
|
||||
|
||||
<com.github.florent37.expansionpanel.ExpansionHeader
|
||||
<FrameLayout
|
||||
android:id="@+id/expansion_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:expansion_headerIndicator="@id/headerIndicator"
|
||||
app:expansion_layout="@id/expansionLayout"
|
||||
app:expansion_toggleOnClick="true">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/layout_content"
|
||||
@@ -119,7 +116,7 @@
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/margin_small"
|
||||
android:contentDescription="@string/details_changelog"
|
||||
app:srcCompat="@drawable/ic_arrow_right"
|
||||
app:srcCompat="@drawable/ic_arrow_down"
|
||||
app:tint="?colorControlNormal" />
|
||||
|
||||
<LinearLayout
|
||||
@@ -137,26 +134,19 @@
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</com.github.florent37.expansionpanel.ExpansionHeader>
|
||||
</FrameLayout>
|
||||
|
||||
<com.github.florent37.expansionpanel.ExpansionLayout
|
||||
android:id="@+id/expansionLayout"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_changelog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/expansion_header"
|
||||
android:layout_marginTop="@dimen/margin_small">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/txt_changelog"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignStart="@+id/txt_line1"
|
||||
android:layout_alignEnd="@id/txt_line1"
|
||||
android:background="@drawable/bg_changelog"
|
||||
android:ellipsize="end"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:singleLine="false"
|
||||
android:textIsSelectable="true"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line2" />
|
||||
</com.github.florent37.expansionpanel.ExpansionLayout>
|
||||
android:layout_marginTop="@dimen/margin_small"
|
||||
android:background="@drawable/bg_changelog"
|
||||
android:ellipsize="end"
|
||||
android:minHeight="?actionBarSize"
|
||||
android:singleLine="false"
|
||||
android:textAppearance="@style/TextAppearance.Aurora.Line2"
|
||||
android:textIsSelectable="true"
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user