This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SoftInputAssist { | |
private View rootView; | |
private ViewGroup contentContainer; | |
private ViewTreeObserver viewTreeObserver; | |
private ViewTreeObserver.OnGlobalLayoutListener listener = () -> possiblyResizeChildOfContent(); | |
private Rect contentAreaOfWindowBounds = new Rect(); | |
private FrameLayout.LayoutParams rootViewLayout; | |
private int usableHeightPrevious = 0; | |
public SoftInputAssist(Activity activity) { |