user interface - How is this android UI element created -


i design of screen - can suggest how doing label/text part has time in - square type element rounded corners:

http://40.media.tumblr.com/bba2d04346d2d491b75a86f41bcf46fb/tumblr_ndaew2owqv1r2wjwko3_1280.png

http://41.media.tumblr.com/b737ee9a30581c5843d85c43617685bf/tumblr_ndaew2owqv1r2wjwko4_1280.png

i try , similar, thx

i think looking layout this.change orientation , colors need , add elements need in each layout.you can see original view after run in emulator or device only,so after creating run layout.

layout:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"      android:layout_width="fill_parent"     android:layout_height="200dp"     android:orientation="vertical"     android:weightsum="3"     android:layout_margin="50dp"     >        <linearlayout          android:layout_width="fill_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:background="@drawable/rectangle_topcorner">           <textview android:layout_width="fill_parent"          android:layout_height="wrap_content"          android:text="email:"          android:layout_gravity="center"          android:textcolor="@android:color/white"          android:layout_marginleft="10dip"          />     </linearlayout>     <linearlayout         android:id="@+id/button2"         android:layout_width="fill_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:background="#002233">            <textview android:layout_width="fill_parent"          android:layout_height="wrap_content"          android:text="name:"          android:textcolor="@android:color/white"          android:layout_gravity="center"          android:layout_marginleft="10dip"          /> </linearlayout>     <linearlayout         android:id="@+id/button3"         android:layout_width="fill_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:background="@drawable/rectangle_bottemcorner">           <textview android:layout_width="fill_parent"          android:layout_height="wrap_content"          android:text="username:"          android:textcolor="@android:color/white"          android:layout_gravity="center"          android:layout_marginleft="10dip"          /> </linearlayout> </linearlayout> 

drawables:

rectangle_bottemcorner.xml

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"     android:shape="rectangle"     android:id="@+id/background_shape"     > <corners android:bottomleftradius="20dp"     android:bottomrightradius="20dp"/> <solid android:color="#005577"/>  </shape> 

rectangle_topcorner.xml

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"     android:shape="rectangle"     android:id="@+id/background_shape"      > <corners android:topleftradius="20dp"     android:toprightradius="20dp"     /> <solid android:color="#005577"/>  </shape> 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -