Skip to content

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 …

Notifications You must be signed in to change notification settings

elessarsst/BaseActivityAndFragmentWithButterKnife

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

No packages published

Languages