Search in sources :

Example 6 with KeyboardInsetAnimationCallback

use of com.android.launcher3.anim.KeyboardInsetAnimationCallback in project android_packages_apps_404Launcher by P-404.

the class WorkModeSwitch method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    setSelected(true);
    setOnClickListener(this);
    if (Utilities.ATLEAST_R) {
        KeyboardInsetAnimationCallback keyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this);
        setWindowInsetsAnimationCallback(keyboardInsetAnimationCallback);
    }
    DeviceProfile grid = BaseDraggingActivity.fromContext(getContext()).getDeviceProfile();
    setInsets(grid.getInsets());
}
Also used : DeviceProfile(com.android.launcher3.DeviceProfile) KeyboardInsetAnimationCallback(com.android.launcher3.anim.KeyboardInsetAnimationCallback)

Example 7 with KeyboardInsetAnimationCallback

use of com.android.launcher3.anim.KeyboardInsetAnimationCallback in project android_packages_apps_Launcher3 by crdroidandroid.

the class Folder method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    final DeviceProfile dp = mActivityContext.getDeviceProfile();
    final int paddingLeftRight = dp.folderContentPaddingLeftRight;
    mBackground = (GradientDrawable) ResourcesCompat.getDrawable(getResources(), R.drawable.round_rect_folder, getContext().getTheme());
    mContent = findViewById(R.id.folder_content);
    mContent.setPadding(paddingLeftRight, dp.folderContentPaddingTop, paddingLeftRight, 0);
    mContent.setFolder(this);
    mPageIndicator = findViewById(R.id.folder_page_indicator);
    mFolderName = findViewById(R.id.folder_name);
    mFolderName.setTextSize(TypedValue.COMPLEX_UNIT_PX, dp.folderLabelTextSizePx);
    mFolderName.setOnBackKeyListener(this);
    mFolderName.setOnFocusChangeListener(this);
    mFolderName.setOnEditorActionListener(this);
    mFolderName.setSelectAllOnFocus(true);
    mFolderName.setInputType(mFolderName.getInputType() & ~InputType.TYPE_TEXT_FLAG_AUTO_CORRECT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_FLAG_CAP_WORDS);
    mFolderName.forceDisableSuggestions(true);
    mFooter = findViewById(R.id.folder_footer);
    mFooterHeight = getResources().getDimensionPixelSize(R.dimen.folder_label_height);
    if (Utilities.ATLEAST_R) {
        mKeyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this);
        setWindowInsetsAnimationCallback(mKeyboardInsetAnimationCallback);
    }
}
Also used : DeviceProfile(com.android.launcher3.DeviceProfile) KeyboardInsetAnimationCallback(com.android.launcher3.anim.KeyboardInsetAnimationCallback) SuppressLint(android.annotation.SuppressLint)

Example 8 with KeyboardInsetAnimationCallback

use of com.android.launcher3.anim.KeyboardInsetAnimationCallback in project android_packages_apps_Launcher3 by crdroidandroid.

the class WorkModeSwitch method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    setSelected(true);
    setOnClickListener(this);
    if (Utilities.ATLEAST_R) {
        mKeyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this);
        setWindowInsetsAnimationCallback(mKeyboardInsetAnimationCallback);
    }
}
Also used : KeyboardInsetAnimationCallback(com.android.launcher3.anim.KeyboardInsetAnimationCallback)

Example 9 with KeyboardInsetAnimationCallback

use of com.android.launcher3.anim.KeyboardInsetAnimationCallback in project android_packages_apps_Launcher3 by ProtonAOSP.

the class WorkModeSwitch method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    setSelected(true);
    setOnClickListener(this);
    if (Utilities.ATLEAST_R) {
        KeyboardInsetAnimationCallback keyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this);
        setWindowInsetsAnimationCallback(keyboardInsetAnimationCallback);
    }
    DeviceProfile grid = BaseDraggingActivity.fromContext(getContext()).getDeviceProfile();
    setInsets(grid.getInsets());
}
Also used : DeviceProfile(com.android.launcher3.DeviceProfile) KeyboardInsetAnimationCallback(com.android.launcher3.anim.KeyboardInsetAnimationCallback)

Example 10 with KeyboardInsetAnimationCallback

use of com.android.launcher3.anim.KeyboardInsetAnimationCallback in project android_packages_apps_Launcher3 by ProtonAOSP.

the class Folder method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    final DeviceProfile dp = mActivityContext.getDeviceProfile();
    final int paddingLeftRight = dp.folderContentPaddingLeftRight;
    mBackground = (GradientDrawable) ResourcesCompat.getDrawable(getResources(), R.drawable.round_rect_folder, getContext().getTheme());
    mContent = findViewById(R.id.folder_content);
    mContent.setPadding(paddingLeftRight, dp.folderContentPaddingTop, paddingLeftRight, 0);
    mContent.setFolder(this);
    mPageIndicator = findViewById(R.id.folder_page_indicator);
    mFolderName = findViewById(R.id.folder_name);
    mFolderName.setTextSize(TypedValue.COMPLEX_UNIT_PX, dp.folderLabelTextSizePx);
    if (mActivityContext.supportsIme()) {
        mFolderName.setOnBackKeyListener(this);
        mFolderName.setOnFocusChangeListener(this);
        mFolderName.setOnEditorActionListener(this);
        mFolderName.setSelectAllOnFocus(true);
        mFolderName.setInputType(mFolderName.getInputType() & ~InputType.TYPE_TEXT_FLAG_AUTO_CORRECT | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_FLAG_CAP_WORDS);
        mFolderName.forceDisableSuggestions(true);
    } else {
        mFolderName.setEnabled(false);
    }
    mFooter = findViewById(R.id.folder_footer);
    mFooterHeight = getResources().getDimensionPixelSize(R.dimen.folder_label_height);
    if (Utilities.ATLEAST_R) {
        mKeyboardInsetAnimationCallback = new KeyboardInsetAnimationCallback(this);
        setWindowInsetsAnimationCallback(mKeyboardInsetAnimationCallback);
    }
}
Also used : DeviceProfile(com.android.launcher3.DeviceProfile) KeyboardInsetAnimationCallback(com.android.launcher3.anim.KeyboardInsetAnimationCallback) SuppressLint(android.annotation.SuppressLint)

Aggregations

KeyboardInsetAnimationCallback (com.android.launcher3.anim.KeyboardInsetAnimationCallback)10 DeviceProfile (com.android.launcher3.DeviceProfile)9 SuppressLint (android.annotation.SuppressLint)5