방명록
- [Android] bringToFront() in xml2023년 10월 15일 13시 55분 51초에 업로드 된 글입니다.작성자: 핀수728x90반응형
어떤 뷰를 레이아웃 가장 최상단에 위치시키기 위해 bringToFront 메소드를 사용한다.
xml에서는 어떻게 해당 메소드와 같은 효과를 내는 속성을 줄 수 있을까?
위 사진에 있는 bringToFront()의 설명을 읽어보면
트리에서 뷰의 z 순서를 변경하여 다른 형제 뷰 위에 오도록 합니다.
z의 순서를 변경한다고 되어있다.
그래서 translationZ 의 값을 주어 적용했다.
android:translationZ="90dp"
translationZ 값이 큰 것이 가장 최상단, 그러니까 화면 앞에 존재하게 된다.
공부하며 작성된 글이라 잘못된 정보가 있을 수 있습니다.
말씀해주시면 수정하겠습니다. 감사합니다.
References
아래 글을 참고하여 작성 되었습니다.
View | Android Developers
developer.android.com
How to bring view in front of everything?
I have activity and a lot of widgets on it, some of them have animations and because of the animations some of the widgets are moving (translating) one over another. For example the text view is mo...
stackoverflow.com
728x90반응형'pinslog > Log.daily()' 카테고리의 다른 글
[Kotlin] 반복문 탈출하기 (0) 2023.10.17 [Android] 디버그 가능 APK 또는 Android App Bundle을 업로드했습니다. 보안상의 이유로 Google Play에 게시하기 전에 디버그를 사용 중지해야 합니다. (0) 2023.10.16 [Android] ProgressBar 색상 변경하기 (0) 2023.10.14 [Android] 기존 버튼에 ripple 효과주기 (0) 2023.10.12 [Kotlin] 마지막 요소를 제거한 리스트를 얻고 싶을 때 (0) 2023.10.10 다음글이 없습니다.이전글이 없습니다.댓글