allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.yenenahmet:AndroidBaseCore:version'
// or //
implementation 'com.github.yenenahmet.AndroidBaseCore:basecorelibrary:version'
implementation 'com.github.yenenahmet.AndroidBaseCore:base-exoplayer:version'
}
- To facilitate structures that can be used throughout the project
- BaseRecyclerViewAdapter
- BaseViewBindingRecyclerViewAdapter
- BaseRecyclerViewFilterAdapter
- BaseViewBindingRecyclerViewFilterAdapter
- BaseViewBindingRecyclerViewInputAdapter
- BaseSpinnerAdapter
- BaseViewBindingPagerAdapter
- AlarmManagerManagement // Helper Class
- BaseAlarmReceiver
- AdapterBindings
- CreditCardCardNumberAppCompatEditText
- CreditCardDateAppCompatEditText
- CurrencyEditText
- CurrencyInputWatcher
- UnderLinedAppCompatTextView
- AppViewModelFactory
- BaseBindingDialog
- BaseDialog
- BindingPopupWindow
- BaseFilter
- PaginationScrollListener
- LocaleManager (Language)
- SharedPreferencesHelper (Stroge Helper)
- NotificationBuilderHelper
- DownloadFile
- PageRxInputStream
- ChipperManger
- BaseSmsReceiveActivity
- BaseSmsReceiveDaggerActivity
- BaseSmsReceiveDaggerLoadingFragment
- BaseSmsReceiveRemoteReadyLoadingActivity
- SmsListener
- BaseActivity
- BaseDaggerActivity
- BaseDaggerFragment
- BaseDaggerLoadingActivity
- BaseDaggerLoadingFragment
- BaseFragment
- BaseLoadingActivity
- BaseLoadingFragment
- BaseRemoteActivity
- BaseRemoteFragment
- BaseRemoteReadyLoadingActivity
- BaseRemoteReadyLoadingFragment
- ControlUtils -> Email Check -> Tc No Check -> Tax No Check
- FileUtils -> createPicturesFile -> takePicture -> saveBitmapToFile
- SizeUtils -> dpToPx -> pxToDp
- BaseRxSingleHandlerViewModel
- BaseRxViewModel
- BaseViewModel
Class names are written in UpperCamelCase.
The name of the class should end with the name of the component; for example: MainActivity
, MainFragment
, CouponManager
, DialogUtils
.
Resource files names are written in snake_case.
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:
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 |
Layout files should match the name of the Android components that they are intended for but moving the top level component name to the beginning. For example, if we are creating a layout for the MainActivity
, the name of the layout file should be activity_main.xml
.
Component | Class Name | Layout Name |
---|---|---|
Activity | UserProfileActivity |
activity_user_profile.xml |
Fragment | SignUpFragment |
fragment_sign_up.xml |
Dialog | ChangePasswordDialog |
dialog_change_password.xml |
AdapterView item | --- | item_person.xml |
Partial layout | --- | partial_stats_bar.xml |
Parameter names are written in camelCase.
For example: userId
, bettingPhase
, isTopEvent
, hasAnyTopEvent
.
Id names are written in snake_case.
The name of the id should start with the name of the view; for example: button_save
, image_view_arrow
, relative_layout_avatar
, edit_text_name
.
Branch names are written in kebab_case.
The names of the branch should start with the id of the Jira task; for example: fix/ANDROID-1552-TopEvent
, feature/ANDROID-1555-ColoredSquadList
.
Commit messages are written in a special name convention([kebab-case] *message).
The messages of the commit should start with the name of the branch with square brackets; for example: [fix/ANDROID-1552-TopEvent] *Add top event icons
, [feature/ANDROID-1555-ColoredSquadList] *Make implementation colored squad list
.