인프런 커뮤니티 질문&답변
item들의 간격이 너무 크게 나옵니다
작성
·
649
0


이렇게 너무 아이템들이 각각 크게 나오는데 이런경우는 뭐가 문제일까요?
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_height="match_parent"
android:layout_width="match_parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>위의 코드는 activitymain의 layout입니다
퀴즈
51%나 틀려요. 한번 도전해보세요!
ListView와 비교했을 때 RecyclerView의 주요 성능상 이점은 무엇일까요?
더 적은 메모리를 사용합니다.
뷰 재활용을 통해 스크롤 성능이 우수합니다.
아이템 클릭 처리가 더 간단합니다.
데이터 모델 연결이 자동으로 이루어집니다.






layout_height 를 100dp로 조절한 코드입니다 그런데도 너무나도 크게 나오네요