Fragment is transparent and shows Activity below

前端 未结 5 857
旧巷少年郎
旧巷少年郎 2020-12-14 14:27

My Android application launches into BeginActivity which is a subclass of SherlockFragmentActivity and shows it\'s first view using:

@Override
    public voi         


        
5条回答
  •  一个人的身影
    2020-12-14 15:03

    Well, giving background to fragment is not always enough. For example if your background activity or fragment contains buttons, then we should set elevation for our FragmeLayout so that our fragment comes on top of other elements. Something like this:

        
    

    and then inside our fragment layout, we should set a background and make clickable attribute true to prevent working of buttons in background activity or fragment. Something like this :

    
    

提交回复
热议问题