在xml中,标签从上到下的排列顺序,决定了在手机屏幕上的,位于上下层的顺序

 

如:<RelativeLayout xmlns:andro

      <!--灰色透明的LinearLayout-->

      <LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="#55CDCDC1">    

      </LinearLayout>

      <Button
              android:layout_width="50dp"
              android:layout_height="50dp" />

  </RelativeLayout>

如果这样写,按钮就在灰色透明的LinearLayout上面,

 

如果交换button和LinearLayout的位置,按钮就在灰色透明的LinearLayout下面

相关文章:

  • 2022-12-23
  • 2021-06-14
  • 2021-07-06
  • 2021-11-10
  • 2021-06-18
  • 2022-12-23
  • 2021-10-31
  • 2021-05-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-01-05
  • 2021-08-07
  • 2021-12-19
相关资源
相似解决方案