0101011001010111

리싸이클뷰 + 커스텀뷰 해서 애플마켓 만들기 본문

Kotlin/스파르타_코틀린 문법

리싸이클뷰 + 커스텀뷰 해서 애플마켓 만들기

[진주] 2023. 8. 29. 20:29
728x90
반응형

일단 item을 이렇게 만들어주었다.

 

뼈대 

 

<?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="120dp">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/items_image_box"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        app:layout_constraintWidth_percent="0.3"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        />



<!--정보 : 제목 , 주소 , [가격, 댓글+좋아요]-->


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/items_informationbox"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        app:layout_constraintStart_toEndOf="@+id/items_image_box"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/items_informationbox_title"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintHeight_percent="0.4"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent">

        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/items_informationbox_address"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintHeight_percent="0.2"
            app:layout_constraintTop_toBottomOf="@+id/items_informationbox_title">

        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/items_informationbox_priceAndEct"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintTop_toBottomOf="@+id/items_informationbox_address"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/items_informationbox_priceAndEct_Price"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                app:layout_constraintWidth_percent="0.5"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintBottom_toBottomOf="parent">

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/items_informationbox_priceAndEct_Ect"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                app:layout_constraintWidth_percent="0.5"
                app:layout_constraintStart_toEndOf="@+id/items_informationbox_priceAndEct_Price"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintBottom_toBottomOf="parent">

            </androidx.constraintlayout.widget.ConstraintLayout>







        </androidx.constraintlayout.widget.ConstraintLayout>


    </androidx.constraintlayout.widget.ConstraintLayout>



</androidx.constraintlayout.widget.ConstraintLayout>

이제 쇽쇽쇽쇽 넣어줘볼까 ?! 

 

 

 

728x90
반응형