android - When shoud I use a BaseActivity? -


i have discovered method of using baseactivity items common throughout particular activities.

i want navigation drawer throughout multiple activities , thought time have go @ it. worth navigation drawer , maybe few other things? effect performance much, either negitavely or positively? there other pros/cons should aware of?

i use base activity classes benifit base activity. example, in 1 of applications, each activity has header, footer, , body. needs have access heart rate devices. so, created base activity handles layout of header, footer, , heart rate service. have base activity implement interface created heart rate service.

now, there other activities have connect ble machines, created base class extends base class created activities.

if inheritance occurs, code can hard follow , maintain. also, changing code can cumbersome since harder remove features embedded children.

the plus side lack of duplicated code , easier maintenance functions used universally.