GithubHelp home page GithubHelp logo

simformsolutionspvtltd / sscustomedittextoutlineborder Goto Github PK

View Code? Open in Web Editor NEW
206.0 7.0 22.0 5.88 MB

Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. ๐Ÿ“ ๐ŸŽ‰

License: Apache License 2.0

Kotlin 100.00%
android kotlin kotlin-android kotlin-library material-design outline-stroke custom edittext errorcolor outline-color

sscustomedittextoutlineborder's Introduction

README

SSCustomEditTextOutlineBorder

Kotlin Version Platform API Android Weekly Android Arsenal

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

    • For Gradle version 5.x.x or less
    allprojects {
        repositories {
        ...
        maven { url 'https://jitpack.io' }
        }
    }
    
    • For Gradle version 6.x.x and above, in settings.gradle file inside pluginManagement block
      pluginManagement {
        repositories {
        ...
        maven { url 'https://jitpack.io' }
        }
    }
    
  • Add the dependency in your app's build.gradle file

dependencies {
	implementation 'com.github.simformsolutions:SSCustomEditTextOutLineBorder:1.0.15'
}

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
app:isToggleEnable Whether Password Toggle is enabled false

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:isToggleEnable = "true"
            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. โญ

๐Ÿค How to Contribute

Whether you're helping us fix bugs, improve the docs, or a feature request, we'd love to have you! ๐Ÿ’ช

Check out our Contributing Guide for ideas on contributing.

Bugs and Feedback

For bugs, feature requests, and discussion please use GitHub Issues.

Awesome Mobile Libraries

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.

sscustomedittextoutlineborder's People

Contributors

birjuvachhani avatar mashik424 avatar mehulkk avatar mobile-simformsolutions avatar msajidjuneja avatar shwetachauhan-simform avatar shwetachauhan18 avatar simform-solutions avatar yashwantgowla-simform avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sscustomedittextoutlineborder's Issues

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.

Issue with InputType

If keypad is already opened, then able to edit the inputType="none" view. But if keyboard is already hidden, the only this works. Please resolve it asap. Even tried to manually hide it, but, clicking only on title n borders its hiding. inside the borders its not hiding. able to enter text.

hope u will resolve soon.

EditText Is Not Clickable

The edit text isn't clickable. I hope you don't mind going through the views used to resolve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.