Commit bd2591df authored by divyanshu's avatar divyanshu

onboarding screen

parent 212b870f
package chat.rocket.android.authentication.onboarding
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import chat.rocket.android.R
class OnBoardingFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_on_boarding, container, false)
}
companion object {
fun newInstance() = OnBoardingFragment()
}
}
...@@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity ...@@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity
import chat.rocket.android.R import chat.rocket.android.R
import chat.rocket.android.authentication.domain.model.LoginDeepLinkInfo import chat.rocket.android.authentication.domain.model.LoginDeepLinkInfo
import chat.rocket.android.authentication.domain.model.getLoginDeepLinkInfo import chat.rocket.android.authentication.domain.model.getLoginDeepLinkInfo
import chat.rocket.android.authentication.onboarding.OnBoardingFragment
import chat.rocket.android.authentication.presentation.AuthenticationPresenter import chat.rocket.android.authentication.presentation.AuthenticationPresenter
import chat.rocket.android.authentication.server.ui.ServerFragment import chat.rocket.android.authentication.server.ui.ServerFragment
import chat.rocket.android.util.extensions.addFragment import chat.rocket.android.util.extensions.addFragment
...@@ -67,7 +68,8 @@ class AuthenticationActivity : AppCompatActivity(), HasSupportFragmentInjector { ...@@ -67,7 +68,8 @@ class AuthenticationActivity : AppCompatActivity(), HasSupportFragmentInjector {
fun showServerInput(deepLinkInfo: LoginDeepLinkInfo?) { fun showServerInput(deepLinkInfo: LoginDeepLinkInfo?) {
addFragment("ServerFragment", R.id.fragment_container, allowStateLoss = true) { addFragment("ServerFragment", R.id.fragment_container, allowStateLoss = true) {
ServerFragment.newInstance(deepLinkInfo) // ServerFragment.newInstance(deepLinkInfo)
OnBoardingFragment.newInstance()
} }
} }
} }
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="30dp"
android:height="30dp"
android:viewportWidth="30"
android:viewportHeight="30">
<path
android:strokeColor="#1D74F5"
android:strokeWidth="1.5"
android:strokeLineCap="round"
android:pathData="M13.086 8.636l4.242-4.243a5.5 5.5 0 0 1 7.779 7.779l-4.243 4.242a5.5 5.5 0 0 1-7.778 0" />
<path
android:strokeColor="#1D74F5"
android:strokeWidth="1.5"
android:strokeLineCap="round"
android:pathData="M15.914 21.364l-4.242 4.243a5.5 5.5 0 0 1-7.779-7.779l4.243-4.242a5.5 5.5 0 0 1 7.778 0" />
</vector>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="31dp"
android:height="30dp"
android:viewportWidth="31"
android:viewportHeight="30">
<group
android:translateX="1"
android:translateY="2">
<path
android:fillColor="#C1262D"
android:pathData="M29.246 12.423c0-1.47-0.439-2.877-1.306-4.186-0.778-1.175-1.868-2.216-3.24-3.092-2.65-1.692-6.13-2.624-9.803-2.624a20.92 20.92 0 0 0-3.608 0.309 11.94 11.94 0 0 0-2.48-1.778C3.992-1.282 0 0.997 0 0.997s3.712 3.05 3.109 5.723C1.448 8.367 0.548 10.354 0.548 12.423v0.04c0 2.068 0.9 4.054 2.56 5.702C3.713 20.838 0 23.888 0 23.888s3.993 2.279 8.808-0.055a11.958 11.958 0 0 0 2.48-1.778c1.174 0.205 2.382 0.309 3.61 0.309 3.672 0 7.153-0.932 9.802-2.624 1.372-0.876 2.462-1.916 3.24-3.092 0.867 -1.309 1.306-2.717 1.306-4.185v-0.02-0.02z" />
<path
android:fillColor="#FFF"
android:pathData="M14.897 4.597c6.8 0 12.313 3.521 12.313 7.865 0 4.343-5.513 7.865-12.313 7.865-1.514 0-2.964-0.175-4.304-0.494-1.361 1.637-4.356 3.915-7.266 3.179 0.946 -1.017 2.348-2.734 2.048-5.564-1.744-1.357-2.79-3.093-2.79-4.986 0-4.344 5.512-7.865 12.312-7.865" />
<path
android:fillColor="#C1262D"
android:pathData="M 14.897 11.079 C 15.8005378507 11.079 16.533 11.8114621493 16.533 12.715 C 16.533 13.6185378507 15.8005378507 14.351 14.897 14.351 C 13.9934621493 14.351 13.261 13.6185378507 13.261 12.715 C 13.261 11.8114621493 13.9934621493 11.079 14.897 11.079 Z" />
<path
android:fillColor="#C1262D"
android:pathData="M 20.584 11.079 C 21.4875378507 11.079 22.22 11.8114621493 22.22 12.715 C 22.22 13.6185378507 21.4875378507 14.351 20.584 14.351 C 19.6804621493 14.351 18.948 13.6185378507 18.948 12.715 C 18.948 11.8114621493 19.6804621493 11.079 20.584 11.079 Z" />
<path
android:fillColor="#C1262D"
android:pathData="M 9.21 11.08 C 10.112985566 11.08 10.845 11.812014434 10.845 12.715 C 10.845 13.617985566 10.112985566 14.35 9.21 14.35 C 8.30701443403 14.35 7.575 13.617985566 7.575 12.715 C 7.575 11.812014434 8.30701443403 11.08 9.21 11.08 Z" />
<path
android:fillColor="#CCC"
android:pathData="M14.897 19.292c-1.514 0-2.964-0.152-4.304-0.429-1.202 1.254-3.678 2.939-6.244 2.877a9.71 9.71 0 0 1-1.022 1.271c2.91 0.736 5.905-1.54 7.266-3.179 1.34 0.32 2.79 0.495 4.304 0.495 6.746 0 12.223-3.466 12.31-7.761-0.087 3.723-5.564 6.726-12.31 6.726z" />
</group>
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="#e1e5e8" />
<corners android:radius="2dp" />
</shape>
\ No newline at end of file
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="@color/colorAccent" /> <solid android:color="@color/colorAccent" />
<corners android:radius="4dp"/> <corners android:radius="2dp"/>
</shape> </shape>
\ No newline at end of file
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/colorWhite"
tools:context="chat.rocket.android.authentication.onboarding.OnBoardingFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="40dp"
android:paddingBottom="40dp">
<ImageView
android:id="@+id/image_on_boarding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_onboarding"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/text_onboarding_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="24sp"
android:fontFamily="sans-serif"
android:textStyle="bold"
android:textColor="#2f343d"
android:lineSpacingExtra="4sp"
android:text="Welcome to Rocket.Chat"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/image_on_boarding"
android:layout_marginTop="32dp" />
<TextView
android:id="@+id/text_onboarding_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:fontFamily="sans-serif"
android:textStyle="normal"
android:textColor="#54585e"
android:lineSpacingExtra="4sp"
android:text="Open Source Communication"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_onboarding_title"
android:layout_marginTop="8dp"/>
<RelativeLayout
android:id="@+id/view_connect_server"
android:layout_width="0dp"
android:layout_height="60dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_onboarding_description"
android:layout_marginTop="48dp"
android:background="@drawable/rounded_border"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
>
<ImageView
android:id="@+id/image_connect_server"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_connect_server_30dp"
android:layout_centerVertical="true"
android:layout_marginStart="15dp"
android:layout_marginEnd="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17sp"
android:fontFamily="sans-serif"
android:textStyle="bold"
android:textColor="#1d74f5"
android:letterSpacing="0.04"
android:text="Connect with a server"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/image_connect_server" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:src="@drawable/ic_chevron_right_black_24dp"
android:tint="#CBCED1"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/view_join_community"
android:layout_width="0dp"
android:layout_height="60dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_connect_server"
android:layout_marginTop="10dp"
android:background="@drawable/rounded_border"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
>
<ImageView
android:id="@+id/image_join_community"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_rocket_chat"
android:layout_centerVertical="true"
android:layout_marginStart="15dp"
android:layout_marginEnd="20dp"/>
<TextView
android:id="@+id/text_join_community"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17sp"
android:fontFamily="sans-serif"
android:textStyle="bold"
android:textColor="#1d74f5"
android:letterSpacing="0.04"
android:text="Join in the community"
android:layout_marginTop="10dp"
android:layout_toEndOf="@id/image_join_community" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:fontFamily="sans-serif"
android:textStyle="normal"
android:textColor="#9ea2a8"
android:letterSpacing="0.04"
android:text="open.rocket.chat"
android:layout_below="@id/text_join_community"
android:layout_toEndOf="@id/image_join_community"/>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:src="@drawable/ic_chevron_right_black_24dp"
android:tint="#CBCED1"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="60dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/view_join_community"
android:layout_marginTop="10dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/rounded_color_accent">
<ImageView
android:id="@+id/image_new_server"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_add_24dp"
android:tint="@color/colorWhite"
android:layout_centerVertical="true"
android:layout_marginStart="15dp"
android:layout_marginEnd="20dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17sp"
android:fontFamily="sans-serif"
android:textStyle="bold"
android:textColor="#fff"
android:letterSpacing="0.04"
android:text="Connect with a server"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/image_new_server" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<!-- Main colors --> <!-- Main colors -->
<color name="colorPrimary">#FF303030</color> <!-- Material Grey 850 --> <color name="colorPrimary">#FF303030</color> <!-- Material Grey 850 -->
<color name="colorPrimaryDark">#FF212121</color> <!-- Material Grey 900 --> <color name="colorPrimaryDark">#FF212121</color> <!-- Material Grey 900 -->
<color name="colorAccent">#FF1976D2</color> <!-- Material Blue 700 --> <color name="colorAccent">#1d74f5</color>
<!-- Text colors --> <!-- Text colors -->
<color name="colorPrimaryText">#DE000000</color> <color name="colorPrimaryText">#DE000000</color>
......
...@@ -10,7 +10,7 @@ buildscript { ...@@ -10,7 +10,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-beta02' classpath 'com.android.tools.build:gradle:3.2.0-beta04'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}" classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
classpath 'com.google.gms:google-services:3.2.0' classpath 'com.google.gms:google-services:3.2.0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment