Skip to content
Branch: master
Find file History
Fetching latest commitโ€ฆ
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Android ์ฝ”๋”ฉ ์Šคํƒ€์ผ

EditorConfig ํŒŒ์ผ

Android Studio ์„ค์ •

Kotlin ์ฝ”๋”ฉ ์Šคํƒ€์ผ

Kotlin ๊ณต์‹ ๋ฌธ์„œ์˜ Coding Convention๊ณผ Android Kotlin Guides๋ฅผ ๋”ฐ๋ฅธ๋‹ค. ์ฐจ์ด์ ์ด๋‚˜ ์ถ”๊ฐ€ ์‚ฌํ•ญ์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

  • Column limit์€ 120์„ ์‚ฌ์šฉํ•œ๋‹ค.
  • Boolean์„ ๋ถ€์ •ํ•  ๋•Œ๋Š” ! ๋Œ€์‹  not()์„ ์‚ฌ์šฉํ•œ๋‹ค.
  • ํŠน๋ณ„ํžˆ ๋ช…์‹œ๋˜์ง€ ์•Š์€ ๋ถ€๋ถ„์€ ๊ธฐ๋ณธ์ ์œผ๋กœ Java์˜ convention์„ ๋”ฐ๋ฅด๋„๋ก ํ•œ๋‹ค.

Java ์ฝ”๋”ฉ ์Šคํƒ€์ผ

Google Java Style Guide๋ฅผ ๋”ฐ๋ฅธ๋‹ค. ์ด ์™ธ์— ์ฐจ์ด์ ์ด๋‚˜ ์ถ”๊ฐ€ ์‚ฌํ•ญ์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

  • Column limit์€ 120์„ ์‚ฌ์šฉํ•œ๋‹ค.
  • Block indentation์€ +4 spaces๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  • Static import๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค.

๊ณตํ†ต ์ฝ”๋”ฉ ์Šคํƒ€์ผ

  • ์†Œ์Šค์ฝ”๋“œ ์ƒ๋‹จ์— ์ €์ž‘๊ถŒ ๋ฐ ์ €์ž๋ฅผ ํ‘œ์‹œํ•˜๋Š” ์ฃผ์„์€ ๋‚จ๊ธฐ์ง€ ์•Š๋Š”๋‹ค.

๋ฆฌ์†Œ์Šค ๋„ค์ด๋ฐ

  • layout

    • activty, fragment ๋“ฑ ๋‹ด๊ณ  ์žˆ๋Š” ๋‚ด์šฉ์˜ ์ตœ์ƒ๋‹จ ๊ฐœ๋…์„ prefix๋กœ ํ•œ๋‹ค.
    • ๊ทธ ์ดํ›„๋Š” ์ƒ์œ„ ๊ฐœ๋…์—์„œ ํ•˜์œ„ ๊ฐœ๋…์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์‚ฌ์šฉํ•œ๋‹ค.
    • ์˜ˆ) activty_tutorial, fragment_shelf, shelf_toolbar
  • drawable

    • ๊ธฐ๋ณธ์ ์œผ๋กœ ์ƒ์œ„ ๊ฐœ๋…์—์„œ ํ•˜์œ„ ๊ฐœ๋…์„ ์ˆœ์ฐจ์ ์œผ๋กœ ํ‘œ๊ธฐํ•œ๋‹ค. ย - ํŠน์ • ์ƒ์œ„, ํ•˜์œ„ ๊ฐœ๋…์— ์†ํ•˜์ง€ ์•Š๊ฑฐ๋‚˜, ์—ฌ๋Ÿฌ ์ฝ”๋“œ์— ๊ณตํ†ต์œผ๋กœ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ์—๋Š” ํ‘œ๊ธฐํ•˜์ง€ ์•Š๋Š”๋‹ค.
    • ์˜ˆ) reader_typo_setting_column_width.xml, simple_noti_icon_error.png
    • ์•„์ด์ฝ˜(icon), ๋ฒ„ํŠผ(btn), ๋ฐฐ๊ฒฝ(bg), ์…€๋ ‰ํ„ฐ(sel)๋“ฑ ๋ฆฌ์†Œ์Šค์˜ ์ข…๋ฅ˜๋ฅผ ์ƒ, ํ•˜์œ„ ๊ฐœ๋… ๋‹ค์Œ์— ํ•จ๊ป˜ ํ‘œ๊ธฐํ•œ๋‹ค. ์ƒ, ํ•˜์œ„ ๊ฐœ๋…๊ณผ ๋ฆฌ์†Œ์Šค์˜ ์ข…๋ฅ˜๋ฅผ ํ‘œ๊ธฐ ํ•œ ๋’ค ๊ธฐ๋Šฅ๊ณผ ๋ชจ์–‘์— ์–ด์šธ๋ฆฌ๋Š” ์ด๋ฆ„์„ ์ž์œ ๋กญ๊ฒŒ ์ถ”๊ฐ€ํ•œ๋‹ค.
    • ์˜ˆ) reader_tts_icon_pre.png / main_purchased_btn_book_read.png ย - ๋ฆฌ์†Œ์Šค ์ƒ์œ„, ํ•˜์œ„๊ฐœ๋…์˜ ์˜์–ด ๋ช…์นญ์€ ์•ˆ๋“œ๋กœ์ด๋“œ์— ํ˜„์žฌ ๊ฐœ๋ฐœ๋œ ์ƒํƒœ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ํ‘œ๊ธฐํ•œ๋‹ค.
    • ์˜ˆ) ๋‚ด ์„œ์žฌ(library), ๊ฐœ๋ณ„ ์ฑ…์žฅ(shelf), ๊ตฌ๋งค๋ชฉ๋ก(purchased), ์„œ์ (store), ์„ค์ •(settings),
    • ์ฑ…์žฅ ๋ชฉ๋ก(shelf_list), ์ตœ๊ทผ ์ฝ์€ ์ฑ…(recent_book), ๋…์„œ๋…ธํŠธ(reading_note), ๋ณด๊ธฐ ์„ค์ •(typo_setting), ๋ทฐ์–ด ์„ค์ •(reader_setting)
    • ํ…Œ๋งˆ์— ๋”ฐ๋ผ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ตฌ๋ถ„ํ•ด์•ผํ•˜๋Š” ๊ฒฝ์šฐ, ๋‹คํฌ ํ…Œ๋งˆ์šฉ ๋ฆฌ์†Œ์Šค์˜ ๋งจ ๋’ค์— _d๋ฅผ ๋ถ™์ธ๋‹ค.
    • ์˜ˆ) main_shelf_icon_uncheck_d.xml
  • id

    • ๊ฐ„๋‹จํ•œ ์˜๋ฏธ๋ฅผ ์ด๋ฆ„์œผ๋กœ ์“ด๋‹ค.
    • ImageButton, Button, CheckBox, RadioButton๊ณผ ๊ฐ™์ด Button ์ข…๋ฅ˜์ด๊ฑฐ๋‚˜ Button์˜ Subclass์ธ ๊ฒฝ์šฐ button์„ postfix๋กœ ํ•œ๋‹ค.
    • ProgressBar, SeekBar์˜ ๊ฒฝ์šฐ bar๋ฅผ postfix๋กœ ํ•œ๋‹ค.
    • ViewGroup์˜ ๊ฒฝ์šฐ container๋ฅผ postfix๋กœ ํ•œ๋‹ค.
    • ์˜ˆ)
      <?xml version="1.0" encoding="utf-8"?>
      <LinearLayout xmlns:android=""
        <ImageView android:id="@+id/cover"
            layout_height="wrap_content" />
        <Button android:id="@+id/download_button"
            layout_height="wrap_content" />
  • View variable naming

    • ์œ„์˜ id์™€ ๋™์ผํ•œ ํ˜•ํƒœ๋กœ ์‚ฌ์šฉํ•˜๋˜ camel case๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
    • ๋งŒ์•ฝ TextView๋‚˜ ImageView๋ฅผ ๋ฒ„ํŠผ ๊ฐ™์€ ์šฉ๋„๋กœ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด Button์„ postfix๋กœ ์‚ฌ์šฉํ•œ๋‹ค.
    • ์˜ˆ)
      TextView bookTitleView = (TextView) findViewById(;
      ImageView coverView = (ImageView) findViewById(;
      Button downloadButton = (Button) findViewById(;
      ImageButton deleteButton = (ImageButton) findViewById(;
      TextView confirmButton = (TextView) findViewById(;
      ProgressBar downloadBar = (ProgressBar) findViewById(;
      SeekBar pageBar = (SeekBar) findViewById(;
      CheckBox syncButton = (CheckBox) findViewById(;
      RadioButton koreanDicButton = (RadioButton) findViewById(;

TextView ์„ค์ •

  • ๋””์ž์ธ ๊ฐ€์ด๋“œ ์ƒ์— Medium์œผ๋กœ ํ‘œํ˜„๋œ ํฐํŠธ์ผ ๊ฒฝ์šฐ bold ์†์„ฑ์„ ์ ์šฉํ•œ๋‹ค.
  • ํ…์ŠคํŠธ์™€ ๊ด€๋ จ๋œ ๊ธฐํƒ€ ์„ค์ •์€ RIDI Design System ์„ ๋”ฐ๋ฅธ๋‹ค.
You canโ€™t perform that action at this time.