Giter Club home page Giter Club logo

pwdinputview's Introduction

Password-Input-View

a password input view

Usage

Add thd code in your build.gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.cornor.passwordview:passwordview:1.0.0'
}

支持属性:

length:密码长度
outBorderColor:外边框颜色
inBorderColor:内边框颜色
contentHidden:内容是否隐藏
textSize:字体大小
placeholderText:占位符文字(一位)

布局文件:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.cornor.pwdinputdemo.MainActivity">

        <com.cornor.passwordview.PwdInputView
            android:id="@+id/pwdInpuView"
            android:layout_width="match_parent"
            android:layout_height="80dp"
            app:length="4"
            app:textSize="14sp"
            app:contentHidden="true"
            app:inBorderColor="@color/colorPrimary"
            app:outBorderColor="@color/colorPrimary"
            app:placeholderText="▪"
        >

    </com.cornor.passwordview.PwdInputView>


    <com.cornor.passwordview.NumInputView
        android:layout_below="@+id/pwdInpuView"
        android:id="@+id/numInpuView"
        android:layout_marginTop="5dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    >

    </com.cornor.passwordview.NumInputView>

</RelativeLayout>

pwdinputview's People

Contributors

wangankang avatar

Watchers

 avatar

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.