Panel

Panels are useful for housing distinct areas of related content. Unlike cards these are not clickable.

Panel

Maven Central Class reference Source code

All

Day Night
Panel component Panel component - dark mode

Installation

Backpack Android is available through Maven Central. Check the main Readme for a complete installation guide.

Usage

The Panel component can be used in both XML and Kotlin

Example of a padded panel in XML


                                                
                                                <net.skyscanner.backpack.panel.BpkPanel
                                                    android:layout_width="match_parent"
                                                    android:layout_height="match_parent"
                                                    app:padding="true">
                                                
                                                    <TextView
                                                        android:layout_width="match_parent"
                                                        android:layout_height="match_parent"
                                                        android:text="panel message" />
                                                </net.skyscanner.backpack.panel.BpkPanel>

Example of a padded panel in Kotlin


                                                
                                                import net.skyscanner.backpack.panel.BpkPanel
                                                
                                                BpkPanel(context).apply {
                                                   padding = true
                                                }