Closed roccadev closed 6 years ago
I'm using an ImageView with a VectorDrawable; when expansion_headerIndicator attribute is not set, the image is shown, but whet it's set to the ImageView's id, the image is not shown anymore. I have minSdk=21, tried on Android 8.0.
expansion_headerIndicator
<com.github.florent37.expansionpanel.ExpansionHeader android:layout_width="match_parent" android:layout_height="wrap_content" app:expansion_layout="@id/content" app:expansion_headerIndicator="@id/ivPanelIndicator" app:expansion_toggleOnClick="true"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" tools:text="Text" /> <ImageView android:id="@+id/ivPanelIndicator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:scaleType="center" android:adjustViewBounds="true android:src="@drawable/ic_keyboard_arrow_down_24dp" /> </LinearLayout> </com.github.florent37.expansionpanel.ExpansionHeader>
use AppCompatImageView and app:srcCompat
Thanks. Since the app namespace is required and it won't work with android, no matter the sdk version, I suggest to highlight this info in the Readme.
app
android
I'm using an ImageView with a VectorDrawable; when
expansion_headerIndicator
attribute is not set, the image is shown, but whet it's set to the ImageView's id, the image is not shown anymore. I have minSdk=21, tried on Android 8.0.