Floating label input widgets

Overview

Maven Central

Android Floating Label Widgets

A set of input widgets with a hint label that floats when input is not empty.

Demo

A demo of the widget is worth a thousand words. You can download it for free on Google Play.

Demo on Google Play

We also have a small video showing it (just click the image below)

demo video

Included widgets

  • Simple EditText
  • AutoComplete TextView
  • Item picker (pick an item from a list in a dialog)
  • Instant picker (pick a date or a time from a dialog)
  • Item chooser (pick an item from another activity)

Usage

See the Wiki pages for the documentation, changelog, samples, etc.

About Vincent & MarvinLabs

I am a freelance developer located in Biarritz, France. You can have a look at my website to get to know me a little better. If you want to follow me, here are some links:

MarvinLabs is my digital studio specialised in native mobile applications and web sites. You can browse our website to get to know us a little better. If you want to get updates about our work, you can also:

Change log

See the wiki

Comments
  • Prevent empty pickers from throwing

    Prevent empty pickers from throwing

    Dependant on: https://github.com/marvinlabs/android-floatinglabel-widgets/pull/25

    Addresses: https://github.com/marvinlabs/android-floatinglabel-widgets/issues/21

    Not sure if this is a reasonable solution to @dsdebastiani issue -- also not sure if doing nothing is reasonable.

    opened by karlhungus 7
  • Float on focus

    Float on focus

    Dependant on: https://github.com/marvinlabs/android-floatinglabel-widgets/pull/25

    This is a proof of concept for edit text float behaviour

    adds a flag to float on focus versus float on value present (default)

    output

    If this is cool, i'll proceed with the rest of the widgets.

    opened by karlhungus 6
  • Changing FloatingLabelWidgetBase to work fine with android:animateLayoutChanges

    Changing FloatingLabelWidgetBase to work fine with android:animateLayoutChanges

    Before, the float label text was displayed cut. Now, ViewTreeObserver.OnGlobalLayoutListener.onGlobalLayout() only works if parent visibility is equal View.VISIBLE.

    The new Fragment and /layout/fragment....xml are optionals. They are used to demonstrate the problem and the fix. See atached images, please.

    BEFORE before

    AFTER after

    opened by luisfernandezbr 3
  • Disable/Enable widgets programmatically

    Disable/Enable widgets programmatically

    I have two ItemPickers on my layout, and I need insert items in picker2 after the user select a item in picker1. When the picker1 was not selected yet, I'd like to disable picker2.

    I've tried myPicker2.setEnabled(false), myPicker2.setActived(false) and myPicker2.setClickable(false) but nothing works. The problem is, when picker2 is empty and is clicked, the app crash:

    java.lang.RuntimeException: StringPickerDialogFragment needs some items to pick from
    

    I wouldn't like to insert a empty item on picker2. Is there a way to disable ItemPickers instead?

    enhancement help wanted 
    opened by dsdebastiani 3
  • Apache 2.0 License?

    Apache 2.0 License?

    I'm looking to integrate your floating label library (which looks great btw) into an app for a client and was wondering if you'd be willing to put your source under the Apache 2.0 license. Since the source is unlicensed I'm not able to use it in its current state. Here's a link to the license: http://www.apache.org/licenses/LICENSE-2.0.html

    If you don't want to license it I understand, but this is pretty much the standard license for open source Android projects anyway. Thanks!

    opened by curtinmartis 3
  • Is it possible to disable drawableRight for pickers?

    Is it possible to disable drawableRight for pickers?

    Is it possible to programmatically disable drawableLeft for pickers? This is because there is no possibility to adjust heights of Fl...EditText and FL..Picker which are placed in one row (horizontal Linearlayout) because of drawableRight...

    duplicate 
    opened by demogorgorn 2
  • NPE with FloatingLabelAutoCompleteTextView and AppCompat 22.1.1 on API 21+

    NPE with FloatingLabelAutoCompleteTextView and AppCompat 22.1.1 on API 21+

    When using this library with AppCompat there is a null pointer exception which occurs when running on API 21+. The FloatingLabelAutoCompleteTextView's AutoCompleteTextView input is injected as an AppCompatAutoCompleteTextView by the app compat library. When

    inputWidget.setDropDownBackgroundResource(popupBackground)
    

    is called, AppCompatAutoCompleteTextView tries to get the drawable from it's internal TintManager. The TintManager is not initialized when running on 21+ because of the TintManager.SHOULD_BE_USED is false on 21+. (See TintManager.java) (I haven't found the source for AppCompatAutoCompleteTextView online anywhere to link.)

    My workaround for now is to change

    inputWidget.setDropDownBackgroundResource(popupBackground); //FloatingLabelAutoCompleteTextView.java:90
    

    to

    inputWidget.setDropDownBackgroundDrawable(getContext().getDrawable(popupBackground)); //FloatingLabelAutoCompleteTextView.java:90
    

    I want to verify that this is an AppCompat issue and not a FloatingLabelWidget issue and see if anyone has a better workaround.

    opened by jdrider 2
  • Changing FloatingLabelWidgetBase to work fine with android:animateLayoutChanges

    Changing FloatingLabelWidgetBase to work fine with android:animateLayoutChanges

    Before, the float label text was displayed cut. Now, ViewTreeObserver.OnGlobalLayoutListener.onGlobalLayout() only works if parent visibility is equal View.VISIBLE.

    The new Fragment and /layout/fragment....xml are optionals. They are used to demonstrate the problem and the fix. See atached images, please.

    BEFORE before

    AFTER after

    opened by luisfernandezbr 2
  • Update gradle

    Update gradle

    This was kind of a pain, might be nice for people using your project on more recent builds of android studio not to have to suffer through it as well.

    I couldn't test the signing process, but the demo works.

    If you want me to squish let me know

    opened by karlhungus 2
  • Limited to minSdkVersion 15

    Limited to minSdkVersion 15

    I added version 1.5.0 of the library to an application project which defines minSdkVersion 9. When I compile the project the following error occurs:

    Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 15 declared in library /home/user/projects/MyApp/app/build/intermediates/exploded-aar/com.marvinlabs/android-floatinglabel-widgets/1.5.0/AndroidManifest.xml

    What is the reason you declared minSdkVersion 15? Can you backport the library?


    Further, can you please explicitly state the minSdkVersion in the README.md so people do not spent time trying to integrate it when they target a lower SDK version?

    opened by johnjohndoe 2
  • Gradle error: Library is not a library itself

    Gradle error: Library is not a library itself

    I added the following line to the build.gradle of my app module:

    compile 'com.marvinlabs:android-floatinglabel-widgets:1.5.0'
    

    When I sync the project with Gradle the following error is shown:

    Module version com.marvinlabs:android-floatinglabel-widgets:1.5.0 depends on libraries but is not a library itself

    opened by johnjohndoe 2
  • import to android studio

    import to android studio

    Error:The modules 'android-floatinglabel-widgets-master', 'android-floatinglabel-widgets' point to same directory in the file system. Each module has to have a unique path. Error:(15, 0) No service of type Factory available in ProjectScopeServices. Open File

    can you help me ?

    opened by NusDucHV 0
  • Compatibility with Saaripaar Validation Library

    Compatibility with Saaripaar Validation Library

    Has anyone found a way to make this widget compatible with the Sarippar Android validation library? https://github.com/ragunathjawahar/android-saripaar

    floating labels widgets looks really nice but it does not seem to be compatible with EditText which is what it is replacing.

    I was just wandering if anyone has had this issue before. As I would like to keep using floating labels library. But sadly the convenience of saripaar outweighs the looks of Floating label

    opened by Zapnologica 0
  • Error in license

    Error in license

    If you look at the bottom of the license page (https://github.com/marvinlabs/android-floatinglabel-widgets/blob/master/LICENSE) you'll notice some fields that should be replaced

    opened by tahnok 0
  • support for RTL Language

    support for RTL Language

    when trying to use the widget with hebrew string in app:flw_labelText, the hint is positioned with an offset to the right (causing the text to be trunced) also, when the widget is in focus, the label position is also with offset

    layout file in this example:

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <FloatingLabelEditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:drawablePadding="10dp"
            app:flw_labelText="טקסט בעברית" />
        <FloatingLabelEditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:flw_labelText="טקסט פשוט שאמור להיות מימין" />
    </LinearLayout>
    

    see screenshot: device-2015-06-28-080320

    enhancement 
    opened by razmaimon 4
Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.

Carbon Material Design implementation for Android 4.0 and newer. This is not the exact copy of the Lollipop's API and features. It's a custom implemen

null 3k Dec 30, 2022
ExpandableSelector is an Android library created to show a list of Button/ImageButton widgets inside a animated container which can be collapsed or expanded.

ExpandableSelector ExpandableSelector is an Android library created to show a list of Button/ImageButton widgets inside a animated container which can

Karumi 699 Nov 19, 2022
Parallax everywhere is a library with alternative android widgets with parallax effects.

Parallax Everywhere# Parallax everywhere (PEW) is a library with alternative android views using parallax effects. Demo You can try the demo app on go

fmSirvent 712 Nov 14, 2022
A set of widgets to create smooth slideshows with ease.

Android SlideShow Widget A set of widgets to create smooth slide shows with ease. The slide show components are fully customizable and are not limited

MarvinLabs 211 Nov 20, 2022
Simple Visualizer from mic input for Android.

Voice Recording Visualizer Simple Visualizer from mic input for Android. Usage @Override protected void onCreate(Bundle savedInstanceState) {

Takayuki Yorikane 542 Nov 24, 2022
Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp

Android Visualizer A View subclass that Takes the input from the Android MediaPlayer and displays visualizations, like in iTunes or WinAmp The Visuali

null 798 Dec 22, 2022
A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

Antwan Gaggi 1k Dec 13, 2022
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

UFreedom 1.8k Dec 27, 2022
StandOut lets you easily create floating windows in your Android app.

Coming Soon Meanwhile, checkout the demo video at http://www.youtube.com/watch?v=S3vHjxonOeg Join the conversation at http://forum.xda-developers.com/

Mark Wei 1.2k Dec 12, 2022
Floating Notification for Android app - Facebook ChatHeads Notification system

FloatingView (Application Demo on Play Store) DEPRECATED SEE FloatingView Floating View for Android app - Facebook ChatHeads Notification system This

Fernandez Anthony 530 Nov 17, 2022
Floating Notification for Android app - Facebook ChatHeads Notification system

FloatingView (Application Demo on Play Store) DEPRECATED SEE FloatingView Floating View for Android app - Facebook ChatHeads Notification system This

Fernandez Anthony 530 Nov 17, 2022
Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Rizki Maulana 118 Dec 14, 2022
Android Floating Label

FloatingLabel FloatingLabel Allows you to create a blow kind of EditText. To explain the concept well I have taken below image from http://dribbble.co

Hardik Trivedi 290 Nov 30, 2022
Android Floating Label

FloatingLabel FloatingLabel Allows you to create a blow kind of EditText. To explain the concept well I have taken below image from http://dribbble.co

Hardik Trivedi 290 Nov 30, 2022
Floating Action Menu for Android. Inspired by the Google Plus floating menu

android-floating-action-menu Floating Action Menu for Android. Inspired by the Google Plus floating menu. Demo Setup The simplest way to use this libr

Alessandro Crugnola 242 Nov 10, 2022
Sometimes, we need to show a label above an ImageView or any other views. Well, LabelView will be able to help you. It's easy to implement as well!

LabelView Sometimes, we need to show a label above an ImageView or any other views. Well, LabelXXView will be able to help you. It's easy to implement

Jingwei 1.9k Dec 6, 2022
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

Burhanuddin Rashid 1k Jan 1, 2023
Float Label Edit Texts for Android

Floating Label Edit Text for Android For more info, see this blog post. Salient features Simple and clean library (open up the source to see for yours

null 428 Nov 25, 2022
Library project with a custom view that implements the Float Label pattern

AndroidFloatLabel This repository contains an Android library project for Android 4.0+ with a custom view that implements the Float Label pattern (htt

Ian G. Clifton 475 Dec 27, 2022
一个可配置的迷你版轻量级 Label 辅助类,支持多种配置效果。

AvatarLabelView 一个可配置的迷你版轻量级 Label 辅助类,支持多种配置效果,具体不同配置展示效果如下图。 说明文档 如下是关于 Label View 的相关使用方式、属性说明、拓展自定义的解释说明。 使用样例 <cn.label.avatarlabelview.LabelImag

yanbo 572 Nov 19, 2022