App노자

[Android] <include> tag 본문

Android/AndroidStudio

[Android] <include> tag

앱의노예 2023. 4. 19. 20:24

1. include tag란?


 

 

 

 

https://developer.android.com/develop/ui/views/layout/improving-layouts/reusing-layouts?hl=ko 

 

로 레이아웃 재사용  |  Android 개발자  |  Android Developers

Android에서는 다양한 위젯을 통해 재사용 가능한 작은 상호작용 요소를 제공하지만, 특수 레이아웃이 필요한 큰 구성요소를 재사용해야 할 수도 있습니다. 전체 레이아웃을 효율적으로 재사용하

developer.android.com

 

https://developer.android.com/develop/ui/views/components/floating-action-button

 

Add a Floating Action Button  |  Android Developers

Add a Floating Action Button Stay organized with collections Save and categorize content based on your preferences. Try the Compose way Jetpack Compose is the recommended UI toolkit for Android. Learn how to add components in Compose. A floating action but

developer.android.com

2. xml


    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_marginEnd="@dimen/fab_margin"
        android:layout_marginBottom="16dp"
        app:srcCompat="@android:drawable/ic_dialog_email" />

 

 

 

 

3. 


<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/shape_radius_button_blue" android:state_pressed="false" android:state_selected="false" />
    <item android:drawable="@drawable/shape_radius_button_blue_pressed" android:state_pressed="true" />
    <item android:drawable="@drawable/shape_radius_button_blue_pressed" android:state_pressed="false" android:state_selected="true" />
</selector>

'Android > AndroidStudio' 카테고리의 다른 글

[Android] customSelectionActionMode 구현 방법  (0) 2023.04.29
[Android] DialogFragment란  (0) 2023.04.22
[Android] Dialog란  (0) 2023.04.13
[Kotlin] ViewPager2란  (0) 2023.04.03
[Android] Button pressed effect 구현 방법  (0) 2023.03.31