问题
I've been working on an Android Application, and one of the major issues i've been trying to deal with is customization of a ListView or GridView.
Does anybody know how to make my app with a ListView or GridView to look very much like this?
回答1:
The most important thing to apply this kind of design is properly implement adapter, which will represent every piece of data (one video in your situation).
More or less in for situation it will look like:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
//you main picture
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
//layout to place other info like number of likes, comments, author etc.
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
//number of likes
<TextView ... >
//number of comments
<TextView ... >
...
</RelativeLayout>
</RelativeLayout>
Set those views in positions, which suit you.
来源:https://stackoverflow.com/questions/25042655/how-do-i-create-a-listview-like-the-youtube-app