Here is my panel example
<LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginBottom="10dp" android:background="@drawable/border"> <TextView android:text="@string/panel_title" android:id="@+id/groupTitle" android:paddingLeft="5dp" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/blue" /> Here you add panel content... </LinearLayout>
You also need to add to drawable resource broder.xml
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="3dip" android:color="#d3d3d3" /> </shape>
And color in values โโ/Colors.xml
<?xml version="1.0" encoding="utf-8" ?> <resources> <item name="blue" type="color">#FF33B5E5</item> </resources>
And the name of the panel in the values โโ/Strings.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="panel_title">Panel 1</string> </resources>
As for the buttons and animations, which can be added separately.
Senad mulaosmanoviฤ
source share