ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [안드로이드] RecyclerView 항목 사이에 가로선 넣기
    카테고리 없음 2024. 4. 11. 20:45

    사용법

    사용법은 아주 간단하다.

    아래 코드만 호출해주면 된다.

    fun addLine(recyclerView: RecyclerView) {
        // this는 액티비티 클래스이다.
        val dividerItemDecoration = DividerItemDecoration(this, LinearLayout.VERTICAL)
        addItemDecoration(dividerItemDecoration)
    }

Designed by Tistory.