Backpack Android is available through Jitpack. Check the main Readme for a complete installation guide.
BpkCardView
is an extension of CardView
in com.android.support:cardview-v7
The Card component can be used in both XML and Kotlin
Example of a padded and focused card in XML
<net.skyscanner.backpack.card.BpkCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:foreground="?android:attr/selectableItemBackground"
app:focused="true"
app:cornerStyle="small">
<net.skyscanner.backpack.text.BpkText
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/stub_md" />
</net.skyscanner.backpack.card.BpkCardView>
Example of a padded and focused card in Kotlin
import net.skyscanner.backpack.card.BpkCardView
BpkCardView(context).apply {
padded = true
focused = true
cornerStyle = BpkCardView.CornerStyle.SMALL
}