在android中如果首先在xml中静态添加了一个控件,剩下的控件都是通过addView动态添加,那么如果有控件覆盖的情况(比如说使用FrameLayout或者RelativeLayout),先加入得控件就会被后加入得控件覆盖。
在View类中有这样一个方法 bringToFront ,它得注释如下:
/**
* Change the view's z order in the tree, so it's on top of other sibling
* views. This ordering change may affect layout, if the parent container
* uses an