活动的布局继承 [英] Activity layout inheritance

查看:127
本文介绍了活动的布局继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始开发的Andr​​oid应用程序! 我需要表现出几个屏幕顶部的集中控制。 在黑莓我刚刚继承我的屏幕从基本屏幕,需要控制和继承它的用户界面和行为的基本类型。

I start develop application on Android! I need to show common control on the top of few screens. In Blackberry I just inherit my screens from base screen with needed controls and it inherit UI and behaviour from base type.

怎么做类似的事情,在Android中?我的意思是,我该如何安排呢? 也许,我需要创建的控制或布局,我可以在我的屏幕上使用? 或者我需要从另一个继承一个活动,并使用addContentView()?

How can i do similar thing in Android? I mean, how can i organize it? Maybe, i need to create control or layout, which i can use on my screens? Or i need inherit one activity from another and use addContentView()?

什么样的​​机会是有什么优势/各的缺点是什么?

What opportunities are there and what advantages / disadvantages of each?

推荐答案

尝试的 <包括> XML布局指令

Try the <include> XML layout directive.

这篇关于活动的布局继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆