Skip to content

elessarsst/BaseActivityAndFragmentWithButterKnife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BaseActivityAndFragmentWithButterKnife

This little piece of code aims to show you how to use 'ButterKnife' inside both base activity and it's fragments. The challenge was to use binding annotations of ButterKnife inside the base activity which has an empty layout at first sight. We inflated a template layout to the base activity inside the onCreate method . The second mission was to reuse @BindView annotation for inflated instance of a fragment inside the base activity. This solution provides less java codes inside activities. The activity now only takes care of filling the content with some fragment instances. No license needed. The code can be used and distributed freely.

About

This little piece of code aims to show you how to use 'ButterKnife' inside both base activity and it's fragments. The challenge was to use binding annotations of ButterKnife inside the base activity which has an empty layout at first sight. We inflated a template layout to the base activity inside the onCreate method . The second mission was to …

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages