Button 커스텀하기

material 디자인이 좋은 이유는 사용자와 상호작용이 가능하기 때문이다(?)

→ 반응형!!

커스텀하기 위해서는 무조건 AppCompatButton 버튼을 사용해야함

activity_login.xml

<androidx.appcompat.widget.AppCompatButton
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="12dp"
            android:layout_marginTop="25dp"
            android:layout_marginBottom="25dp"
            android:background="@drawable/white_roundedbutton"
            android:text="login"/>

white_roundedbutton.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="<http://schemas.android.com/apk/res/android>">

    <item
        android:state_pressed="true"> //-> 클릭된 상태
        <shape>
            <solid
                android:color="@color/purple_200"/>
            <stroke
                android:color="@color/purple_200"
                android:width="1dp"/>
            <corners
                android:radius="50dp"/>
        </shape>
    </item>

    <item
        android:state_pressed="false"> //-> 클릭 안된 상태
        <shape>
            <solid
                android:color="@android:color/white"/>
            <stroke
                android:color="@android:color/darker_gray"
                android:width="1dp"/>
            <corners
                android:radius="50dp"/>
        </shape>
    </item>
    
</selector>

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0d087c29-af43-4c24-b02c-46b7fbf7e09f/Untitled.png

Nav 만들기

menu 만들기

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/41757015-a90f-4834-8513-80b0c0e96261/Untitled.png