How to make a ListView responsive?

1

I wanted the items in ListView to appear with a responsive size at different screen resolution, how do I? Because I set a size of the images and text, which gets big on small devices

Listview Items:     

android:orientation="vertical">

<LinearLayout 
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:padding="5sp">

    <ImageView
        android:id="@+id/imagemview"
        android:layout_width="150dp"
        android:layout_height="150dp"
          android:layout_marginLeft="5sp"
        />

    <TextView
        android:id="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:textSize="20dp"
        android:layout_marginLeft="25sp"
        android:textStyle="bold"

        android:gravity="center_vertical"
        android:textColor="#FF000000"
    />

</LinearLayout>

How do I open normal on different screen sizes?

    
asked by anonymous 12.01.2015 / 13:40

1 answer

0

Use dimens to set the size of items for each screen.

<resources>
    <dimen name="action_button_min_width">56dp</dimen>
    <dimen name="indeterminate_progress_size">32dp</dimen>
</resources>

Referral link: Android Developers - dimen.xml

    
28.01.2015 / 16:20