I needed to implement a layout which is similar to Google Chrome's stack of tabs as shown below .
Are there any libraries available for this ?
You need to create a set custom drawables for each aspect of the card and use them in the layout. You can use table layout for this purpose.
For example to put a background with corners you can create a drawable as follows:
Add new drwabe resource as follows:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<corners android:radius="5dp"/>
<stroke android:width="1dp" android:color="choose the color which you want"/>
<padding android:top="10dp" android:left="10dp" android:bottom="10dp"
android:right="10dp"/>
</shape>
Create a custom style and use the above drawable as background:
<style name="ContactTextView">
<item name="android:background">@drawable/drawableName</item>
// add other items
</style>
Apply the style on each item in your layout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With