کتابخانه اندروید FormInputs بررسی ورودی های کاربر

کتابخانه اندروید FormInputs برای اکتیویتی ثبت نام
FormInputs
سلام و احترام خدمت کاربران گرامی سایت خانه اندروید در خدمت شما هستیم با توضیح کتابخانه قدرتمند دیگر برای اندروید استودیو . حتما براتون پیش اومده که قصد دارین فرم های ثبت نام خودتون رو بررسی کنید ببنید ایا کاربر به درستی به عنوان مثال شماره موبایل نام و… خود را به درستی وارد می کنید یا خیر ! خوب امروز می خواستم کتابخانه رو خدمتون معرفی کنم این کارو با سهولت بیشتری و با انمیشن تیک سبز و در مقابل اگر اشتباهی وارد شود به او پیغام مربوطه را می دهد.
برای افزودن این کتابخانه :
موارد زیر را به قسمت بیلد گردل خودتون اضافه کنید توی اندروید استودیو و سپس مراحل زیر را با هم پیش بریم.
کتابخانه اندروید FormInputs بررسی ورودی های کاربر
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.OmarShehe.FormInputs:forminputkotlin:1.0.1'
}
خوب حالا که با موفقیت کتابخانه را اضافه کردین نیازمند این هستین که اکتیویتی را پیاده سازی کنید و به جای دکمه و … از قابلیت خود کتابخانه استفاده کنید که به صورت کاستوم پیاده سازی شده است .
برای بررسی spinner
<com.omarshehe.forminputkotlin.FormInputSpinner
android:id="@+id/gender"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:customer_hint="Select gender"
app:customer_array="@array/array_gender"
app:customer_isMandatory="true"
app:customer_label="Gender"
app:customer_value="" />
برای بررسی Auto Complete
<com.omarshehe.forminputjava.FormInputLayout
android:id="@+id/company"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:inputType="textAutoCorrect"
app:customer_array="@array/array_company"
app:customer_component="autoComplete"
app:customer_inputType="text"
app:customer_hint="Enter your company"
app:customer_isMandatory="true"
app:customer_label="Company" />
برای بررسی Text مثل نام
<com.omarshehe.forminputkotlin.FormInputText
android:id="@+id/fullName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:inputType="textAutoCorrect"
app:customer_hint="Your full name"
app:customer_inputType="text"
app:customer_isMandatory="true"
app:customer_label="Full Name"
app:customer_value="" />
برای بررسی شماره موبایل
<com.omarshehe.forminputkotlin.FormInputText
android:id="@+id/phoneNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:customer_hint="Your phone number"
app:customer_inputType="phoneNumber"
app:customer_isMandatory="true"
app:customer_label="Phone Number"
app:customer_value=""/>
برای بررسی عدد
<com.omarshehe.forminputkotlin.FormInputText
android:id="@+id/ID"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:customer_hint="Your ID number"
app:customer_inputType="number"
app:customer_isMandatory="false"
app:customer_label="ID Number"
app:customer_value=""/>
برای بررسی ایمیل
<com.omarshehe.forminputkotlin.FormInputText
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:inputType="textAutoCorrect"
app:customer_hint="Your email address"
app:customer_inputType="email"
app:customer_isMandatory="true"
app:customer_label="Email"
app:customer_value=""/>
برای بررسی چند خطی یا multi line
<com.omarshehe.forminputkotlin.FormInputMultiline
android:id="@+id/about"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:customer_height="250"
app:customer_hint="About you"
app:customer_isMandatory="true"
app:customer_label="About you"
app:customer_value=""
app:customer_maxLength="500"/>
برای بررسی رمز یا پسورد عبور
<com.omarshehe.forminputkotlin.FormInputPassword
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:inputType="textPassword"
app:customer_hint="Your password"
app:customer_isMandatory="true"
app:customer_label="Password"
app:customer_showPassStrength="true"
app:customer_value="" />
خانه اندروید




قبل از ارسال دیدگاه
بدون دیدگاه