Skip to content

fix: 글자 커서 색상 변경#827

Open
Sadturtleman wants to merge 1 commit intodevelopfrom
fix/821
Open

fix: 글자 커서 색상 변경#827
Sadturtleman wants to merge 1 commit intodevelopfrom
fix/821

Conversation

@Sadturtleman
Copy link
Contributor

@Sadturtleman Sadturtleman commented Mar 8, 2026

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • 검색, 게시글 댓글, 피드 작성 부분 색상 변경

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

image

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

UI가 xml 형태로 되어있어 전체 적용이 불가능합니다. 추후 compose로 변경되면 MaterialTheme에서 적용하면 될듯 합니다.

Summary by CodeRabbit

변경 사항

  • Style (스타일)
    • 텍스트 입력 필드의 강조 색상(텍스트 선택 하이라이트)이 업데이트되어 선택 시 가시성이 향상되었습니다.
    • 여러 화면의 입력 필드에 새로운 커스텀 EditText 테마가 적용되어 시각적 일관성과 디자인 경험이 개선되었습니다.
    • 새로운 EditText 테마 리소스가 추가되어 향후 입력 관련 스타일 일관성 유지에 기여합니다.

@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4c92a70d-6713-4155-98ad-4a9f396c917f

📥 Commits

Reviewing files that changed from the base of the PR and between c633c53 and bf22058.

📒 Files selected for processing (4)
  • app/src/main/res/layout/activity_create_feed.xml
  • app/src/main/res/layout/activity_feed_detail.xml
  • app/src/main/res/layout/activity_normal_explore.xml
  • app/src/main/res/values/styles.xml
🚧 Files skipped from review as they are similar to previous changes (3)
  • app/src/main/res/layout/activity_feed_detail.xml
  • app/src/main/res/values/styles.xml
  • app/src/main/res/layout/activity_normal_explore.xml

Walkthrough

여러 레이아웃의 EditText에 하이라이트 색상과 EditText 전용 테마 속성을 추가하고, 해당 테마 스타일(Theme.Websoso.EditText)을 styles.xml에 정의합니다.

Changes

Cohort / File(s) Summary
레이아웃: EditText 속성 추가
app/src/main/res/layout/activity_create_feed.xml, app/src/main/res/layout/activity_feed_detail.xml, app/src/main/res/layout/activity_normal_explore.xml
각 파일의 대상 EditTextandroid:textColorHighlightandroid:theme="@style/Theme.Websoso.EditText" 속성을 추가. 기존 제약과 바인딩은 변경 없음.
스타일 정의
app/src/main/res/values/styles.xml
새 스타일 Theme.Websoso.EditText 추가 및 colorControlActivated@color/primary_100_6A5DFD로 설정(에디트텍스트 커서/활성 색상 제어).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰
커서가 반짝, 색을 바꿨네
하이라이트 보라빛 살짝 ✨
작은 스타일 한 줌에
입력창들이 웃음짓네
픽픽, 고쳐썼다옹 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 변경 사항의 주요 목적인 '글자 커서 색상 변경'을 명확하게 설명하고 있으며, 간결하고 구체적입니다.
Description check ✅ Passed PR 설명은 필수 섹션들(이슈, 작업 설명, 스크린샷)을 포함하고 있으며, 리뷰어를 위한 추가 설명도 제공됩니다.
Linked Issues check ✅ Passed 검색, 게시글 댓글, 피드 작성 부분의 커서 색상 변경 요구사항이 세 개의 layout 파일 수정과 styles.xml 추가를 통해 충족되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항은 이슈 #821의 커서 색상 변경 요구사항과 직접 관련되어 있으며, 범위를 벗어난 변경이 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/821

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src/main/res/values/styles.xml`:
- Around line 20-22: The Theme.Websoso.EditText style only changes
colorControlActivated but not the actual cursor drawable, so override
android:textCursorDrawable in the Theme.Websoso.EditText style to point to the
desired color/drawable (e.g., same `@color/primary_100_6A5DFD` or a tintable
drawable) so the text cursor color matches the selection; reference the
Theme.Websoso.EditText style and the android:textCursorDrawable attribute (and
ensure it overrides the Base.Theme.Websoso setting).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e494595-a681-4bb7-a35c-0fc0a7c2105a

📥 Commits

Reviewing files that changed from the base of the PR and between 60f7c25 and c633c53.

📒 Files selected for processing (4)
  • app/src/main/res/layout/activity_create_feed.xml
  • app/src/main/res/layout/activity_feed_detail.xml
  • app/src/main/res/layout/activity_normal_explore.xml
  • app/src/main/res/values/styles.xml

Comment on lines +20 to +22
<style name="Theme.Websoso.EditText" parent="">
<item name="colorControlActivated">@color/primary_100_6A5DFD</item>
</style>
Copy link

@coderabbitai coderabbitai bot Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 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.xml

Repository: Team-WSS/WSS-Android

Length of output: 1016


커서 색상을 실제로 바꾸려면 android:textCursorDrawable도 함께 오버라이드해야 합니다.

Base.Theme.Websosothemes.xml Line 7에서 android:textCursorDrawable@color/black으로 설정하고 있으나, 현재 스타일은 colorControlActivated만 변경하고 있습니다. 이로 인해 선택 하이라이트만 변경되고 실제 텍스트 커서는 검은색으로 유지됩니다.

수정 예시
     <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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<style name="Theme.Websoso.EditText" parent="">
<item name="colorControlActivated">@color/primary_100_6A5DFD</item>
</style>
<style name="Theme.Websoso.EditText" parent="">
<item name="colorControlActivated">@color/primary_100_6A5DFD</item>
<item name="android:textCursorDrawable">@color/primary_100_6A5DFD</item>
</style>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/res/values/styles.xml` around lines 20 - 22, The
Theme.Websoso.EditText style only changes colorControlActivated but not the
actual cursor drawable, so override android:textCursorDrawable in the
Theme.Websoso.EditText style to point to the desired color/drawable (e.g., same
`@color/primary_100_6A5DFD` or a tintable drawable) so the text cursor color
matches the selection; reference the Theme.Websoso.EditText style and the
android:textCursorDrawable attribute (and ensure it overrides the
Base.Theme.Websoso setting).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

토끼 리뷰처럼 textCursorDrawable를 사용하지 않은 이유도 궁금합니다!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devfeijoa, 좋은 질문입니다! textCursorDrawable을 사용하지 않은 이유와 두 방식의 차이를 정리하면 다음과 같습니다.


colorControlActivated vs android:textCursorDrawable

colorControlActivated는 포커스 상태일 때의 커서 색상을 포함하여, 부동 레이블 및 밑줄 색상을 제어하는 테마 속성입니다.

이 방식이 동작하는 이유는 colorControlActivated가 특정 컴포넌트 속성(예: hintTextColor)이 아닌 테마 속성이기 때문입니다. 따라서 android:theme을 통한 테마 오버레이로 적용할 수 있습니다.

반면 android:textCursorDrawable직접 뷰 속성으로, 커서 드로어블을 명시적으로 지정합니다. colorControlActivated는 themed context 내 모든 활성화된 컨트롤에 영향을 주는 반면, cursorColor 같은 전용 속성은 커서 드로어블만 정밀하게 타겟합니다. 격리된 커서 변경에는 전용 속성이, 전체 통일된 강조색에는 colorControlActivated가 적합합니다.


제 리뷰 코멘트가 제기한 우려

themes.xml Line 7에서 Base.Theme.Websosoandroid:textCursorDrawable="@color/black"명시적으로 설정하고 있습니다. 이 경우, colorControlActivated만 테마 오버레이로 변경하면 색상 틴팅이 적용될 수 있지만, 명시적으로 지정된 black 드로어블이 우선할 가능성이 있습니다.


PR 스크린샷 확인

PR description 이미지를 보면 검색 바에 "fkdkdk"가 입력되어 있고, 커서가 보라/파란색으로 표시되어 있습니다. 이는 colorControlActivated 방식이 이 앱의 특정 구현에서 실제로 동작함을 시각적으로 보여주고 있습니다.


결론

작성자가 textCursorDrawable을 사용하지 않은 이유는 아마도:

  1. Material Components에서 권장하는 테마 오버레이 방식 (colorControlActivated)으로 커서 색상 변경이 가능함을 확인했기 때문
  2. textCursorDrawable을 스타일에 추가하려면 별도의 drawable XML 파일(또는 API 29+ 색상 직접 참조)이 필요해 더 복잡해지기 때문

다만, Base.Theme.Websoso가 명시적으로 android:textCursorDrawable을 설정하고 있으므로, Android의 커서 렌더링 메커니즘이 API 레벨마다 다르게 동작하기 때문에 다양한 기기에서 동작을 검증하는 것을 권장합니다. 스크린샷만으로는 모든 기기/API 레벨에서의 동작이 보장되지 않습니다.

Copy link
Contributor

@devfeijoa devfeijoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI가 xml 형태로 되어있어 전체 적용이 불가능합니다.

라고 하셨는데 왜 그렇게 생각하셨는지 이유가 궁금합니다! 🤔

android:textColor="@color/black"
android:textColorHint="@color/gray_200_949399"
android:textColorHighlight="@color/primary_50_F1EFFF"
android:theme="@style/Theme.Websoso.EditText"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 부분 보다가 궁금한 점이 있어서요!
기존에는 색상 리소스를 colors에 정의해서 사용하는 경우가 많았던 것 같은데, 이번에는 styles 쪽에서colorControlActivated로 연결해주셨더라고요.
혹시 이렇게 스타일로 분리해서 적용하신 이유나 기준이 있을까요?
저도 이후 작업할 때 같은 기준으로 맞추고 싶어서 여쭤봅니다 :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

선택 손잡이(handle) 부분을 colorControlActivated(?)로 구현한게 맞는지? 이걸로 구현하신 이유가 뭔지도 궁금합니다!

Copy link
Contributor Author

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에 적용했습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

textCursorDrawable  이건 속성값을 지정하는 거라 theme로 설정하면 theme값을 따라가는 것으로 알고있습니다!

Comment on lines +20 to +22
<style name="Theme.Websoso.EditText" parent="">
<item name="colorControlActivated">@color/primary_100_6A5DFD</item>
</style>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

토끼 리뷰처럼 textCursorDrawable를 사용하지 않은 이유도 궁금합니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 [FIX] 버그를 수정합니다. 🧙마법사 하루

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 글자 커서 색상 변경

2 participants