Android XML Common Elements between pages? Frames? -


i skinning app , wondering if there way keep common elements same between xml layouts without copying same code around time.

for instance, have header , footer , background same between pages. can make "common" xml containing header , footer , load individual page frame inside of it?

i'm not sure how reference individual page within xml. maybe change id java side in oncreate function, although seems more work now, if changed on header , footer in future wouldn't have change every activity of app.

thanks insight!

i think it's inclue tag you're looking for. example:

<include layout="@layout/bar_header_top" /> 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -