相关疑难解决方法(0)

Android: when/why should I use FrameLayout instead of Fragment?

I am building a layout for large screens, that is supposed to consist of 2 different parts, a left one and a right one. For doing that I thought using 2 Fragments is the right choice.

Then I had a look on the example of the navigation with the Master/Detail-Flow. It has a 2-pane layout, where on the right is the navigation, and on the left is the detail view.

但是在那个例子中,与我期望看到的不同,对于细节视图,有一个FrameLayout然后持有a Fragment,而不是Fragment直接.

布局XML看起来像这样(一个例子):

<LinearLayout …
Run Code Online (Sandbox Code Playgroud)

android android-fragments android-framelayout

43
推荐指数
2
解决办法
4万
查看次数

在单个活动中使用多个片段

我想开发一个Android应用程序,Honey Comb 3.0在其中我要显示一个列表,单击列表中的任何项目应该以Fragment的形式显示该列表项旁边的另一个列表.在解决这个问题时,任何人都可以提供示例代码吗?

提前致谢,

android android-3.0-honeycomb

5
推荐指数
1
解决办法
2万
查看次数