【问题标题】:Android: Master/Detail Flow on tabletAndroid:平板电脑上的 Master/Detail Flow
【发布时间】:2013-01-31 18:44:04
【问题描述】:

我使用主详细信息流创建了应用程序。我有自定义ListViewFrameLayout 作为容器来显示来自ListView 的选定项目的详细信息。一切都很好,但我的详细信息显示在 onClick ListView 项目之后。我想在创建活动后自动显示ListView 中第一项的详细信息(比如android设置活动)。我该怎么做?感谢您的回复和帮助。

【问题讨论】:

标签: android


【解决方案1】:

将您的 Fragment 直接放在 FrameLayout 上的 onCreate() 上。

FragmentActivity frag = new FragmentActivity();
getSupportFragmentManager().beginTransaction().add(frag, details).commit();

而且总是通过 FragmentManager 替换()...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-25
    • 1970-01-01
    • 2021-03-28
    • 2012-08-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多