Designing layout android -


i trying create list view show details post. that, have created xml file designing list item.

enter image description here

this final want activity. far have succeeded dealing rounded corners, image buttons , texts, trying while deal left side of text box. want have sharp tip. still can't handle it.

i add xml files show did.

**this xml file list item**  <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="300dp"     android:layout_height="160dp">      <linearlayout android:id="@+id/desclayout"         android:layout_width="240dp"         android:layout_height="140dp"         android:background="@drawable/layout_my_posts_selector"         android:layout_marginright="5dp">          <textview             android:id="@+id/mypostdescription"             android:layout_width="fill_parent"             android:layout_height="fill_parent"             android:gravity="left"             android:maxlength="120"             android:hint="@string/description"             android:inputtype="textmultiline"             android:lines="4"             android:maxlines="5"             android:paddingbottom="8dp"             android:textcolorhint="#f7941e"             android:paddingleft="10dp"             android:paddingright="10dp"             android:paddingtop="8dp"             android:textcolor="#6d6e71"             android:scrollbars="vertical"             android:textsize="14sp">         </textview>     </linearlayout>     <linearlayout         android:layout_width="match_parent"         android:layout_torightof="@+id/desclayout"         android:background="@drawable/description_layout_my_posts_selector"         android:orientation="vertical"         android:paddingleft="7dp"         android:layout_height="140dp">          <imagebutton             android:id="@+id/acceptmypostbtn"             android:layout_width="40dp"             android:background="@drawable/my_posts_button_selector"             android:layout_margintop="5dp"             android:layout_height="40dp"             android:src="@drawable/v"/>          <imagebutton             android:id="@+id/closemypostbtn"             android:layout_width="40dp"             android:background="@drawable/my_posts_button_selector"             android:layout_below="@id/acceptmypostbtn"             android:layout_height="40dp"             android:layout_margintop="5dp"             android:src="@drawable/x"/>          <imagebutton             android:id="@+id/showonmapmypost"             android:layout_width="40dp"             android:src="@drawable/location"             android:background="@drawable/my_posts_button_selector"             android:layout_margintop="5dp"             android:layout_height="40dp"/>     </linearlayout>     <linearlayout         android:layout_width="fill_parent"         android:layout_below="@+id/desclayout"         android:paddingleft="6dp"         android:background="#2d2d2d"         android:layout_height="20dp">          <textview             android:layout_width="fill_parent"             android:textcolor="@android:color/background_light"             android:text="finished @ 19/01/2013 13:55"             android:layout_height="fill_parent" />     </linearlayout> </relativelayout> 

layout_my_posts_selector

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android">      <solid android:color="#f1f1f2"/>      <stroke android:width="3dp"  android:color="#2d2d2d" />      <corners android:topleftradius="7dp" android:bottomleftradius="7dp"/>      <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> </shape> 

description_layout_my_posts_selector

<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android">     <solid android:color="#e7e8ea"/>     <stroke android:width="3dp" android:color="#2d2d2d" />     <corners android:toprightradius="7dp" android:bottomrightradius="7dp"/>     <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> </shape> 

this how looksenter image description here

if can please guide me how deal sharp tip thankful!

thanks in advance, eden

while using separate background xml file idea, suggest use drawable instead background. can design background image 'sharp tip' on left in photoshop or paint.net , set property android:background=@drawable/background_design 'background design' name of design drawable file.

programming take more resources render design. not practice use in listview. best performance go drawable static layout.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -