Skip to content

Instantly share code, notes, and snippets.

View PriyaSindkar's full-sized avatar
👩‍💻
Coding

Priya Sindkar PriyaSindkar

👩‍💻
Coding
View GitHub Profile
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) {