{"id":18961718,"url":"https://github.com/pt-dot/dot-android-guidelines","last_synced_at":"2026-02-23T12:52:10.340Z","repository":{"id":68608032,"uuid":"79535696","full_name":"pt-dot/DOT-Android-Guidelines","owner":"pt-dot","description":"Android Guidelines","archived":false,"fork":false,"pushed_at":"2020-06-09T03:49:44.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T04:33:25.498Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pt-dot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-20T07:18:06.000Z","updated_at":"2020-11-24T15:06:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f40c77a8-514c-4de3-b4b5-a24a93df7caf","html_url":"https://github.com/pt-dot/DOT-Android-Guidelines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pt-dot/DOT-Android-Guidelines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pt-dot%2FDOT-Android-Guidelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pt-dot%2FDOT-Android-Guidelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pt-dot%2FDOT-Android-Guidelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pt-dot%2FDOT-Android-Guidelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pt-dot","download_url":"https://codeload.github.com/pt-dot/DOT-Android-Guidelines/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pt-dot%2FDOT-Android-Guidelines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29743382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T14:14:05.882Z","updated_at":"2026-02-23T12:52:10.311Z","avatar_url":"https://github.com/pt-dot.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# DOT - Android Guidelines\n\u003e Guideline for android developer in Distinction On Technology (PT. DOT Indonesia)\n\nTable of contents🧾\n=================\n\u003cdetails\u003e\n\u003csummary\u003eClick to show\u003c/summary\u003e\n  \n- [DOT - Android Guidelines](#dot---android-guidelines)\n- [Table of contents](#table-of-contents)\n  * [Guidelines](#guidelines)\n  * [3rd Party Libraries](#3rd-party-libraries)\n  * [Package diagram](#package-diagram)\n    + [Java](#java)\n    + [Resource](#resource)\n- [Naming CheatSheet](#naming-cheatsheet)\n  * [General Naming](#general-naming)\n  * [JAVA](#java)\n    + [Variable declaration Order](#variable-declaration-order)\n  * [Resources](#resources)\n    + [Layout ('WHAT_WHERE')](#layout---what-where--)\n    + [Layout resource IDs (WHAT_WHERE_DESCRIPTION)](#layout-resource-ids--what-where-description-)\n- [Linking resources directories tutorial](#linking-resources-directories-tutorial)\n  * [References](#references)\n- [DOT Indonesia](#dot-indonesia)\n\n\u003c/details\u003e\n\n## Guidelines \nPlease refer to this document to meet our style guidelines:\n- https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md\n\nAlways push your code into **develop** branch, and do a **merge request** into **master** branch after stabilize and refactor your code\n\nCreate your own branch for each feature of the apps\n\n## 3rd Party Libraries 📖\nAlways use the libraries from these repository:\n- https://github.com/pt-dot/awesome-dot\n\n## Package diagram \n### Java 🛠\n\n\u003cimg src=\"java.png\" /\u003e\n\n### Resource 🧱\nSeparate resource for each features\n\n\n```\nres-feature\n    │  \n    ├─── auth (features name)\n    │   │\n    │   ├───  layout\n    │   │    └─ Layout inside package\n    │   │\n    │   └───  values\n    │        └─ String inside package\n    │   \n    ├─── main (main package)\n    │\n    ├─── menu (menu package)\n    │\n    │─── widget (widget package) \n    │\n    ├─── layout (layout that used multiple times i.e. partial layout)\n    │\n    └─── values (values contains more than one time, tools i.e (lorem, image url), never used)\n        ├───  attrs\n        ├───  colors\n        ├───  dimens\n        ├───  other values\n        ├───  strings\n        └───  styles\n```\n\n# Naming CheatSheet\n\u003e Standard name declaration to collaborate with other\n\n- ## General Naming 🎉\n    | Type              | Usage                 | Example                |\n    | ----------------- | ----------------------| -----------------------|\n    | Class             | PascalCase            | `MainActivity`         |\n    | Local Variable    | camelCase             | `imageView`            |\n    | Constants         | UPPER_SNAKE_CASE      | `BASE_URL`             |\n    | Resource          | lower_snake_case      | `activity_main`        |\n    | Resource  IDs     | camelCase             | `ivMain`               |\n\n- ## JAVA\n    ### Variable declaration Order ⏳\n\n    | Type              | Prefix                                    | Example                   |\n    | ----------------- | :--------------------:                    | :---------------------:   |\n    | View              | (viewType ViewID)                         | `ivSplash`                |\n    | Object            | (Object Name)                             | `network`                 |\n    | ViewModel         | ---                                       | `viewModel`               |\n    | Binding           | binding(`Binding Name` if more than one)  | `bindingMain` or `binding`| \n    | Constants         | WHERE_WHAT                                | `NETWORK_REQUEST_CODE`    |\n\n- ## Resources\n    \u003e Resource Naming Based `'WHAT'_ 'WHERE'_ 'DESCRIPTION'`\n\n    | WHAT              | WHERE            |\tDESCRIPTION                         |\n    | ------------      | :---------------:|:------:                                |\n    | FIXED (btn, rv)   | LOCATION         | difference multiple 'WHAT' in 'WHERE'  |\n\n    ### Layout ('WHAT_WHERE') 🖼\n    \n    | Component        | Class Name                      | Layout Name                              |\n    | -----------------| :------------------------------:| :---------------------------------------:|\n    | Activity         | `MainBroadcastMessageActivity`  | `activity_main_broadcast_message.xml`    |\n    | Fragment         | `FragmentHome`                  | `fragment_home.xml`                      |\n    | Dialog           | ---                             | `dialog_rating.xml`                      |\n    | Adapter          | `ForumImageAdapter`             | ---                                      |\n    | AdapterView item | ---                             | `item_forum_image.xml`                   |\n    | Partial layout   | ---                             | `view_aduan_location.xml`                |\n\n    ### Layout resource IDs (WHAT_WHERE_DESCRIPTION) 🧲\n    \n    | Component                 | Prefix      | Example                       |\n    | --------------            | :------:    | :---------------------:       |\n    | Button                    | `btn`       | `btnRegisterSignup`           |\n    | TextView                  | `tv`        | `tvWelcomeTitle`              |\n    | EditText                  | `et`        | `etLoginPassword`             |\n    | ImageView                 | `iv`        | `ivSplashLogo`                |\n    | RelativeLayout            | `rl`        | `rlMainRoot`                  |\n    | LinearLayout              | `ll`        | `llLoginRoot`                 |\n    | ConstraintLayout          | `cl`        | `clSplashRoot`                |\n    | TableLayout               | `tl`        | `tlDetailSheet`               |\n    | TabLayout                 | `tab`       | `tabMainNav`                  |\n    | ListView                  | `lv`        | `lvDetailMessages`            |\n    | RecyclerView              | `rv`        | `rvChat`                      |\n    | Checkbox                  | `cb`        | `cbLoginRememberMe`           |\n    | ProgressBar               | `pb`        | `pbRegisterUploadPercent`     |\n    | RadioGroup                | `rg`        | `rgInputGender`               |\n    | RadioButton               | `rb`        | `rbInputFemale`               |\n    | ToggleButton              | `tb`        | `tbControlVisibility`         |\n    | Spinner                   | `spin`      | `spinEditProfileLocation`     |\n    | Menu                      | `menu`      | `menuMainSearch`             |\n    | GalleryView               | `gv`        | `gvMainAlbum`                 |\n    | WebView                   | `wv`        | `wvMainPreview`               |\n    | Bottom Navigation         | `botnav`    | `botNavMain`                  |\n    | Library Layout            | `lib`       | `libMainBotNav`               |\n    | Custom Widget             | `wg`        | `wgMainGridRv`                |\n    | Layout Binding ViewModel  |  ---        | `vm`                          |\n\n    ### Drawables (WHERE_WHAT_DESCRIPTION) 🎨\n    \n    | Asset Type   | Prefix (WHAT)     |\t\tExample                 |\n    | ------------ | :---------------: |:-------------------------:     |\n    | Action bar   | `ab_`             | `main_ab_login.9.png`          |\n    | Button       | `btn_`\t           | `login_btn_send_pressed.9.png` |\n    | Background   | `bg_`             | `login_bg_dialog_top.9.png`    |\n    | Dialog       | `dialog_`         | `all_dialog_top.9.png`         |\n    | Divider      | `divider_`        | `all_divider_horizontal.9.png` |\n    | Icon         | `ic_`\t           | `splash_ic_star.png`           |\n    | Notification | `notification_`   | `login_notification_bg.9.png`  |\n    | Tabs         | `tab_`            | `main_tab_pressed.9.png`       |\n\n    ### Icons (WHAT) 🎨\n    \n    | Asset Type                      | Prefix           | Example                    |\n    | --------------------------------| :--------------: | :------------------------: |\n    | Icons                           | `ic_`            | `ic_star.png`              |\n    | Launcher icons                  | `ic_launcher`    | `ic_launcher_calendar.png` |\n    | Menu icons and Action Bar icons | `ic_menu`        | `ic_menu_search.png`       |\n    | Status bar icons                | `ic_stat_notify` | `ic_stat_notify_msg.png`   |\n    | Tab icons                       | `ic_tab`         | `ic_tab_recent.png`        |\n    | Dialog icons                    | `ic_dialog`      | `ic_dialog_info.png`       |\n    \n    ### Strings(WHERE_Prefix_DESCRIPTION) 🧵\n    \n    | TYPE                              | Location                        | Prefix                          | Example                                                                                        |\n    | --------------------------------  |:-:                              | :--------------:                | :--------------------------------:                                                             |\n    | More than one features/package    | root                            | `all_`                          | `all_et_hint_name`                                                                             |\n    | Menu title                        | feature location                | `menu_`                         | `fragment_list_menu_search.png`                                                                |\n    | action                            | feature location                | `act_`                          | `login_act_clicked`                                                                            |\n    | error warning success message     | feature location                | `msg_`                          | `network_msg_upload_success`                                                                   |\n    | label                             | root                            | ---                             | `all_name`                                                                                     |\n    | view inside layout                | feature location                | `view prefix_`(tv_, btn_, et_)  | `splash_tv_title` `login_btn_label`, `register_et_email_hint`                                  |\n    | app_name                          | gradle/productFlavors           | ---                             | `resValue \"string\", \"app_name\", \"Dev\"`                                                         |\n    | API ENDPOINT                      | gradle/productFlavors           | ---                             | `buildConfigField \"String\", \"END_POINT\", \"\\\"https://sandbox.dot.co.id/project-name/api/v1/\\\"\"` |\n    \n    Gradle string Location is used for changed productFlavor i.e `development` `staging` `production`\n    \n    \n# Linking resources directories tutorial 📌\n - Set Hierarchy view from android to Project\n - create directory `res-features` in `app/src/main`\n - create directory for each features in `res-features`\n - Go to build.gradle `app level`\n - add this in the android section\n    ```groovy\n     android {\n     ...\n        sourceSets {\n            main {\n                res.srcDirs = [\n                    'src/main/res',\n                    'src/main/res-features',\n                    'src/main/res-features/main',\n                    'src/main/your-path',\n                ]\n            }\n        }\n     }\n    ```\n - Sync project with gradle\n\n\n# References 🖥\n- https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md\n- https://google.github.io/styleguide/javaguide.html#s5.1-identifier-names\n- https://jeroenmols.com/blog/2016/03/07/resourcenaming/\n\n\n\n# DOT Indonesia\n\u003ca href=\"http://dot.co.id/\"\u003e\n  \u003cimg src=\"https://www.dot.co.id/wp-content/themes/web-dot/assets/images/icon-dot.png\" width=\"100\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpt-dot%2Fdot-android-guidelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpt-dot%2Fdot-android-guidelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpt-dot%2Fdot-android-guidelines/lists"}