【问题标题】:Fragment color - -how to set it to transparent?片段颜色——如何设置为透明?
【发布时间】:2019-02-24 09:19:30
【问题描述】:

什么会更好:在片段中设置透明颜色,然后使用activity_main.xml中的颜色或在片段中设置颜色?

【问题讨论】:

    标签: android android-fragments android-activity colors fragment


    【解决方案1】:

    通常最好声明片段的非透明背景颜色,因为如果您有多个片段一个接一个,当您单击最顶部片段的空白区域时,点击事件将转移到后面的片段,如果您有底部片段上的按钮,将接受触摸事件。你会得到非常奇怪的行为,所以是的,在每个片段上加上背景颜色。 不要担心性能。不会影响的。

    【讨论】:

      猜你喜欢
      • 2016-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-21
      • 1970-01-01
      • 1970-01-01
      • 2020-03-03
      • 2012-01-20
      相关资源
      最近更新 更多