Skip to content

Android EditText component for handling mac address input format

License

Notifications You must be signed in to change notification settings

r-cohen/macaddress-edittext

Repository files navigation

Mac Address EditText

Android EditText component for handling mac address input format

Inspired by cimikavac's post: http://cmikavac.net/2014/01/16/android-edittext-automatic-mac-address-formatting/

Installation

Add the JitPack repository to your root Project gradle file at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Add the dependency to the Module gradle file:

dependencies {
	...
	compile 'com.github.phearme:macaddress-edittext:1.0.1'
}

Usage

<com.phearme.macaddressedittext.MacAddressEditText
	android:layout_width="match_parent"
	android:layout_height="wrap_content" />