Pin View Goodiebag
in Gradle do this..
plugins {
id 'com.android.application'
}
android {
namespace 'com.daizzyinfo.food18'
compileSdk 33
defaultConfig {
applicationId "com.daizzyinfo.food18"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// bottom Navigation
implementation 'com.github.ismaeldivita:chip-navigation-bar:1.4.0'
// rating bar
implementation 'com.github.whinc:ratingbar:1.1.1'
implementation 'androidx.navigation:navigation-fragment:2.5.3'
implementation 'androidx.navigation:navigation-ui:2.5.3'
// Image Slider
implementation 'com.github.denzcoskun:ImageSlideshow:0.1.2'
//progressBar Button
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
//pinView
implementation 'com.github.aabhasr1:OtpView:v1.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13.2'
//pin_view
implementation 'com.github.GoodieBag:Pinview:v1.5'
implementation 'com.github.GoodieBag:Pinview:v1.4'
// progressbar spin kit
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
// Text Input layout
implementation 'com.google.android.material:material:1.0.0'
// retrofit dependencies
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
implementation 'com.squareup.retrofit2:converter-gson:2.7.2'
implementation 'com.squareup.okhttp3:okhttp:3.6.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.1.0'
// swipe refresh
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
// Glide Library
implementation 'com.github.bumptech.glide:glide:4.15.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:<version>'
// Circular ImageView
implementation 'de.hdodenhof:circleimageview:3.1.0'
// Fancy Dialog Box....
implementation 'com.github.Shashank02051997:FancyGifDialog-Android:1.5'
implementation 'com.github.Shashank02051997:FancyAlertDialog-Android:0.3'
//Custom dialog box..
implementation 'com.github.gabriel-TheCode:AestheticDialogs:1.3.6'
// Internet Connection
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
androidTestImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
// implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.multidex:multidex:2.0.1"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.databinding:databinding-runtime:8.0.2'
testImplementation 'junit:junit:4.13.2'
// Firebase
implementation('com.google.android.gms:play-services-analytics:18.0.2') {
exclude group: 'com.google.android.gms', module: 'play-services-ads-identifier'
}
implementation 'com.google.firebase:firebase-analytics:21.3.0'
implementation 'com.google.firebase:firebase-analytics-ktx:21.3.0'
implementation 'com.github.ErrorxCode:ModernOnboarding:v1.5'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.github.AppIntro:AppIntro:6.2.0'
// Material design library for android
implementation 'com.google.android.material:material:1.9.0'
}
selected
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:color="@color/Orange"
android:width="1dp"/>
<corners android:radius="5dp"/>
</shape>
selector..
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/selected_pinbg"
android:color="@color/Orange" /> <!-- pressed -->
<item android:state_focused="true"
android:drawable="@drawable/selected_pinbg"
android:color="@color/Orange" /> <!-- focused -->
<item
android:drawable="@drawable/selected_pinbg"
android:color="@color/Orange" android:state_selected="true" />
<!-- <item-->
<!-- android:drawable="@drawable/bg_verification"-->
<!-- android:color="@color/Orange" android:state_selected="false" />-->
<item
android:drawable="@drawable/bg_verification"
android:color="@color/gray" />
<!-- default -->
</selector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".activities.Verification">
<include
android:id="@+id/VerifyHeader"
layout="@layout/custom_toolbar">
</include>
<ImageView
android:layout_marginTop="80dp"
android:layout_width="95dp"
android:layout_height="95dp"
android:src="@drawable/verification"
android:layout_gravity="center"
>
</ImageView>
<TextView
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:fontFamily="@font/roboto_medium"
android:textColor="@color/black"
android:text="Verify your Mobile Number"
>
</TextView>
<TextView
android:layout_marginHorizontal="20dp"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_regular"
android:text="We sent you a 4 digit code to verify"
>
</TextView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
>
<TextView
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_regular"
android:text="your mobile"
>
</TextView>
<TextView
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_bold"
android:text="( +91 "
>
</TextView>
<TextView
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_bold"
android:text="912 345 6789"
>
</TextView>
<TextView
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_bold"
android:text=" )"
>
</TextView>
<TextView
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_regular"
android:text=" Enter in the"
>
</TextView>
</LinearLayout>
<TextView
android:layout_gravity="center"
android:layout_marginTop="1dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="16sp"
android:fontFamily="@font/roboto_regular"
android:text="field below."
>
</TextView>
<LinearLayout
android:visibility="gone"
android:layout_marginTop="1dp"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:fontFamily="@font/roboto_medium"
android:text="Your OTP is "
android:textSize="14sp"
android:textColor="@color/black"
>
</TextView>
<TextView
android:id="@+id/txtOtp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="01:00"
android:paddingHorizontal="5dp"
android:textSize="14sp"
android:fontFamily="@font/roboto_bold"
android:textColor="@color/red"
>
</TextView>
</LinearLayout>
<com.goodiebag.pinview.Pinview
android:layout_marginTop="10dp"
android:id="@+id/pin_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cursorVisible="true"
app:forceKeyboard="false"
app:hint="0"
app:inputType="number"
app:password="true"
app:pinBackground="@drawable/pin_view_selector"
app:pinHeight="50dp"
app:pinLength="4"
app:pinWidth="60dp" />
<LinearLayout
android:layout_marginTop="10dp"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:fontFamily="@font/roboto_regular"
android:text="Didn't get the code ? "
android:textSize="14sp"
android:textColor="@color/black"
>
</TextView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="Resend it"
android:textSize="14sp"
android:fontFamily="@font/roboto_bold"
android:textColor="@color/black"
>
</TextView>
</LinearLayout>
<LinearLayout
android:layout_marginTop="1dp"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:fontFamily="@font/roboto_medium"
android:text="Expires in "
android:textSize="14sp"
android:textColor="@color/black"
>
</TextView>
<TextView
android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="01:00"
android:paddingHorizontal="5dp"
android:textSize="14sp"
android:fontFamily="@font/roboto_bold"
android:textColor="@color/red"
>
</TextView>
</LinearLayout>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/SubmitBtn"
android:layout_marginTop="20dp"
android:layout_width="match_parent"
android:layout_height="48dp"
android:textAllCaps="false"
android:textSize="18sp"
android:text="Submit"
android:textColor="@color/white"
android:backgroundTint="@color/red"
android:layout_marginHorizontal="100dp"
android:background="@drawable/btn_bg"
>
</androidx.appcompat.widget.AppCompatButton>
</LinearLayout>
Comments
Post a Comment