Skip to content

Instantly share code, notes, and snippets.

View talenguyen's full-sized avatar
🎯
Focusing

Nguyen Truong Giang talenguyen

🎯
Focusing
View GitHub Profile
@talenguyen
talenguyen / CustomViewGroup
Created May 15, 2015 02:59
Expert - CustomView group to get high performance
public class ProfilePhotoLayout extends ViewGroup {
private ProfilePhoto mProfilePhoto;
private Menu mMenu;
private Title mTitle;
private Subtitle mSubtitle;
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// 1. Setup initial constraints.
@talenguyen
talenguyen / Coding Conventions
Created April 6, 2015 08:13
Android coding convention.
# Naming
## 1. File
### 1.1. Layout
* Activity -> prefix **activity_**
* Fragment -> prefix **fragment_**
* Custom View -> prefix **view_**
* List Item View -> prefix **item_**