1 | initial version |
You can set the height of the ListView to the height of one item using the following steps in Android Studio:
android:layout_height="wrap_content"
android:maxHeight="your_item_height"
Replace "youritemheight" with the height of one item in your ListView. You can either hardcode the value or calculate it programmatically. 3. Run your app and observe the ListView. It should now only display one item with no extra space above or below it.