How to create this type of panels in Android? -


i've seen type of panels (white ones shadow border @ bottom) , use them in apps.

https://lh6.ggpht.com/i_ruuvi7g2um1ebn5hacjqvqk_k1thmiw7ynac4hwwud1_j1g03mkmbafu0n5ja2ya=h900-rw

what kind of panels , how can create them?

thanks in advance

/drawable/panel_bg.xml

<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">      <!-- bottom 3dp shadow -->     <item>         <shape android:shape="rectangle">          <solid android:color="#c7c6c5" />         <corners android:radius="4dp" />      </shape>     </item>      <!-- white top color -->     <item android:bottom="4px">          <shape android:shape="rectangle">          <solid android:color="@color/white" />         <corners android:radius="4dp" />           </shape>      </item>  </layer-list> 

/layout/test.xml

<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android"     android:id="@+id/scrollview1"     android:layout_width="match_parent"     android:layout_height="match_parent" >      <linearlayout         android:id="@+id/linearlayout1"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="vertical" >          <linearlayout             android:id="@+id/linearlayout2"             android:layout_width="match_parent"             android:layout_height="100dp"             android:layout_marginleft="8dp"             android:layout_marginright="8dp"             android:layout_margintop="5dp"             android:background="@drawable/panel_bg"             android:orientation="vertical" >              <textview                 android:id="@+id/tv1"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_marginleft="8dp"                 android:layout_marginright="8dp"                 android:layout_margintop="8dp"                 android:text="hello world"                 android:textcolor="#cccccc"                 android:textsize="14sp" />              <textview                 android:id="@+id/tv2"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:text="1234567890"                 android:textcolor="#cccccc"                 android:textsize="14sp" />         </linearlayout>          <linearlayout             android:id="@+id/linearlayout3"             android:layout_width="match_parent"             android:layout_height="80dp"             android:layout_marginleft="8dp"             android:layout_marginright="8dp"             android:layout_margintop="10dp"             android:background="@drawable/panel_bg"             android:orientation="vertical" >             <textview                 android:id="@+id/tv3"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_marginleft="8dp"                 android:layout_marginright="8dp"                 android:layout_margintop="4dp"                 android:text="hellllooo"                 android:textsize="16sp" />              <textview                 android:id="@+id/tv4"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:text="ashkdhakhd"                 android:textcolor="#38b6ab"                 android:textsize="32sp" />         </linearlayout>     </linearlayout>  </scrollview> 

or can create custom listview


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -