Skip to content
Open

Ui #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/markdown-navigator-enh.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions .idea/markdown-navigator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ dependencies {
implementation "androidx.browser:browser:1.2.0"


//Design
implementation 'com.airbnb.android:lottie:3.6.0'
///pin view for otp
implementation 'com.chaos.view:pinview:1.4.4'
}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/Design">
<activity android:name=".OtpActivity"></activity>
<activity android:name=".PhoneNoActivity" />
<activity android:name=".IntroActivity">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class IntroActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_intro)

findViewById<Button>(R.id.button).setOnClickListener {
findViewById<Button>(R.id.nextBtn).setOnClickListener {
startActivity(Intent(this, PhoneNoActivity::class.java))
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/puldroid/cbmessenger/OtpActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class OtpActivity : AppCompatActivity() {
findViewById<TextView>(R.id.counterTv)
}
val otpEt by lazy {
findViewById<TextView>(R.id.sentcodeEt)
findViewById<TextView>(R.id.firstPinView)
}
val verificationBtn by lazy {
findViewById<Button>(R.id.verificationBtn)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/puldroid/cbmessenger/PhoneNoActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const val PHONE_NUMBER = "phone"
class PhoneNoActivity : AppCompatActivity() {

val phoneNoEt: EditText by lazy {
findViewById<EditText>(R.id.phoneNumberEt)
findViewById<EditText>(R.id.mobileET)
}

val button: Button by lazy {
Expand All @@ -38,7 +38,7 @@ class PhoneNoActivity : AppCompatActivity() {
}

private fun checkNumber() {
countryCode = findViewById<CountryCodePicker>(R.id.ccp).selectedCountryCodeWithPlus
countryCode = findViewById<CountryCodePicker>(R.id.cpp).selectedCountryCodeWithPlus
phoneNumber = countryCode + phoneNoEt.text.toString()

//Add some validation here
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/drawable-v24/cousir.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="3dp" />
<solid android:color="@color/colorPrimaryVariant" />
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/font/advent_pro_medium.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="name=Advent Pro&amp;weight=500"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
7 changes: 7 additions & 0 deletions app/src/main/res/font/archivo_narrow.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="Archivo Narrow"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
81 changes: 43 additions & 38 deletions app/src/main/res/layout/activity_intro.xml
Original file line number Diff line number Diff line change
@@ -1,47 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="#fff"
tools:context=".IntroActivity">
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"
tools:context=".IntroActivity">

<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.298"
app:srcCompat="@drawable/ic_onlinelogo2020" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottieAnimationView"
android:layout_width="315dp"
android:layout_height="444dp"
android:layout_marginTop="8dp"
app:lottie_rawRes="@raw/intro"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="28dp"
android:fontFamily="casual"
android:text="Welcome to CBMessenger"
android:textColor="@color/colorPrimary"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView2" />
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:padding="20dp"
android:text="@string/take_privacy_with_you_be_yourself_in_every_message"
android:textAlignment="center"
android:textColor="#0C0C0C"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@+id/nextBtn"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lottieAnimationView" />

<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="28dp"
android:text="Continue"
android:id="@+id/nextBtn"
android:layout_width="315dp"
android:layout_height="60dp"
android:layout_marginTop="11dp"
android:layout_marginBottom="36dp"
android:fontFamily="sans-serif-medium"
android:text="@string/continueF"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.593"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />

android:paddingHorizontal="40dp"
android:paddingVertical="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
79 changes: 41 additions & 38 deletions app/src/main/res/layout/activity_otp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,26 @@
android:padding="4dp"
android:textSize="16sp" />

<EditText
android:id="@+id/sentcodeEt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:imeActionId="6"
android:imeActionLabel="Send"
android:imeOptions="actionUnspecified"
android:inputType="phone"
android:letterSpacing="0.8"
android:maxLines="1"
android:maxLength="6"
android:hint="------"
android:padding="10dp"
android:singleLine="true"
android:textAlignment="center"
android:textSize="24sp" />
<com.chaos.view.PinView
android:id="@+id/firstPinView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
style="@style/PinWidget.PinView"
app:itemCount="6"
android:textStyle="bold"
android:itemBackground="#E4DCE4"
app:lineColor="@color/colorPrimaryVariant"
app:itemRadius="5dp"
app:itemWidth="50dp"
android:inputType="number"
android:cursorVisible="true"
app:cursorColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/mobileN"
tools:ignore="MissingConstraints" />

<TextView
android:layout_width="wrap_content"
Expand All @@ -69,29 +72,29 @@
android:textSize="16sp" />

<com.google.android.material.button.MaterialButton
android:id="@+id/verificationBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:padding="15dp"
android:text="send verification code"
android:textAllCaps="true"
android:textColor="#fff"
android:textSize="16sp"
app:cornerRadius="5dp" />
android:id="@+id/verificationBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:padding="15dp"
android:text="send verification code"
android:textAllCaps="true"
android:textColor="#fff"
android:textSize="16sp"
app:cornerRadius="5dp" />

<com.google.android.material.button.MaterialButton
android:id="@+id/resendBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:enabled="false"
android:gravity="center"
android:padding="15dp"
android:text="Resend SMS"
android:textColor="#fff"
android:textSize="16sp"
app:cornerRadius="5dp" />
android:id="@+id/resendBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:enabled="false"
android:gravity="center"
android:padding="15dp"
android:text="Resend SMS"
android:textColor="#fff"
android:textSize="16sp"
app:cornerRadius="5dp" />


</LinearLayout>
Loading