How best to implement a list with icons on the left and the text to the right of them? At the same time, the ability to localize the application is important, that is, the use of string resources.

  • what exactly are you interested in? What do you want in return? Ready code? - Vladyslav Matviienko
  • listView with custom layout? - ahgpoug
  • I would like to get possible solutions, a link to something that can help or an explanation. - Ivan
  • one
    You need a custom adapter. The concept is more than very widespread. google.com.ua/… - Vladyslav Matviienko

2 answers 2

You will need to customize the ListView . Try searching for a "Custom ListView Adapter " or "Custom ListView ". Here are a couple of links, maybe they meant it, First , Second .

    You can use CardView. Here is an example of markup for a single list item, with text and a picture.

     <android.support.v7.widget.CardView android:id="@+id/cv" android:layout_width="match_parent" android:layout_height="wrap_content"> <RelativeLayout style="@style/Wide" android:padding="16dp" android:background="#FFFFFF" > <ImageView android:layout_width="30dp" android:layout_height="30dp" android:id="@+id/imageView" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginRight="16dp" /> <TextView style="@style/Wrap" android:id="@+id/nameFolder" android:layout_toRightOf="@+id/imageView" android:layout_alignParentTop="true" android:textSize="10sp" android:textColor="#000000" /> </RelativeLayout> </android.support.v7.widget.CardView> 

    Link to article