Same as an Outlined text fields presented in Material Design page but with some dynamic changes

Overview

README

SSCustomEditTextOutlineBorder

Kotlin Version Platform API

Getting Started

SSCustomEditTextOutLineBorder is a small kotlin library for android to support outlined (stroked) text in EditText widgets same as Material Design Outlined Box but without Floating Label.

The actual features are:

  • Outlined text fields with a label which have custom-built text, color, errorColor and backgroundColor.
  • Outlined box border has customizable color and errorColor.
  • EditText with custom-made backgroundColor, hint text, max-min line, max length.
  • Error color customized with error enabled or not.

Demo


demo_data

Gradle Dependency

  • Add the JitPack repository to your project's build.gradle file
allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
  • Add the dependency in your app's build.gradle file
dependencies {
	implementation 'com.github.simformsolutions:SSCustomEditTextOutLineBorder:1.0.10'
}

All Attributes


Attribute Description Default
app:isErrorEnable Whether the EditText error is enabled false
app:custom_component_title Set Outlined border title text R.string.app_name
app:custom_component_editText_hint Set EditText hint R.string.app_name
app:custom_component_maxline Set maximum height of the EditText 1
app:custom_component_minline Set minimum height of the EditText 1
app:custom_component_title_color Set Outlined title color #666666
app:custom_component_title_error_color Set Outlined title error color #f15454
app:custom_component_border_color Set Outlined border color #979797
app:custom_component_border_error_color Set Outlined border error color #f15454
app:custom_component_title_bg_color Set Outlined border title background color R.color.colorPrimary
app:custom_component_editText_bg_color Set EditText background color R.color.colorPrimary
app:custom_component_maxLength Set EditText maxLength 99
android:inputType Set EditText inputType EditorInfo.TYPE_TEXT_VARIATION_NORMAL
app:custom_component_border_width Set Outlined border width 1

Usage


<com.simform.customcomponent.SSCustomEdittextOutlinedBorder
            android:id="@+id/edtAbout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/_10sdp"
            android:inputType="textMultiLine|textCapSentences"
            app:custom_component_editText_hint="@string/edt_hint_about"
            app:custom_component_maxline="3"
            app:custom_component_minline="3"
            app:custom_component_maxLength="25"
            app:errorTextValue="errorText"
            app:isErrorEnable="false"
            app:custom_component_title_color="@color/color_brownish_grey_two"
            app:custom_component_title_error_color="@color/color_error"
            app:custom_component_border_color="@color/color_warm_grey"
            app:custom_component_border_error_color="@color/color_error"
            app:custom_component_title="@string/edt_title_about"
            app:layout_constraintEnd_toEndOf="@+id/edtPassword"
            app:layout_constraintStart_toStartOf="@+id/edtPassword"
            app:layout_constraintTop_toBottomOf="@+id/edtPassword"
            app:textValue="aboutText"/>

Find this library useful? ❤️

Support it by joining stargazers for this repository.

License

Copyright 2020 Simform Solutions

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
You might also like...
Repository of a multi-platform application running the same Compose source code on all platforms
Repository of a multi-platform application running the same Compose source code on all platforms

Compose multiplatform demo demo.mov Using the same compose user interface (UI) from android on all principal platforms 🎊 🎉 App Features This is a si

A library for creating dynamic skeleton view
A library for creating dynamic skeleton view

Skeleton Placeholder View Overview A Library designed to draw a Skeleton by "skinning" the view from a provided layout. Skeleton is composed of Bone w

A declarative, Kotlin-idiomatic API for writing dynamic command line applications.
A declarative, Kotlin-idiomatic API for writing dynamic command line applications.

A declarative, Kotlin-idiomatic API for writing dynamic command line applications.

Example Multi module architecture Android project using MVVM, Dynamic Features, Dagger-Hilt, Coroutines and Navigation Components
Example Multi module architecture Android project using MVVM, Dynamic Features, Dagger-Hilt, Coroutines and Navigation Components

ModularDynamicFeatureHilt An Android template project following a multi module approach with clean architecture. It has been built following Clean Arc

An app to demonstrate Apple's new feature dynamic island in Android with Jetpack Compose
An app to demonstrate Apple's new feature dynamic island in Android with Jetpack Compose

Jet Island Dynamic Island in Android with Jetpack Compose An app to demonstrate Apple's new feature dynamic island in Android with Jetpack Compose. Th

🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device) - More Chucker than Chuck
🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device) - More Chucker than Chuck

Chucker A fork of Chuck Getting Started Features Multi-Window Configure Redact-Header️ Decode-Body Migrating Snapshots FAQ Contributing Building Ackno

MyAndroidTools, but powered by Sui
MyAndroidTools, but powered by Sui

MyAndroidTools 便捷地管理您的 Android 设备 简介 与另一款 MyAndroidTools 一样,本应用使你能够便捷地管理 Android 设备中的应用和组件。但与之不同的是,本应用通过 Sui 来调用高权限 API,所以不会在使用过程中频繁弹出 root 授权的 Toast

:octocat: A demo project based on MVVM architecture and material design & animations.
:octocat: A demo project based on MVVM architecture and material design & animations.

GithubFollows A simple demo project based on MVVM clean architecture and material design & animations. Architecture Specs & Open-source libraries Mini

🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.
🎬 A demo project for The Movie DB based on Kotlin MVVM architecture and material design & animations.

TheMovies A simple project for The Movie DB based on Kotlin MVVM clean architecture and material design & animations. How to build on your environment

Comments
  • addTextChangeListener

    addTextChangeListener

    Great stuff you've created here!

    It is very common that people could want to attach an addTextChangeListener. I see that SSCustomEdittextOutlinedBorder is a view but not directly an edittext view, which is why it doesn't have other default edittext features. I'd suggest that you add a method that returns the main edittext (for example username_tv.edittext). This way, people can directly access the edittext. But if that will be too heavy, you could add a method that returns the addTextChangeListener (which I and many people need), and probably some commonly used methods. Because we are limited to the methods you've provided.

    opened by ChristophyBarth 1
Releases(1.0.16)
Owner
Simform Solutions
Simform Solutions
Speech-Text Converter is a simple task that enable the user to convert the speech to text or convert text to speech (by Mic)

Speech-Text Converter About Speech-Text Converter is a simple task that enable the user to convert the speech to text or convert text to speech (by Mi

Kareem Saeed 1 Oct 21, 2021
Add status to beans in Compose, Fields in beans can be directly used as the MutableState

Buff Add status to beans in Jetpack(jb) Compose, Fields in beans can be directly used as the MutableState<T> ⚠️ Non mainstream warning:This item viola

lt 2 Oct 23, 2022
💫 Small microservice to handle state changes of Kubernetes pods and post them to Instatus or Statuspages

?? Kanata Small microservice to handle state changes of Kubernetes pods and post them to Instatus or Statuspages ?? Why? I don't really want to implem

Noel 4 Mar 4, 2022
ConstraintSetChangesTest - Simple project showing Changes of ConstraintSet value as part of mutable state in JetpackCompose.

ConstraintSetChangesTest Simple project showing Changes of ConstraintSet value as part of mutable state in JetpackCompose. Version: implementation

Mateusz Perlak 1 Feb 13, 2022
Monitor products on the Ubiquiti Store and receive notifications when their availability changes.

UI Spy Monitor products on the Ubiquiti Store and receive notifications when their availability changes. Available as a binary and Docker container. U

Jake Wharton 40 Nov 22, 2022
Quick route to developer options page easily

QuickRoute Using Quick Settings Tile to navigate to Developer options page without click a lot of buttons. Preview Install Can install from Google Pla

Jintin 18 Oct 1, 2021
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon

Stfalcon Fixturer A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can

Stfalcon LLC 31 Nov 29, 2021
PackageReferenceComparison - Do app/module dependencies that share a dependency use the same Singleton ref?

PackageReferenceComparison Do app/module dependencies that share a dependency us

Liam Niehus-Staab 0 Feb 3, 2022
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Chris Russell 1 Feb 11, 2022
Reason about resource-safety in the same way you reason about Structured Concurrency with SuspendApp!

Reason about resource-safety in the same way you reason about Structured Concurrency with SuspendApp!

ΛRROW 34 Dec 21, 2022