Using layout_above in a RelativeLayout

后端 未结 4 718
天命终不由人
天命终不由人 2020-12-24 14:39

Can someone explain to me why the ImageView is not appearing above the LinearLayout?



        
4条回答
  •  独厮守ぢ
    2020-12-24 15:12

    I had an similar problem by creating a custom optionsMenu. The simplest way to set z-order of views was to do it programmatically. If you want to switch the order sometimes, your should easily call:

        ImageView yourImageView = (ImageView)findViewById(R.id.rev_arrow);
        yourImageView.bringToFront();
    

    I don´t know if it is adaptive to your application, but in my case it works perfect. If you need more code, let me know.

提交回复
热议问题