-
Notifications
You must be signed in to change notification settings - Fork 1
fix: 글자 커서 색상 변경 #827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 글자 커서 색상 변경 #827
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,4 +16,8 @@ | |||||||||||||||
| <item name="android:textColor">@color/bg_detail_explore_chip_text_selector</item> | ||||||||||||||||
| <item name="chipCornerRadius">8dp</item> | ||||||||||||||||
| </style> | ||||||||||||||||
| </resources> | ||||||||||||||||
|
|
||||||||||||||||
| <style name="Theme.Websoso.EditText" parent=""> | ||||||||||||||||
| <item name="colorControlActivated">@color/primary_100_6A5DFD</item> | ||||||||||||||||
| </style> | ||||||||||||||||
|
Comment on lines
+20
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# 기준 테마와 EditText 오버레이가 어떤 커서 관련 속성을 선언하는지 확인합니다.
rg -n -C2 'Theme\.Websoso\.EditText|textCursorDrawable|colorControlActivated' \
app/src/main/res/values/styles.xml \
app/src/main/res/values/themes.xmlRepository: Team-WSS/WSS-Android Length of output: 1016 커서 색상을 실제로 바꾸려면
수정 예시 <style name="Theme.Websoso.EditText" parent="">
<item name="colorControlActivated">@color/primary_100_6A5DFD</item>
+ <item name="android:textCursorDrawable">@color/primary_100_6A5DFD</item>
</style>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 토끼 리뷰처럼 textCursorDrawable를 사용하지 않은 이유도 궁금합니다! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||
| </resources> | ||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 부분 보다가 궁금한 점이 있어서요!
기존에는 색상 리소스를 colors에 정의해서 사용하는 경우가 많았던 것 같은데, 이번에는 styles 쪽에서colorControlActivated로 연결해주셨더라고요.
혹시 이렇게 스타일로 분리해서 적용하신 이유나 기준이 있을까요?
저도 이후 작업할 때 같은 기준으로 맞추고 싶어서 여쭤봅니다 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
선택 손잡이(handle) 부분을 colorControlActivated(?)로 구현한게 맞는지? 이걸로 구현하신 이유가 뭔지도 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compose는 MaterialTheme에 속성값을 추가하여 모든 TextField에 전체적용을 할 수 있는데, xml은 일일이 모든 editText에 속성값을 넣어야 하는걸로 알고 있습니다.
그리고 안드로이드 시스템에서 물방울 손잡이? 와 커서 선 색상은 xml에서 직접적인 속성값이 없고 colorControlActivated 이걸 따라가는 걸로 알고있습니다. 그래서 theme를 만들어 edittext에 적용했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
textCursorDrawable 이건 속성값을 지정하는 거라 theme로 설정하면 theme값을 따라가는 것으로 알고있습니다!