Android input method pop-up window causes background deformation processing

When developing an app recently, I found that in some Activity pages, when the input method pops up when the EditText input box at the bottom is clicked, the
background is compressed, which feels very unsightly
. Solution:
Set the input method pop-up style
in AndroidManifest.xml Activity configuration in the file:

android:windowSoftInputMode="adjustResize|stateHidden"

The second method:
Activity configuration in the AndroidManifest.xml file:

android:windowSoftInputMode="adjustNothing|stateHidden"

The third method:
custom background View

public class CustomBackground extends RelativeLayout {
   
    
    
private Context mContext;


public CustomBackground(Context context) 

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/123676906