Contact application, for example, a scrollable list on Android

I am writing my first Android application (I am noob in android, but decent in java). The first screen of the application consists of a huge list (about 1.5K elements) of Manga objects. The code I use is as follows:

main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android">
        <ListView android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:id="@+id/android:list"></ListView>
        <TextView android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:text="@string/list_no_items"
            android:id="@+id/android:empty"></TextView>
</LinearLayout>

row.xml:

<LinearLayout android:id="@+id/LinearLayout01"
              android:layout_width="fill_parent" 
              android:layout_height="?android:attr/listPreferredItemHeight"
              android:padding="6dip"
              xmlns:android="http://schemas.android.com/apk/res/android">
    <ImageView
        android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_marginRight="6dip"
        android:src="@drawable/icon" />
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="0dip"
        android:layout_weight="1"
        android:layout_height="fill_parent">
        <TextView
            android:id="@+id/toptext"
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:gravity="center_vertical"
        />
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1" 
            android:id="@+id/bottomtext"
            android:singleLine="true"
            android:ellipsize="marquee"
        />
    </LinearLayout>
</LinearLayout>

, Manga toptext, . ( , ), . , . , -? , , , , , ( ), , ?

+3
1

, ListView main.xml :

<ListView android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:id="@+id/android:list"
        android:fastScrollEnabled="true"></ListView>

android:fastScrollEnabled="true".

https://developer.android.com/reference/android/widget/AbsListView.html#attr_android:fastScrollEnabled

SectionIndexer.

+7

Source: https://habr.com/ru/post/1740446/


All Articles