Home 8월 23일 Today I Learned
Post
Cancel

8월 23일 Today I Learned

오늘 한 일

  • A·아이 프로젝트를 진행하였다
  • 블로그 TIL을 작성하였다
  • 1일 1커밋을 하였다

느낀 점

설레발이라고 할 수도 있지만 이제 슬슬 A·아이 프로젝트도 어느 정도 완성이 되었기에 전부터 계획하던 안드로이드 강의를 찍거나 플러터 공부를 해야할 시점이라는 생각이 든다

배운 점

Android Radio AlertDialog 색 변경

1
2
3
<style name="CustomAlertDialogStyle" parent="Theme.MaterialComponents.Light.Dialog.Alert">
    <item name="colorControlActivated">#4894fe</item>
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
private fun dialog(): AlertDialog.Builder {
    val optionList = arrayOf("이름1", "이름2", "이름3", "이름4")
    val selectItem = 0
    val builder = AlertDialog.Builder(requireContext(), R.style.CustomAlertDialogStyle)

    builder.setSingleChoiceItems(optionList, selectItem
        ) { _, p1 ->

        }
    builder.create()

    return builder
}

해당 코드 같이 builder 부분에 context와 함께 Style을 넣어주면 색을 라디오 버튼 색을 변경할 수 있다

내일 계획

내일은 A·아이 프로젝트 진행해야겠다

This post is licensed under CC BY 4.0 by the author.

8월 22일 Today I Learned

8월 24일 Today I Learned