【问题标题】:scroll background while foreground objects stay static in android滚动背景而前景对象在android中保持静态
【发布时间】:2023-03-30 11:40:01
【问题描述】:

我有scrollable custom view。它运作良好。

我希望能够在foreground of that view 中添加horizontal LinearLayout。非常重要的是,我希望 LinearLayoutcustom view is scrolled 一样保持静态。

那么基本上,我该怎么做呢?通常,当我有一个前景视图时,我点击背景的那一刻,foreground disappears(我通常使用Dialog作为foreground

【问题讨论】:

    标签: android android-layout android-linearlayout


    【解决方案1】:

    将所有内容包装在 FrameLayoutRelativeLayout 中。确保您的前景对象是布局中的最后一项,以便它充当叠加层。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-06
      • 2019-09-15
      • 1970-01-01
      • 1970-01-01
      • 2013-10-09
      • 1970-01-01
      相关资源
      最近更新 更多