This file contains hidden or 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) { |
This file contains hidden or 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
package com.innodroid.sample; | |
import android.content.Context; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v4.widget.SwipeRefreshLayout; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.view.ViewGroup; | |
// |
This file contains hidden or 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
// This layout will display its children with rounded corners | |
// It works with Glide image library placeholders and animations | |
// It assumes your background is a solid color. If you need the corners to be truly transparent, | |
// this solution will not work for you. | |
package com.myapp.ui; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; |
This file contains hidden or 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
import shutil | |
import os | |
import json | |
material_dir = os.path.expanduser('~/material-design-icons-2.0/') | |
ios_dir = '../MyProject-ios/MyProject/Images.xcassets/' | |
dest_dir = 'app/src/main/res/drawable-' | |
densities = ['xxxhdpi', 'xxhdpi', 'xhdpi', 'hdpi', 'mdpi'] | |
ios_res = {'1x': 'hdpi', '2x': 'xhdpi', '3x': 'xxhdpi'} |