What is the Best Way to Display 40+ AutoCompleteTextViews and EditTexts in UI? Android Studio – Kotlin

I have a fragment which can have 20+ AutoCompleteTextViews and 20+ TextInputEditTexts – all of these are wrapped within their own TextInputLayout. The top level is a NestedScrollView and all of the text fields are located within a ConstraintLayout. How can I efficiently display these without losing frames and experiencing lag? On high-end devices, it works as expected, but on low-end devices, the user experiences a brief lag while the UI renders. I’ve thought about RecyclerView but I’ve read that it’s not recommended when using any sort of EditText, especially if the entered text needs to be stored in local variables, which they do. I’ve also experimented with ViewStubs, which mainly just shifts when the lag happens.

Below is an example of how my UI is currently built. This code repeats with just the IDs, Hints and constraints changing.

<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
app:layout_constraintTop_toBottomOf="@+id/warningLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="100dp">


<androidx.constraintlayout.widget.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".main.TestFragment">

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/genericLabel"
        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:hint="Test"
        android:padding="10dp"
        android:textColorHint="@color/gray"
        app:boxStrokeColor="@color/lightblue"
        app:cursorColor="@color/darkblue"
        app:hintTextColor="@color/darkblue"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <AutoCompleteTextView
            android:id="@+id/generic"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:cursorVisible="false"
            android:ems="10"
            android:minHeight="48dp"
            android:paddingStart="10dp"
            android:textColor="@color/darkblue"
            android:textSize="15sp"
            android:textStyle="bold"
            tools:ignore="SpeakableTextPresentCheck" />
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/genericCommentsLabel"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:hint="Comments"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/genericLabel"
        android:padding="10dp"
        app:hintTextColor="@color/darkblue"
        android:textColorHint="@color/gray"
        app:boxStrokeColor="@color/lightblue"
        app:cursorColor="@color/darkblue">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/genericComments"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:ems="10"
            android:minHeight="48dp"
            android:paddingStart="10dp"
            android:textColor="@color/darkblue"
            android:textSize="15sp"
            android:textStyle="bold"
            android:maxLength="60"
            android:inputType="textCapSentences"/>
    </com.google.android.material.textfield.TextInputLayout>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật