FloatingTextEntry Forms Control for Android/iOS
C# Smalltalk
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.droidres WIP Mar 6, 2017
Alex.Controls.Forms WIP Mar 6, 2017
Droid WIP Mar 6, 2017
FloatingTextFieldTest WIP Mar 6, 2017
Images Good quality gifs preview Feb 3, 2016
PureLayoutSharp First Commit Jan 26, 2016
iOS First Commit Jan 26, 2016
.gitignore .gitignore Updated Jan 26, 2016
FloatingTextField.sln First Commit Jan 26, 2016
README.md Update README.md Feb 3, 2016



FloatingTextEntry Forms Control for Android/iOS



In your AppDelegate just add this:

FloatingTextEntryRenderer.Init ();


####1 - Setup your app to support material desing

Look at this tutorial https://blog.xamarin.com/material-design-for-your-xamarin-forms-android-apps/

####2 - Setup the color

In your theme xml add the following nodes:

//Accent Color
<item name="colorAccent">@color/accent</item>
//Inactive stroke color
<item name="colorControlNormal">@color/primaryDark</item>
//Inactive hint text color
<item name="android:textColorHint">@color/primaryDark</item>

####3 - Setup your app

Add the fallowing code in your Main Activity "OnStart" method:

FloatingTextEntryRenderer.Init ();


var passEntry = new FloatingTextEntry ();
passEntry.Placeholder = "Password";
passEntry.AccentColor = Color.FromHex("#FFC107");
passEntry.InactiveAccentColor = Color.FromHex ("#1976D2");
passEntry.TextColor = Color.Purple;
passEntry.Completed += passEntry_Completed;
passEntry.IsPassword = true;

//Custom Error Message/Color/Validator
passEntry.ErrorColor = Color.Red;
passEntry.ErrorText = "Bad Email";
//Put default emailvalidator
passEntry.Validator = FloatingTextEntry.EmailValidator;
//or create your own validator
passEntry.Validator = (string input) => {
  return !string.IsNullOrWhiteSpace (input);


Third Party Code:

iOS Control Based On: https://github.com/enisgayretli/EGFloatingTextField

PureLayout Binding from https://github.com/unhappy224/PureLayoutSharp