【问题标题】:LinearLayout with Fragment inside PopupWindow在 PopupWindow 内带有 Fragment 的 LinearLayout
【发布时间】:2014-02-05 01:08:05
【问题描述】:

如果他单击特定按钮,我正在使用 PopupWindow 将具有 5 个不同片段的 ViewPager 覆盖在用户 IME 上。据我目前所知,不可能将 Fragment 用作 PopupWindow 的内容。所以我的问题是:是否可以将带有 ViewPager 的片段放在 LinearLayout 中(例如)并将 LinearLayout 设置为 PopupWindow 的内容?如果没有,如果我使用我的 Fragment 的 getView() 方法来获取可以设置为 PopupWindow 内容的视图,为什么它不起作用

任何帮助将不胜感激!

【问题讨论】:

    标签: android android-fragments android-fragmentactivity android-popupwindow


    【解决方案1】:

    7 天没有答案让我有可能自己弄清楚。据我所知,没有办法做到这一点,作为片段内容的布局必须膨胀到弹出窗口中。我试过了,它是这样工作的......

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多