how to design this UI
I am trying to design a UI as like in an iPhone app. The image of the design is as follows
In the above image all the white boxes are of a list view. In those list view i am placing an image View and two set of text view. I have placed a overall custom list view and in that custom list view using relative layout i have place the image view and two text view.
now i want to draw a line between the two text view and when i click on the second text view i am moving to a new activity. At that time i want to show that only the second t开发者_JS百科ext view is been clicked.
Use a RelativeLayout:
- The image android:layout_alignParenLeftt="true"
- the first two textViews android:layout_toRightOf="@id/myimage",
- the other textviews below the previous ones (e.g. android:layout_below="@id/author" and with a layout_width="fill_parent"
Check Romain Guy's blog post for a tutorial on a similar (simpler) setup: http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html
Check this http://www.androidsnippets.com/clickable-listview-items
The ClickableListAdapter bases on the API-Demo-Example "Efficient List Adapter". It was refactored to provide a better reusability. Additionally, you can connect OnClickListener and/or OnLongClickListener to each View of your list item. This allows you to create complex interactive lists, or simply using a customized checkbox version.
I had implemented this in a project minus the image view. Heres a screenshot.
精彩评论