All Projects → llwl1982 → FloatOnKeyboardLayout

llwl1982 / FloatOnKeyboardLayout

Licence: other
The Android layout (ViewGroup) which auto push up when soft keyboard popups。 当软键盘弹出时,界面自动上浮,使界面不会被软键盘遮挡

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to FloatOnKeyboardLayout

Pmalertcontroller
PMAlertController is a great and customizable alert that can substitute UIAlertController
Stars: ✭ 2,397 (+6558.33%)
Mutual labels:  popup
Lnpopupcontroller
LNPopupController is a framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.
Stars: ✭ 2,807 (+7697.22%)
Mutual labels:  popup
react-layer-stack
Layering system for React. Useful for popover/modals/tooltip/dnd application
Stars: ✭ 158 (+338.89%)
Mutual labels:  popup
Spstorkcontroller
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,494 (+6827.78%)
Mutual labels:  popup
Django Bootstrap Modal Forms
A Django plugin for creating AJAX driven forms in Bootstrap modal.
Stars: ✭ 244 (+577.78%)
Mutual labels:  popup
Semantic Ui
Semantic is a UI component framework based around useful principles from natural language.
Stars: ✭ 49,729 (+138036.11%)
Mutual labels:  popup
Popover
Popover component for Angular
Stars: ✭ 187 (+419.44%)
Mutual labels:  popup
LSDialogViewController
Custom Dialog for iOS written in Swift
Stars: ✭ 74 (+105.56%)
Mutual labels:  popup
Nativepopup
Clone of Apple iOS App's feedback popup, and easily customizable.
Stars: ✭ 247 (+586.11%)
Mutual labels:  popup
flycheck-popup-tip
Display Flycheck error messages using popup.el
Stars: ✭ 30 (-16.67%)
Mutual labels:  popup
React Native Simple Dialogs
⚛ Cross-platform React Native dialogs based on the Modal component
Stars: ✭ 218 (+505.56%)
Mutual labels:  popup
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (+583.33%)
Mutual labels:  popup
PolishAnnoyanceFilters
Polskie Filtry Elementów Irytujących ukrywają i blokują wyskakujące okienka, widgety, newslettery, powiadomienia push, strzałki, niezgodne z tematem artykułów otagowane linki wewnętrzne i inne drażniące elementy (Polskie Filtry RODO-Ciasteczkowe są już w nich zawarte).
Stars: ✭ 45 (+25%)
Mutual labels:  popup
Stpopuppreview
An alternative peek preview for non 3D Touch devices. Inspired by Instagram.
Stars: ✭ 202 (+461.11%)
Mutual labels:  popup
jpopup
Simple lightweight (<2kB) javascript popup modal plugin
Stars: ✭ 27 (-25%)
Mutual labels:  popup
React Popup
React popup component
Stars: ✭ 198 (+450%)
Mutual labels:  popup
Ampoptip
An animated popover that pops out a given frame, great for subtle UI tips and onboarding.
Stars: ✭ 2,854 (+7827.78%)
Mutual labels:  popup
vue-modal
Reusable Modal component, supports own custom HTML, text and classes.
Stars: ✭ 29 (-19.44%)
Mutual labels:  popup
bottomsheets
Material Bottom Sheets library for Android
Stars: ✭ 76 (+111.11%)
Mutual labels:  viewgroup
SHPopup
A lightweight library for popup view
Stars: ✭ 36 (+0%)
Mutual labels:  popup

FloatOnKeyboardLayout

FloatOnKeyboardLayout is a ViewGroup that auto push up when soft keyboard popups. Only one simple class, not dependency other libs

Art

软键盘弹起始终不会覆盖指定的View,这个View通过设置anchor来指定。如果不设置anchor,那么整个屏幕会被软键盘顶上去。

Features

  • Cancel limit of only one child view.
  • Add function of anchor
  • Add function of margin

Gradle Dependency

Then, add the library to your module build.gradle

dependencies {
    compile 'im.ll:floatlayout:1.1.0'
}

Sample Usage

In the layout xml files, simply add

<?xml version="1.0" encoding="utf-8"?>
<github.ll.view.FloatOnKeyboardLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:id="@+id/root_view">

    <LinearLayout
        android:id="@+id/child_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

        <LinearLayout
            android:id="@+id/anchor"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
        </LinearLayout>

    </LinearLayout>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/child_view"/>


</github.ll.view.FloatOnKeyboardLayout>
FloatOnKeyboardLayout floatOnKeyboardLayout = (FloatOnKeyboardLayout) findViewById(R.id.root_view);

floatOnKeyboardLayout.setAnchor(findViewById(R.id.anchor));

floatOnKeyboardLayout.setPopupListener(new FloatOnKeyboardLayout.OnKeyboardPopupListener() {
            @Override
            public void onKeyboardPopup(boolean isPop) {
                Toast.makeText(MainActivity.this, "popup: " + isPop, Toast.LENGTH_SHORT).show();
            }
        });

floatOnKeyboardLayout.setMarginKeyboard(100);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].