My application displays a list of elements, where each line is the title of the element with its own images, the line reserves 70% of the space for text and 30% for the image. Imagine what the iphone app store looks like. What kind of layout / layout compilation is recommended for this purpose?
I found google and found this article:
http://www.curious-creature.org/2009/02/22/android-layout-tricks-1/
Is this opinion good?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:padding="6dip"> <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_marginRight="6dip" android:src="@drawable/icon" /> <TextView android:id="@+id/secondLine" android:layout_width="fill_parent" android:layout_height="26dip" android:layout_toRightOf="@id/icon" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:singleLine="true" android:ellipsize="marquee" android:text="Simple application that shows how to use RelativeLayout" /> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_toRightOf="@id/icon" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:layout_above="@id/secondLine" android:layout_alignWithParentIfMissing="true" android:gravity="center_vertical" android:text="My Application" />
" iPhone- ", " " (, , , iPhone-), , , . "" RelativeLayout, . , , , , , LinearLayout LinearLayout, . . , LinearLayout.
RelativeLayout
. , , ListView. , ListViews, . , . , , , convertView.
: , , , .
ListView . ListAdapter (SimpleAdapter/ArrayAdapter), . , , , getView .
Source: https://habr.com/ru/post/1739236/More articles:Configuring apache mod-vhost-alias - apache2How to check and compare possible combinations of array elements - javaAndroid: unable to set upContentView when switching to ListActivity - androidVisual C # GUI Designer - Recommended Way to Remove Generated Event Handler - c #C ++ memory allocation and implementation of linked lists - c ++C # - Timer Based Screenshot - c #Why are some of my views not matching correctly at the bottom of my relative layout? - androidHow do interpreters written in a C ++ class basically - c ++Хороший пакет для установки полиномиальных линий тренда - c++Copy one toothed array to another - c #All Articles