Android: Background image resize on keyboard pop up

后端 未结 12 953
伪装坚强ぢ
伪装坚强ぢ 2021-02-03 20:01

I am developing an application in which the background image get shrink on keyboard pop-up. My .xml is as follows :



        
12条回答
  •  旧时难觅i
    2021-02-03 20:55

    I had the same issue.

    Add your outer layout background inside onCreate method as show below

    getWindow().setBackgroundDrawableResource(R.drawable.login_bg);
    

    and add your outer layout as

    
    
    

    Add android:layout_weight="1" for the outer layout and don't set background in xml file I think this helps someone

提交回复
热议问题