All Projects → mastani → android-convention-cheatsheet

mastani / android-convention-cheatsheet

Licence: Apache-2.0 license
Android Naming Convention Cheat Sheet

Projects that are alternatives of or similar to android-convention-cheatsheet

Naming Cheatsheet
Comprehensive language-agnostic guidelines on variables naming. Home of the A/HC/LC pattern.
Stars: ✭ 9,475 (+18121.15%)
Mutual labels:  naming, cheatsheet
abbreviations-in-code
List of common abbreviation in program codes
Stars: ✭ 163 (+213.46%)
Mutual labels:  naming, cheatsheet
vue-unit-testing-cheat-sheet
🔬 My cheat sheet for testing vue components with jest and vue-test-utils
Stars: ✭ 101 (+94.23%)
Mutual labels:  cheatsheet
fe-store-house
The front-end resource that gathered in my working days.
Stars: ✭ 95 (+82.69%)
Mutual labels:  cheatsheet
MVPDemo
Android MVP架构Demo--Android MVP架构从入门到精通-真枪实弹
Stars: ✭ 66 (+26.92%)
Mutual labels:  mvp
Reamp
A painkiller for your Android apps
Stars: ✭ 51 (-1.92%)
Mutual labels:  mvp
Trickl
trickl torrent client
Stars: ✭ 50 (-3.85%)
Mutual labels:  mvp
XMVP
This is a mvp framework to help you easily achieve mvp structure.
Stars: ✭ 61 (+17.31%)
Mutual labels:  mvp
gdb-cheatsheet
GDB cheatsheet for reversing binaries
Stars: ✭ 20 (-61.54%)
Mutual labels:  cheatsheet
ffmpeg-cheatsheet
📼 A cheatsheet for common video processing operations in FFmpeg
Stars: ✭ 153 (+194.23%)
Mutual labels:  cheatsheet
AndroidStarterAlt
A sample View-based Android app using the MVP architecture. It uses Mosby, Dagger2, RxJava, retrofit, LoganSquare, requery, EventBus, Conductor.
Stars: ✭ 27 (-48.08%)
Mutual labels:  mvp
MVP
Unofficial app to help MVPs manage their community activities
Stars: ✭ 111 (+113.46%)
Mutual labels:  mvp
hackthebox
Notes Taken for HTB Machines & InfoSec Community.
Stars: ✭ 286 (+450%)
Mutual labels:  cheatsheet
Starwars-clean
Simple project with clean architecture
Stars: ✭ 34 (-34.62%)
Mutual labels:  mvp
mezon
Mezon is a simple php framework wich will help you to create business applications.
Stars: ✭ 35 (-32.69%)
Mutual labels:  mvp
Nextflow cheatsheet
Tips for Nextflow and cheatsheet for channel operation
Stars: ✭ 38 (-26.92%)
Mutual labels:  cheatsheet
quickref
Git quick reference application for android
Stars: ✭ 111 (+113.46%)
Mutual labels:  cheatsheet
XinFramework
Android 快速开发框架 总结以往开发结合三方项目 不断更新
Stars: ✭ 21 (-59.62%)
Mutual labels:  mvp
LifecycleMvp
No description or website provided.
Stars: ✭ 20 (-61.54%)
Mutual labels:  mvp
Eva
Eva and Wall-e
Stars: ✭ 131 (+151.92%)
Mutual labels:  mvp

Table of contents

Classes & Layouts

Component Class Name Layout Name
Activity UserProfileActivity activity_user_profile.xml
Fragment SignUpFragment fragment_sign_up.xml
Dialog ChangePasswordDialog dialog_change_password.xml
Adapter ChatAdapter ---
AdapterView item --- item_person.xml
Partial layout --- partial_stats_bar.xml

Layout resource IDs

Component Prefix Example
Button btn_ btn_signup_dialog.xml
TextView tv_ tv_user_status.xml
EditText et_ et_password.xml
ImageView iv_ iv_top_logo.xml
RelativeLayout rl_ rl_root.xml
LinearLayout ll_ ll_root.xml
ListView lv_ lv_messages.xml
RecyclerView rv_ rv_chat.xml
Checkbox chk_ chk_remember_me.xml
ProgressBar pb_ pb_upload_percent.xml
RadioButton rb_ rb_female.xml
ToggleButton tb_ tb_visibility.xml
Spinner spn_ spn_category.xml
Menu mnu_ mnu_country.xml
GalleryView gv_ gv_album.xml
WebView wv_ wv_preview.xml

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

Icons

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

Strings

Prefix Description
error_ An error message
msg_ A regular information message
title_ A title, i.e. a dialog title
action_ An action such as "Save" or "Create"

Constants

Element Field Name Prefix
SharedPreferences PREF_
Bundle BUNDLE_
Fragment Arguments ARGUMENT_
Intent Extra EXTRA_
Intent Action ACTION_

Acronyms

Good Bad
XmlHttpRequest XMLHTTPRequest
getCustomerId getCustomerID
String url String URL
long id long ID

MVP Package Structure

┌─── data
│   │   Task.java (Data Model)
│   │
│   └─── source
│       │   TasksDataSource.java
│       │   TasksRepository.java
│       │
│       ├─── local
│       │       TasksDao.java
│       │       TasksLocalDataSource.java
│       │       ToDoDatabase.java
│       │
│       └─── remote
│               TasksRemoteDataSource.java
│
├─── addedittask (Action)
│       AddEditTaskActivity.java
│       AddEditTaskContract.java
│       AddEditTaskFragment.java
│       AddEditTaskPresenter.java
│
├─── taskdetail (Action)
│       TaskDetailActivity.java
│       TaskDetailContract.java
│       TaskDetailFragment.java
│       TaskDetailPresenter.java
│
├─── tasks (Action)
│       TasksActivity.java
│       TasksContract.java
│       TasksFilterType.java
│       TasksFragment.java
│       TasksPresenter.java
│
│─── util (Utility classes used in various parts of the app, e.g. for handling file access) 
│       ActivityUtils.java
│       AppExecutors.java
│       DiskIOThreadExecutor.java
│
│   BaseActivity.java
│   BasePresenter.java
│   BaseView.java

References

Contributor(s)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].