如何活动在Android结合? [英] How to combine Activities on Android?
问题描述
我有一个Java Android应用程序调用不同的活动。我认为这是你将如何去进行一些对象封装(这三个不同的活动呈现出不同的屏幕,但所有相关的程序的功能)。
I have an a Java Android app that calls different activities. I thought this was how you would go about doing some object encapsulation (these three different activities show different screens but all relevant to the function of the program).
- 首先是应用程序的主界面和主界面。
- 接下来的本质解析XML文件并显示一些文本为基础的
输出。 - 最后,第三是地图浏览器,构建基于XML地图
文件中的第二个活动读取。
我遇到的问题是,这些显示为手机上的3个不同的活动。反正有封装它们在短短的一个活动,或有另一种方法,我应该去使用一个应用程序创建多个不同的屏幕?
The problem I'm having is that these show up as 3 different activities on the phones. Is there anyway to encapsulate them in just one activity, or is there another method I should go about using to create multiple different screens in one app?
感谢
推荐答案
Android将会地方,在其意图过滤器
以下为应用程序启动的任何活动:
Android will place any activity that has the following in its intent-filter
into the application launcher:
<category android:name="android.intent.category.LAUNCHER" />
因此,你应该只定义这个类别为您的入口点的活动。
Therefore, you should only define this category for your entry-point activity.
这篇关于如何活动在Android结合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!