Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
236 views
in Technique[技术] by (71.8m points)

kotlin - ViewBinding shared or common Activity

Trying to have a single BaseActivity whose layout is is generally made of three includes

<include header>
<include body>
<include menu>

Where body can be a number of different layouts.

Then have different Activities which basically extend BaseActivity and these need to set the body include to their layout.

PageOneActivity: BaseActivity() {...}    
PageTwoActivity: BaseActivity() {...}
PageThreeActivity: BaseActivity() {...}
PageFourActivity: BaseActivity() {...}    
...

so I can't seem to use layout="@layout/activity-first" <include body

PageOneActivity body is to be layout/activity-first
and
PageTwoActivity body is to be layout/activity-second
etc..
question from:https://stackoverflow.com/questions/66057097/viewbinding-shared-or-common-activity

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...