nextcloud / nextcloud/android

Improve drawables name pattern

Open
#4,773 3 comments 0 reactions 0 assignees View on GitHub
enhancement technical debt
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

Adapt naming pattern based on https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md

#### 1.2.2.1 Drawable files

Naming conventions for drawables:

| Asset Type | Prefix | Example |
|--------------| ------------------|-----------------------------|
| Action bar | `ab_` | `ab_stacked.9.png` |
| Button | `btn_` | `btn_send_pressed.9.png` |
| Dialog | `dialog_` | `dialog_top.9.png` |
| Divider | `divider_` | `divider_horizontal.9.png` |
| Icon | `ic_` | `ic_star.png` |
| Menu | `menu_ ` | `menu_submenu_bg.9.png` |
| Notification | `notification_` | `notification_bg.9.png` |
| Tabs | `tab_` | `tab_pressed.9.png` |

Naming conventions for icons (taken from [Android iconography guidelines](http://developer.android.com/design/style/iconography.html)):

| Asset Type | Prefix | Example |
| --------------------------------| ---------------- | ---------------------------- |
| Icons | `ic_` | `ic_star.png` |
| Launcher icons | `ic_launcher` | `ic_launcher_calendar.png` |
| Menu icons and Action Bar icons | `ic_menu` | `ic_menu_archive.png` |
| Status bar icons | `ic_stat_notify` | `ic_stat_notify_msg.png` |
| Tab icons | `ic_tab` | `ic_tab_recent.png` |
| Dialog icons | `ic_dialog` | `ic_dialog_info.png` |

Naming conventions for selector states:

| State | Suffix | Example |
|--------------|-----------------|-----------------------------|
| Normal | `_normal` | `btn_order_normal.9.png` |
| Pressed | `_pressed` | `btn_order_pressed.9.png` |
| Focused | `_focused` | `btn_order_focused.9.png` |
| Disabled | `_disabled` | `btn_order_disabled.9.png` |
| Selected | `_selected` | `btn_order_selected.9.png` |

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.