Refer to CHANGELOG.MD for full logs.
Signed-off-by: psavarmattas <puranjaysavarmattas@gmail.com>
1
.gitignore
vendored
@@ -83,3 +83,4 @@ lint/generated/
|
||||
lint/outputs/
|
||||
lint/tmp/
|
||||
# lint/reports/
|
||||
/app/google-services.json
|
||||
|
||||
14
.idea/misc.xml
generated
@@ -3,11 +3,25 @@
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.342" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/drawable/ic_launcher_background.xml" value="0.342" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_login.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_main.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_profile.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_reset_password.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_signup.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/activity_splash.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/content_reset_password.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_chats.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_contacts.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_login.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_profile.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_reset_password.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_settings.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/fragment_signup.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/layout/splash_screen.xml" value="0.34010416666666665" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.342" />
|
||||
<entry key="..\:/Maneesha/GitHub/Project-Chatcom/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.169" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
1
.idea/render.experimental.xml
generated
@@ -2,5 +2,6 @@
|
||||
<project version="4">
|
||||
<component name="RenderSettings">
|
||||
<option name="quality" value="0.25" />
|
||||
<option name="showDecorations" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,5 +1,14 @@
|
||||
## 0.0.2
|
||||
1. Login, Reset Password & Sign-in Activity
|
||||
2. Added Firebase SDK for basic analytics.
|
||||
3. Added Firebase SDK for Performance.
|
||||
4. Added Firebase SDK for Crash Logs (If anytime the app crashes).
|
||||
5. Added Google SafetyNet for extra security.
|
||||
6. Project structure created.
|
||||
7. Splash Screen Re-structured.
|
||||
8. Dark/Light Mode added.
|
||||
9. Added Profile check in settings.
|
||||
10. Code cleanup.
|
||||
|
||||
## 0.0.1
|
||||
1. Three Tabbed view
|
||||
|
||||
201
LICENSE.MD
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2022 PSMForums
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
45
README.md
@@ -1,4 +1,47 @@
|
||||
# chatcom
|
||||
Chat with anyone you like through the power of chatcom.
|
||||
This app provides End-To-End Encryption so that the word doesn't leak out.
|
||||
|
||||
By PSM & Masood
|
||||
## Features:
|
||||
1. Login, Reset Password & Sign-in Activity
|
||||
2. Added Firebase SDK for basic analytics.
|
||||
3. Added Firebase SDK for Performance.
|
||||
4. Added Firebase SDK for Crash Logs (If anytime the app crashes).
|
||||
5. Added Google SafetyNet for extra security.
|
||||
6. Dark/Light Mode added.
|
||||
7. Profile check in settings.
|
||||
8. Three Tabbed view
|
||||
|
||||
For More info view the [CHANGELOGS HERE](https://github.com/psavarmattas/chatcom/blob/main/CHANGELOG.MD)
|
||||
|
||||
## ScreenShots:
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Contributors:
|
||||
|
||||
<a href="https://github.com/psavarmattas/chatcom/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=psavarmattas/chatcom" />
|
||||
</a>
|
||||
|
||||
## [License](https://github.com/psavarmattas/chatcom/blob/main/LICENSE.MD)
|
||||
|
||||
Copyright 2022 PSMForums
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'com.google.gms.google-services'
|
||||
id 'com.google.firebase.firebase-perf'
|
||||
id 'com.google.firebase.crashlytics'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -11,7 +15,7 @@ android {
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName '0.0.1'
|
||||
versionName '0.0.2'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
signingConfig signingConfigs.debug
|
||||
@@ -31,6 +35,10 @@ android {
|
||||
}
|
||||
buildToolsVersion '32.0.0'
|
||||
ndkVersion '23.1.7779620'
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
dataBinding = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -40,7 +48,31 @@ dependencies {
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
//viewpager2 Dependency
|
||||
implementation 'androidx.viewpager2:viewpager2:1.0.0'
|
||||
|
||||
//Material Design
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
|
||||
//Firebase Dependencies
|
||||
//The Firebase BoM
|
||||
implementation platform('com.google.firebase:firebase-bom:29.0.4')
|
||||
//Firebase SDK for Google Analytics
|
||||
implementation 'com.google.firebase:firebase-analytics-ktx'
|
||||
//Firebase SDK for SafetyNet
|
||||
implementation 'com.google.firebase:firebase-appcheck-safetynet:16.0.0-beta04'
|
||||
//Firebase SDK for Performance
|
||||
implementation 'com.google.firebase:firebase-perf-ktx'
|
||||
//Firebase SDk for Crashlytics
|
||||
implementation 'com.google.firebase:firebase-crashlytics-ktx'
|
||||
//Firebase SDK for User Authentication
|
||||
implementation 'com.firebaseui:firebase-ui-auth:8.0.0'
|
||||
implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
|
||||
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.chatcom">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@@ -10,7 +12,8 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Chatcom">
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:name=".splashScreen.SplashScreen"
|
||||
android:theme="@style/Theme.Chatcom"
|
||||
android:exported="true" >
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -18,10 +21,21 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".accountScreens.SignupActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".accountScreens.LoginActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".accountScreens.ProfileActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".accountScreens.ResetPasswordActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
BIN
app/src/main/ic_launcher-playstore.png
Normal file
|
After Width: | Height: | Size: 148 KiB |
@@ -2,60 +2,69 @@ package com.example.chatcom
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.Toolbar
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.viewpager.widget.PagerAdapter
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.example.chatcom.adapters.ViewPagerAdapter
|
||||
import com.example.chatcom.mainScreens.Chats
|
||||
import com.example.chatcom.mainScreens.Contacts
|
||||
import com.example.chatcom.mainScreens.Settings
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.google.firebase.FirebaseApp
|
||||
import com.google.firebase.analytics.FirebaseAnalytics
|
||||
import com.google.firebase.analytics.ktx.analytics
|
||||
import com.google.firebase.appcheck.FirebaseAppCheck
|
||||
import com.google.firebase.appcheck.safetynet.SafetyNetAppCheckProviderFactory
|
||||
import com.google.firebase.ktx.Firebase
|
||||
|
||||
|
||||
private lateinit var firebaseAnalytics: FirebaseAnalytics
|
||||
|
||||
val tabItemList = arrayOf(
|
||||
"Chats",
|
||||
"Contacts",
|
||||
"Settings"
|
||||
)
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var viewPager2: ViewPager2
|
||||
private lateinit var tabLayout : TabLayout
|
||||
private lateinit var toolbar: androidx.appcompat.widget.Toolbar
|
||||
private lateinit var appPagerAdapter: AppPagerAdapter
|
||||
private var titles = arrayListOf("Chats","Contacts","Settings")
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
toolbar = findViewById(R.id.toolbarMain)
|
||||
tabLayout = findViewById(R.id.tabLayoutMain)
|
||||
viewPager2 = findViewById(R.id.viewPager2Main)
|
||||
toolbar.title = "ChatCom"
|
||||
firebaseAnalytics = Firebase.analytics
|
||||
|
||||
setSupportActionBar(toolbar)
|
||||
FirebaseApp.initializeApp(this)
|
||||
val firebaseAppCheck = FirebaseAppCheck.getInstance()
|
||||
firebaseAppCheck.installAppCheckProviderFactory(
|
||||
SafetyNetAppCheckProviderFactory.getInstance()
|
||||
)
|
||||
|
||||
appPagerAdapter = AppPagerAdapter( this)
|
||||
viewPager2.adapter = appPagerAdapter
|
||||
val tabLayout = findViewById<TabLayout>(R.id.tabBar)
|
||||
val viewPager2 = findViewById<ViewPager2>(R.id.viewPager)
|
||||
|
||||
TabLayoutMediator(tabLayout,viewPager2){
|
||||
tab,position->
|
||||
tab.text = titles[position]
|
||||
val adapter = ViewPagerAdapter(supportFragmentManager,lifecycle)
|
||||
|
||||
viewPager2.adapter = adapter
|
||||
|
||||
TabLayoutMediator(tabLayout,viewPager2){tab, position ->
|
||||
when(position){
|
||||
0 -> {
|
||||
tab.text="Chats"
|
||||
}
|
||||
1 -> {
|
||||
tab.text="Contacts"
|
||||
}
|
||||
2 -> {
|
||||
tab.text="Settings"
|
||||
}
|
||||
}
|
||||
}.attach()
|
||||
}
|
||||
|
||||
class AppPagerAdapter(fragmentActivity: FragmentActivity):FragmentStateAdapter(fragmentActivity) {
|
||||
override fun getItemCount(): Int {
|
||||
return 3
|
||||
}
|
||||
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
return when(position)
|
||||
{
|
||||
0-> Chats()
|
||||
2-> Contacts()
|
||||
3-> Settings()
|
||||
else -> Chats()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.example.chatcom.accountScreens
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.util.Patterns
|
||||
import android.widget.Toast
|
||||
import com.example.chatcom.R
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignIn
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInClient
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
|
||||
import com.google.android.gms.common.api.ApiException
|
||||
import com.google.android.gms.tasks.Task
|
||||
import com.google.firebase.auth.FirebaseAuth
|
||||
import com.google.firebase.auth.FirebaseUser
|
||||
import com.google.firebase.auth.GoogleAuthProvider
|
||||
import kotlinx.android.synthetic.main.activity_login.*
|
||||
|
||||
class LoginActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var auth: FirebaseAuth
|
||||
|
||||
//for google sign in/
|
||||
val RC_SIGN_IN: Int = 1
|
||||
lateinit var mGoogleSignInClient: GoogleSignInClient
|
||||
lateinit var mGoogleSignInOptions: GoogleSignInOptions
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_login)
|
||||
configureGoogleSignIn()
|
||||
setupUI()
|
||||
auth = FirebaseAuth.getInstance()
|
||||
|
||||
|
||||
btnSign_up.setOnClickListener {
|
||||
startActivity(Intent(this, SignupActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
btnSign_in.setOnClickListener {
|
||||
doLogin()
|
||||
}
|
||||
reset_pswd.setOnClickListener {
|
||||
startActivity(Intent(this,ResetPasswordActivity::class.java))
|
||||
}
|
||||
}
|
||||
|
||||
private fun doLogin() {
|
||||
if (username.text.toString().isEmpty()) {
|
||||
username.error = "Please enter username"
|
||||
username.requestFocus()
|
||||
return
|
||||
}
|
||||
if (!Patterns.EMAIL_ADDRESS.matcher(username.text.toString()).matches()) {
|
||||
username.error = "Please enter valid email"
|
||||
username.requestFocus()
|
||||
return
|
||||
}
|
||||
if (password.text.toString().isEmpty()) {
|
||||
password.error = "Please enter Password"
|
||||
password.requestFocus()
|
||||
return
|
||||
|
||||
}
|
||||
auth.signInWithEmailAndPassword(username.text.toString(), password.text.toString())
|
||||
.addOnCompleteListener(this) { task ->
|
||||
if (task.isSuccessful) {
|
||||
val user = auth.currentUser
|
||||
Toast.makeText(baseContext, "Sign In Successful!", Toast.LENGTH_SHORT).show()
|
||||
updateUI(user)
|
||||
} else {
|
||||
Toast.makeText(
|
||||
baseContext, "Sign in Failed!",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
updateUI(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override fun onStart() {
|
||||
super.onStart()
|
||||
val currentUser = auth.currentUser
|
||||
updateUI(currentUser)
|
||||
}
|
||||
|
||||
fun updateUI(currentUser: FirebaseUser?) {
|
||||
if (currentUser !== null) {
|
||||
startActivity(Intent(this, ProfileActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
// else {
|
||||
// Toast.makeText(
|
||||
// baseContext, "Sign in Failed!",
|
||||
// Toast.LENGTH_LONG
|
||||
// ).show()
|
||||
// }
|
||||
}
|
||||
|
||||
//google sign in starts here //
|
||||
private fun configureGoogleSignIn() {
|
||||
mGoogleSignInOptions = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
|
||||
.requestIdToken(getString(R.string.default_web_client_id))
|
||||
.requestEmail()
|
||||
.build()
|
||||
mGoogleSignInClient = GoogleSignIn.getClient(this, mGoogleSignInOptions)
|
||||
}
|
||||
|
||||
private fun setupUI() {
|
||||
GSignin.setOnClickListener {
|
||||
signIn()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun signIn() {
|
||||
val signInIntent: Intent = mGoogleSignInClient.signInIntent
|
||||
startActivityForResult(signInIntent, RC_SIGN_IN)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == RC_SIGN_IN) {
|
||||
val task: Task<GoogleSignInAccount> = GoogleSignIn.getSignedInAccountFromIntent(data)
|
||||
try {
|
||||
val account = task.getResult(ApiException::class.java)
|
||||
if (account != null) {
|
||||
firebaseAuthWithGoogle(account)
|
||||
}
|
||||
} catch (e: ApiException) {
|
||||
Toast.makeText(this, "Google sign in failed:(", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun firebaseAuthWithGoogle(acct: GoogleSignInAccount) {
|
||||
val credential = GoogleAuthProvider.getCredential(acct.idToken, null)
|
||||
auth.signInWithCredential(credential).addOnCompleteListener {
|
||||
if (it.isSuccessful) {
|
||||
startActivity(Intent(this, ProfileActivity::class.java))
|
||||
finish()
|
||||
} else {
|
||||
Toast.makeText(this, "Google sign in failed:(", Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.example.chatcom.accountScreens
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import com.example.chatcom.MainActivity
|
||||
import com.example.chatcom.R
|
||||
import com.google.firebase.auth.FirebaseAuth
|
||||
import kotlinx.android.synthetic.main.activity_profile.*
|
||||
|
||||
class ProfileActivity : AppCompatActivity() {
|
||||
private lateinit var auth: FirebaseAuth
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_profile)
|
||||
auth = FirebaseAuth.getInstance()
|
||||
|
||||
val user = FirebaseAuth.getInstance().currentUser
|
||||
|
||||
user?.let {
|
||||
val email = user.email
|
||||
welcome.setText("Welcome "+email+"!")
|
||||
}
|
||||
|
||||
btnSign_out.setOnClickListener {view->
|
||||
Toast.makeText(baseContext,"Logging Out!", Toast.LENGTH_SHORT).show()
|
||||
signOut()
|
||||
}
|
||||
}
|
||||
|
||||
private fun signOut() {
|
||||
FirebaseAuth.getInstance().signOut()
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.example.chatcom.accountScreens
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.example.chatcom.MainActivity
|
||||
import com.example.chatcom.R
|
||||
import com.google.firebase.auth.FirebaseAuth
|
||||
import kotlinx.android.synthetic.main.activity_reset_password.*
|
||||
|
||||
class ResetPasswordActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var auth: FirebaseAuth
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_reset_password)
|
||||
auth = FirebaseAuth.getInstance()
|
||||
|
||||
reset_pswd.setOnClickListener {
|
||||
password_reset()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun password_reset(){
|
||||
auth.sendPasswordResetEmail(username.text.toString())
|
||||
.addOnCompleteListener { task ->
|
||||
if (task.isSuccessful) {
|
||||
Toast.makeText(baseContext,"Reset link Sent!", Toast.LENGTH_SHORT).show()
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
finish()
|
||||
}
|
||||
else {
|
||||
Toast.makeText(baseContext, "User not found!",
|
||||
Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.example.chatcom.accountScreens
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.util.Patterns
|
||||
import android.widget.Toast
|
||||
import com.example.chatcom.MainActivity
|
||||
import com.example.chatcom.R
|
||||
import com.google.firebase.auth.FirebaseAuth
|
||||
import kotlinx.android.synthetic.main.activity_signup.*
|
||||
|
||||
class SignupActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var auth: FirebaseAuth
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_signup)
|
||||
auth = FirebaseAuth.getInstance()
|
||||
|
||||
btnSign_up.setOnClickListener {
|
||||
signupUser()
|
||||
}
|
||||
|
||||
}
|
||||
fun signupUser(){
|
||||
if (username.toString().isEmpty()){
|
||||
username.error = "Please enter email"
|
||||
username.requestFocus()
|
||||
return
|
||||
}
|
||||
if(!Patterns.EMAIL_ADDRESS.matcher(username.text.toString()).matches()){
|
||||
username.error = "Please enter valid Email"
|
||||
username.requestFocus()
|
||||
return
|
||||
}
|
||||
if (password.text.toString().isEmpty()){
|
||||
password.error = "Please enter Password"
|
||||
password.requestFocus()
|
||||
return
|
||||
|
||||
}
|
||||
auth.createUserWithEmailAndPassword(username.text.toString(), password.text.toString())
|
||||
.addOnCompleteListener(this) { task ->
|
||||
if (task.isSuccessful) {
|
||||
Toast.makeText(baseContext,"Yay! You are registered!", Toast.LENGTH_SHORT).show()
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
finish()
|
||||
} else {
|
||||
Toast.makeText(baseContext, "Sign Up Failed",
|
||||
Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.example.chatcom.adapters
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import com.example.chatcom.mainScreens.Chats
|
||||
import com.example.chatcom.mainScreens.Contacts
|
||||
import com.example.chatcom.mainScreens.Settings
|
||||
|
||||
class ViewPagerAdapter(fragmentManager: FragmentManager, lifecycle: Lifecycle): FragmentStateAdapter(fragmentManager, lifecycle) {
|
||||
override fun getItemCount(): Int {
|
||||
return 3
|
||||
}
|
||||
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
return when(position){
|
||||
0 -> {
|
||||
Chats()
|
||||
}
|
||||
1 -> {
|
||||
Contacts()
|
||||
}
|
||||
2 -> {
|
||||
Settings()
|
||||
}
|
||||
else -> {
|
||||
Fragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,27 +7,9 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.example.chatcom.R
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private const val ARG_PARAM1 = "param1"
|
||||
private const val ARG_PARAM2 = "param2"
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
* Use the [Chats.newInstance] factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
class Chats : Fragment() {
|
||||
// TODO: Rename and change types of parameters
|
||||
private var param1: String? = null
|
||||
private var param2: String? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
param1 = it.getString(ARG_PARAM1)
|
||||
param2 = it.getString(ARG_PARAM2)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
@@ -37,24 +19,4 @@ class Chats : Fragment() {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_chats, container, false)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment Chats.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
@JvmStatic
|
||||
fun newInstance(param1: String, param2: String) =
|
||||
Chats().apply {
|
||||
arguments = Bundle().apply {
|
||||
putString(ARG_PARAM1, param1)
|
||||
putString(ARG_PARAM2, param2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,27 +7,11 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.example.chatcom.R
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private const val ARG_PARAM1 = "param1"
|
||||
private const val ARG_PARAM2 = "param2"
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
* Use the [Contacts.newInstance] factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
class Contacts : Fragment() {
|
||||
// TODO: Rename and change types of parameters
|
||||
private var param1: String? = null
|
||||
private var param2: String? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
param1 = it.getString(ARG_PARAM1)
|
||||
param2 = it.getString(ARG_PARAM2)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
@@ -37,24 +21,4 @@ class Contacts : Fragment() {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_contacts, container, false)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment Contacts.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
@JvmStatic
|
||||
fun newInstance(param1: String, param2: String) =
|
||||
Contacts().apply {
|
||||
arguments = Bundle().apply {
|
||||
putString(ARG_PARAM1, param1)
|
||||
putString(ARG_PARAM2, param2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +1,41 @@
|
||||
package com.example.chatcom.mainScreens
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.Fragment
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
import com.example.chatcom.R
|
||||
import com.example.chatcom.accountScreens.LoginActivity
|
||||
import com.google.firebase.auth.FirebaseAuth
|
||||
import kotlinx.android.synthetic.main.fragment_settings.*
|
||||
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private const val ARG_PARAM1 = "param1"
|
||||
private const val ARG_PARAM2 = "param2"
|
||||
|
||||
/**
|
||||
* A simple [Fragment] subclass.
|
||||
* Use the [Settings.newInstance] factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
class Settings : Fragment() {
|
||||
// TODO: Rename and change types of parameters
|
||||
private var param1: String? = null
|
||||
private var param2: String? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
param1 = it.getString(ARG_PARAM1)
|
||||
param2 = it.getString(ARG_PARAM2)
|
||||
}
|
||||
class Settings : Fragment(R.layout.fragment_settings) {
|
||||
|
||||
private lateinit var auth: FirebaseAuth
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
auth = FirebaseAuth.getInstance()
|
||||
|
||||
val user = FirebaseAuth.getInstance().currentUser
|
||||
|
||||
user?.let {
|
||||
val email = user.email
|
||||
// FirebaseAuth.getInstance().currentUser?.displayName
|
||||
profilePageText.setText("Id: " + email + "!")
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_settings, container, false)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment Settings.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
@JvmStatic
|
||||
fun newInstance(param1: String, param2: String) =
|
||||
Settings().apply {
|
||||
arguments = Bundle().apply {
|
||||
putString(ARG_PARAM1, param1)
|
||||
putString(ARG_PARAM2, param2)
|
||||
}
|
||||
checkProfile.setOnClickListener {
|
||||
//FirebaseAuth.getInstance().signOut()
|
||||
Toast.makeText(activity, "Checking Profile Status", Toast.LENGTH_LONG).show()
|
||||
val intent = Intent(activity, LoginActivity::class.java)
|
||||
activity?.startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
package com.example.chatcom
|
||||
package com.example.chatcom.splashScreen
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.view.WindowManager
|
||||
import android.widget.ImageView
|
||||
import com.example.chatcom.MainActivity
|
||||
import com.example.chatcom.R
|
||||
|
||||
class SplashActivity : AppCompatActivity() {
|
||||
class SplashScreen : AppCompatActivity() {
|
||||
private lateinit var imageSplash: ImageView
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_splash)
|
||||
setContentView(R.layout.splash_screen)
|
||||
|
||||
imageSplash = findViewById(R.id.splashView)
|
||||
imageSplash = findViewById(R.id.SplashScreenImage)
|
||||
Handler().postDelayed(
|
||||
{
|
||||
val intent = Intent(this, MainActivity::class.java)
|
||||
@@ -1,30 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
|
Before Width: | Height: | Size: 22 KiB |
@@ -1,170 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
10
app/src/main/res/drawable/ic_login_email_icon.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
|
||||
</vector>
|
||||
91
app/src/main/res/layout/activity_login.xml
Normal file
@@ -0,0 +1,91 @@
|
||||
<?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"
|
||||
tools:context=".accountScreens.LoginActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="30sp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/login_img"
|
||||
android:baselineAligned="false"
|
||||
android:padding="15sp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_width = "100dp"
|
||||
android:layout_height= "100dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=" E-Mail"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10sp"
|
||||
android:textSize="20sp"
|
||||
android:layout_margin="10sp"
|
||||
android:drawableLeft="@drawable/ic_login_email_icon"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=" Password"
|
||||
android:inputType="textPassword"
|
||||
android:textSize="20sp"
|
||||
app:passwordToggleEnabled="true"
|
||||
android:padding="10sp"
|
||||
android:layout_margin="10sp"
|
||||
android:drawableLeft="@drawable/ic_login_password_icon"/>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSign_in"
|
||||
android:layout_width="161dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginTop="30sp"
|
||||
android:text="Sign In"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="@color/colorPrimary"/>
|
||||
|
||||
<TextView android:id="@+id/reset_pswd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Forgot Password?"
|
||||
android:layout_marginTop="10sp"
|
||||
android:padding="15sp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="OR"
|
||||
android:layout_margin="5sp"
|
||||
android:padding="10sp"/>
|
||||
|
||||
<TextView android:id="@+id/GSignin"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Sign in with Google"
|
||||
android:padding="15sp"/>
|
||||
<Button
|
||||
android:id="@+id/btnSign_up"
|
||||
android:layout_width="161dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginTop="15sp"
|
||||
android:text="Sign Up"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="@color/colorPrimary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -8,25 +8,27 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbarMain"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/Mycolor"
|
||||
/>
|
||||
android:background="@color/colorPrimary"
|
||||
app:title="Chatcom"
|
||||
app:titleTextColor="@color/white" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabLayoutMain"
|
||||
android:id="@+id/tabBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/Mycolor"
|
||||
app:tabTextColor="@color/black"
|
||||
app:tabIndicatorColor="@color/black"
|
||||
app:tabIndicatorAnimationMode="elastic"
|
||||
/>
|
||||
android:background="@color/colorPrimary"
|
||||
app:tabIconTint="@color/grey"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextColor="@color/grey" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager2Main"
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
28
app/src/main/res/layout/activity_profile.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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"
|
||||
tools:context=".accountScreens.ProfileActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/welcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"/>
|
||||
<Button
|
||||
android:id="@+id/btnSign_out"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Log Out"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
41
app/src/main/res/layout/activity_reset_password.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
tools:context=".accountScreens.ResetPasswordActivity">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="30sp">
|
||||
-
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=" E-Mail"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10sp"
|
||||
android:textSize="20sp"
|
||||
android:layout_margin="10sp"
|
||||
android:drawableLeft="@drawable/ic_login_email_icon"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/reset_pswd"
|
||||
android:layout_width="161dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginTop="20sp"
|
||||
android:text="Reset Password"
|
||||
android:textSize="18sp"
|
||||
android:textAllCaps="false"
|
||||
android:backgroundTint="@color/colorPrimary"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
61
app/src/main/res/layout/activity_signup.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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"
|
||||
tools:context=".accountScreens.SignupActivity">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="30sp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/login_img"
|
||||
android:baselineAligned="false"
|
||||
android:padding="15sp"
|
||||
android:src="@mipmap/ic_launcher"
|
||||
android:layout_width = "100dp"
|
||||
android:layout_height= "100dp"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=" E-Mail"
|
||||
android:inputType="textEmailAddress"
|
||||
android:padding="10sp"
|
||||
android:textSize="20sp"
|
||||
android:layout_margin="10sp"
|
||||
android:drawableLeft="@drawable/ic_login_email_icon"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint=" Password"
|
||||
android:password="true"
|
||||
android:inputType="textPassword"
|
||||
android:textSize="20sp"
|
||||
app:passwordToggleEnabled="true"
|
||||
android:padding="10sp"
|
||||
android:layout_margin="10sp"
|
||||
android:drawableLeft="@drawable/ic_login_password_icon"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnSign_up"
|
||||
android:layout_width="161dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20sp"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:gravity="center_vertical|center_horizontal"
|
||||
android:text="Sign Up"
|
||||
android:textAllCaps="false"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?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"
|
||||
android:background="@color/white"
|
||||
tools:context=".SplashActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/splashView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/splash"
|
||||
|
||||
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -1,14 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
tools:context=".mainScreens.Settings">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text=" SETTINGS" />
|
||||
android:id="@+id/profilePageText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/checkProfile"
|
||||
app:layout_constraintEnd_toEndOf="@+id/checkProfile"
|
||||
app:layout_constraintStart_toStartOf="@+id/checkProfile"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</FrameLayout>
|
||||
<Button
|
||||
android:id="@+id/checkProfile"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Check Profile"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.060000002" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
19
app/src/main/res/layout/splash_screen.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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"
|
||||
tools:context=".splashScreen.SplashScreen">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/SplashScreenImage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/splashlogo"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
28
app/src/main/res/navigation/nav_graph.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation 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:id="@+id/nav_graph"
|
||||
app:startDestination="@id/FirstFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/FirstFragment"
|
||||
android:name="com.example.chatcom.accountScreens.FirstFragment"
|
||||
android:label="@string/first_fragment_label"
|
||||
tools:layout="@layout/fragment_first">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_FirstFragment_to_SecondFragment"
|
||||
app:destination="@id/SecondFragment" />
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/SecondFragment"
|
||||
android:name="com.example.chatcom.accountScreens.SecondFragment"
|
||||
android:label="@string/second_fragment_label"
|
||||
tools:layout="@layout/fragment_second">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_SecondFragment_to_FirstFragment"
|
||||
app:destination="@id/FirstFragment" />
|
||||
</fragment>
|
||||
</navigation>
|
||||
3
app/src/main/res/values-land/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">48dp</dimen>
|
||||
</resources>
|
||||
@@ -2,13 +2,13 @@
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Chatcom" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/Mycolor</item>
|
||||
<item name="colorPrimaryVariant">@color/Mycolor</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryVariant">@color/colorPrimaryDark</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="colorSecondary">@color/black</item>
|
||||
<item name="colorSecondaryVariant">@color/grey</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
|
||||
3
app/src/main/res/values-w1240dp/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">200dp</dimen>
|
||||
</resources>
|
||||
3
app/src/main/res/values-w600dp/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">48dp</dimen>
|
||||
</resources>
|
||||
@@ -1,146 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="Ivory">#FFFFF0</color>
|
||||
<color name="LightYellow">#FFFFE0</color>
|
||||
<color name="Yellow">#FFFF00</color>
|
||||
<color name="Snow">#FFFAFA</color>
|
||||
<color name="FloralWhite">#FFFAF0</color>
|
||||
<color name="LemonChiffon">#FFFACD</color>
|
||||
<color name="Cornsilk">#FFF8DC</color>
|
||||
<color name="Seashell">#FFF5EE</color>
|
||||
<color name="LavenderBlush">#FFF0F5</color>
|
||||
<color name="PapayaWhip">#FFEFD5</color>
|
||||
<color name="BlanchedAlmond">#FFEBCD</color>
|
||||
<color name="MistyRose">#FFE4E1</color>
|
||||
<color name="Bisque">#FFE4C4</color>
|
||||
<color name="Moccasin">#FFE4B5</color>
|
||||
<color name="NavajoWhite">#FFDEAD</color>
|
||||
<color name="PeachPuff">#FFDAB9</color>
|
||||
<color name="Gold">#FFD700</color>
|
||||
<color name="Pink">#FFC0CB</color>
|
||||
<color name="LightPink">#FFB6C1</color>
|
||||
<color name="Orange">#FFA500</color>
|
||||
<color name="LightSalmon">#FFA07A</color>
|
||||
<color name="DarkOrange">#FF8C00</color>
|
||||
<color name="Coral">#FF7F50</color>
|
||||
<color name="HotPink">#FF69B4</color>
|
||||
<color name="Tomato">#FF6347</color>
|
||||
<color name="OrangeRed">#FF4500</color>
|
||||
<color name="DeepPink">#FF1493</color>
|
||||
<color name="Fuchsia">#FF00FF</color>
|
||||
<color name="Magenta">#FF00FF</color>
|
||||
<color name="Red">#FF0000</color>
|
||||
<color name="OldLace">#FDF5E6</color>
|
||||
<color name="LightGoldenrodYellow">#FAFAD2</color>
|
||||
<color name="Linen">#FAF0E6</color>
|
||||
<color name="AntiqueWhite">#FAEBD7</color>
|
||||
<color name="Salmon">#FA8072</color>
|
||||
<color name="GhostWhite">#F8F8FF</color>
|
||||
<color name="MintCream">#F5FFFA</color>
|
||||
<color name="WhiteSmoke">#F5F5F5</color>
|
||||
<color name="Beige">#F5F5DC</color>
|
||||
<color name="Wheat">#F5DEB3</color>
|
||||
<color name="SandyBrown">#F4A460</color>
|
||||
<color name="Azure">#F0FFFF</color>
|
||||
<color name="Honeydew">#F0FFF0</color>
|
||||
<color name="AliceBlue">#F0F8FF</color>
|
||||
<color name="Khaki">#F0E68C</color>
|
||||
<color name="LightCoral">#F08080</color>
|
||||
<color name="PaleGoldenrod">#EEE8AA</color>
|
||||
<color name="Violet">#EE82EE</color>
|
||||
<color name="DarkSalmon">#E9967A</color>
|
||||
<color name="Lavender">#E6E6FA</color>
|
||||
<color name="LightCyan">#E0FFFF</color>
|
||||
<color name="BurlyWood">#DEB887</color>
|
||||
<color name="Plum">#DDA0DD</color>
|
||||
<color name="Gainsboro">#DCDCDC</color>
|
||||
<color name="Crimson">#DC143C</color>
|
||||
<color name="PaleVioletRed">#DB7093</color>
|
||||
<color name="Goldenrod">#DAA520</color>
|
||||
<color name="Orchid">#DA70D6</color>
|
||||
<color name="Thistle">#D8BFD8</color>
|
||||
<color name="LightGrey">#D3D3D3</color>
|
||||
<color name="Tan">#D2B48C</color>
|
||||
<color name="Chocolate">#D2691E</color>
|
||||
<color name="Peru">#CD853F</color>
|
||||
<color name="IndianRed">#CD5C5C</color>
|
||||
<color name="MediumVioletRed">#C71585</color>
|
||||
<color name="Silver">#C0C0C0</color>
|
||||
<color name="DarkKhaki">#BDB76B</color>
|
||||
<color name="RosyBrown">#BC8F8F</color>
|
||||
<color name="MediumOrchid">#BA55D3</color>
|
||||
<color name="DarkGoldenrod">#B8860B</color>
|
||||
<color name="FireBrick">#B22222</color>
|
||||
<color name="PowderBlue">#B0E0E6</color>
|
||||
<color name="LightSteelBlue">#B0C4DE</color>
|
||||
<color name="PaleTurquoise">#AFEEEE</color>
|
||||
<color name="GreenYellow">#ADFF2F</color>
|
||||
<color name="LightBlue">#ADD8E6</color>
|
||||
<color name="DarkGray">#A9A9A9</color>
|
||||
<color name="Brown">#A52A2A</color>
|
||||
<color name="Sienna">#A0522D</color>
|
||||
<color name="YellowGreen">#9ACD32</color>
|
||||
<color name="DarkOrchid">#9932CC</color>
|
||||
<color name="PaleGreen">#98FB98</color>
|
||||
<color name="DarkViolet">#9400D3</color>
|
||||
<color name="purple_700">#9370DB</color>
|
||||
<color name="purple_200">#9390DB</color>
|
||||
<color name="LightGreen">#90EE90</color>
|
||||
<color name="DarkSeaGreen">#8FBC8F</color>
|
||||
<color name="SaddleBrown">#8B4513</color>
|
||||
<color name="DarkMagenta">#8B008B</color>
|
||||
<color name="DarkRed">#8B0000</color>
|
||||
<color name="BlueViolet">#8A2BE2</color>
|
||||
<color name="LightSkyBlue">#87CEFA</color>
|
||||
<color name="SkyBlue">#87CEEB</color>
|
||||
<color name="Gray">#808080</color>
|
||||
<color name="Olive">#808000</color>
|
||||
<color name="purple_500">#800080</color>
|
||||
<color name="Maroon">#800000</color>
|
||||
<color name="Aquamarine">#7FFFD4</color>
|
||||
<color name="Chartreuse">#7FFF00</color>
|
||||
<color name="LawnGreen">#7CFC00</color>
|
||||
<color name="MediumSlateBlue">#7B68EE</color>
|
||||
<color name="LightSlateGray">#778899</color>
|
||||
<color name="SlateGray">#708090</color>
|
||||
<color name="OliveDrab">#6B8E23</color>
|
||||
<color name="SlateBlue">#6A5ACD</color>
|
||||
<color name="DimGray">#696969</color>
|
||||
<color name="MediumAquamarine">#66CDAA</color>
|
||||
<color name="CornflowerBlue">#6495ED</color>
|
||||
<color name="CadetBlue">#5F9EA0</color>
|
||||
<color name="DarkOliveGreen">#556B2F</color>
|
||||
<color name="Indigo">#4B0082</color>
|
||||
<color name="MediumTurquoise">#48D1CC</color>
|
||||
<color name="DarkSlateBlue">#483D8B</color>
|
||||
<color name="SteelBlue">#4682B4</color>
|
||||
<color name="RoyalBlue">#4169E1</color>
|
||||
<color name="Turquoise">#40E0D0</color>
|
||||
<color name="MediumSeaGreen">#3CB371</color>
|
||||
<color name="LimeGreen">#32CD32</color>
|
||||
<color name="DarkSlateGray">#2F4F4F</color>
|
||||
<color name="SeaGreen">#2E8B57</color>
|
||||
<color name="ForestGreen">#228B22</color>
|
||||
<color name="LightSeaGreen">#20B2AA</color>
|
||||
<color name="DodgerBlue">#1E90FF</color>
|
||||
<color name="Mycolor">#1EBEA5</color>
|
||||
<color name="MidnightBlue">#191970</color>
|
||||
<color name="Aqua">#00FFFF</color>
|
||||
<color name="Cyan">#00FFFF</color>
|
||||
<color name="SpringGreen">#00FF7F</color>
|
||||
<color name="Lime">#00FF00</color>
|
||||
<color name="MediumSpringGreen">#00FA9A</color>
|
||||
<color name="DarkTurquoise">#00CED1</color>
|
||||
<color name="DeepSkyBlue">#00BFFF</color>
|
||||
<color name="DarkCyan">#008B8B</color>
|
||||
<color name="teal_200">#008080</color>
|
||||
<color name="teal_700">#008081</color>
|
||||
<color name="Green">#008000</color>
|
||||
<color name="DarkGreen">#006400</color>
|
||||
<color name="Blue">#0000FF</color>
|
||||
<color name="MediumBlue">#0000CD</color>
|
||||
<color name="DarkBlue">#00008B</color>
|
||||
<color name="Navy">#000080</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
<color name="grey">#808080</color>
|
||||
<color name="colorPrimary">#F77F00</color>
|
||||
<color name="colorPrimaryDark">#555959</color>
|
||||
<color name="colorAccent">#F77F00</color>
|
||||
<color name="bg_login">#F77F00</color>
|
||||
<color name="bg_register">#F77F00</color>
|
||||
<color name="bg_main">#428bca</color>
|
||||
<color name="input_login">#222222</color>
|
||||
<color name="input_login_hint">#999999</color>
|
||||
<color name="input_register">#888888</color>
|
||||
<color name="input_register_bg">#3b4148</color>
|
||||
<color name="input_register_hint">#5e6266</color>
|
||||
<color name="btn_login">#F77F00</color>
|
||||
<color name="btn_login_bg">#eceef1</color>
|
||||
<color name="lbl_name">#333333</color>
|
||||
<color name="btn_logut_bg">#F77F00</color>
|
||||
</resources>
|
||||
3
app/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
</resources>
|
||||
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#000000</color>
|
||||
</resources>
|
||||
@@ -2,4 +2,13 @@
|
||||
<string name="app_name">Chatcom</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<string name="title_activity_reset_password">ResetPasswordActivity</string>
|
||||
<!-- Strings used for fragments for navigation -->
|
||||
<string name="first_fragment_label">First Fragment</string>
|
||||
<string name="second_fragment_label">Second Fragment</string>
|
||||
<string name="next">Next</string>
|
||||
<string name="previous">Previous</string>
|
||||
|
||||
<string name="hello_first_fragment">Hello first fragment</string>
|
||||
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
|
||||
</resources>
|
||||
@@ -2,15 +2,25 @@
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.Chatcom" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/Mycolor</item>
|
||||
<item name="colorPrimaryVariant">@color/Mycolor</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryVariant">@color/colorPrimaryDark</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<item name="colorSecondary">@color/black</item>
|
||||
<item name="colorSecondaryVariant">@color/grey</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.Chatcom.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Chatcom.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="Theme.Chatcom.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
</resources>
|
||||
@@ -8,6 +8,11 @@ buildscript {
|
||||
classpath 'com.android.tools.build:gradle:7.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
|
||||
|
||||
//Firebase Dependencies
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
classpath 'com.google.firebase:perf-plugin:1.4.1' //Firebase Performance Monitoring plugin
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' //Firebase Crashlytics Monitoring Plugin
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
||||
BIN
screenshots/ChatScreenSS.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
screenshots/ContactsScreenSS.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
screenshots/LoginScreenSS.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
screenshots/ProfileScreenSS.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
screenshots/SettingsScreenSS.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
screenshots/SignUpScreenSS.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
screenshots/SplashScreenSS.png
Normal file
|
After Width: | Height: | Size: 212 KiB |