На прошлой неделе я начал разрабатывать приложение для Android и почти сделал часть кодирования, но дизайн макета для приложения слишком запутан... Ниже представлен дизайн, который я хотел,
Кто-нибудь, пожалуйста, дайте мне часть кодирования, чтобы создать дизайн/макет. Спасибо заранее...
Посмотрите на код. Это даст результат точно так же, как вы хотите. Не забудьте проголосовать за ответ.
посмотрите здесь также
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="#ffffff">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/a_thumb" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="name"
android:textColor="#000000"
android:layout_marginBottom="5dip" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="data"
android:textColor="#000000" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time-Like-Comment"
android:textColor="#000000"
android:typeface="sans"
android:textSize="12sp"
android:layout_marginTop="5dip" />
</LinearLayout>
</LinearLayout>
Спасибо Дипак
Это может быть полезно - http://developer.android.com/resources/articles/layout-tricks-efficiency.html.
Также читайте о ListView (http://developer.android.com/resources/tutorials/views/hello-listview.html)
Вы должны проверить, создать пользовательское listview, и все, что вам нужно, может быть легко достигнуто.
Проверьте здесь, http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/