Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
.idea
1 change: 1 addition & 0 deletions .idea/.name

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

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

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

12 changes: 12 additions & 0 deletions .idea/material_theme_project_new.xml

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

1 change: 0 additions & 1 deletion .idea/misc.xml

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

1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<activity android:name=".Activity.WelcomeActivity"/>
<activity android:name=".Activity.LogActivity"/>
<activity android:name=".Activity.RegActivity"/>
<activity android:name=".Activity.HomeActivity"/>
<activity android:name=".Activity.ForgetPasswordActivity"/>

<meta-data
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.example.projectfigma.DataBase.DataBase
import com.example.projectfigma.Fragments.BottomPanelFragment
import com.example.projectfigma.R
import com.example.projectfigma.Util.Password
import com.example.projectfigma.databinding.ActivityForgetPasswordBinding
Expand All @@ -22,7 +23,7 @@ class ForgetPasswordActivity : AppCompatActivity() {
val dateBase = DataBase.getDb(this)

supportFragmentManager.beginTransaction()
.replace(R.id.buttonPanel, BottomPanelActivity())
.replace(R.id.buttonPanel, BottomPanelFragment())
.commit()

Password.setIsVisable(binding.passwordEditText)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.example.projectfigma.Activity

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.example.projectfigma.Fragments.BottomPanelFragment
import com.example.projectfigma.R

class HomeActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_home)

supportFragmentManager.beginTransaction()
.replace(R.id.buttonPanel, BottomPanelFragment())
.commit()
}

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
package com.example.projectfigma.Activity

import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.provider.ContactsContract.Data
import android.text.InputType
import android.view.MotionEvent
import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.example.projectfigma.DataBase.DataBase
import com.example.projectfigma.Fragments.BottomPanelFragment
import com.example.projectfigma.R
import com.example.projectfigma.Util.Password
import com.example.projectfigma.databinding.ActivityLogBinding
import kotlin.concurrent.Volatile

class LogActivity : AppCompatActivity() {

Expand All @@ -29,7 +24,7 @@ class LogActivity : AppCompatActivity() {
val dataBase = DataBase.getDb(this)

supportFragmentManager.beginTransaction()
.replace(R.id.buttonPanel, BottomPanelActivity())
.replace(R.id.buttonPanel, BottomPanelFragment())
.commit()

Password.setIsVisable(binding.passwordEditText)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package com.example.projectfigma.Activity

import android.annotation.SuppressLint
import android.app.DatePickerDialog
import android.content.Intent
import android.os.Bundle
import android.text.InputType
import android.view.MotionEvent
import android.widget.EditText
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.example.projectfigma.DataBase.DataBase
import com.example.projectfigma.Entites.User
import com.example.projectfigma.Fragments.BottomPanelFragment
import com.example.projectfigma.R
import com.example.projectfigma.Util.Password
import com.example.projectfigma.databinding.ActivityRegBinding
Expand All @@ -37,7 +35,7 @@ class RegActivity() : AppCompatActivity(){
Reg(binding, dateBase)

supportFragmentManager.beginTransaction()
.replace(R.id.buttonPanel, BottomPanelActivity())
.replace(R.id.buttonPanel, BottomPanelFragment())
.commit()

passwordEditText = binding.passwordEditText
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.example.projectfigma.Fragments
import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import androidx.fragment.app.Fragment
import com.example.projectfigma.Activity.HomeActivity
import com.example.projectfigma.R

class BottomPanelFragment : Fragment() {

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? = inflater.inflate(R.layout.activity_bottom_panel, container, false)

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

val navHome = view.findViewById<ImageView>(R.id.nav_home)
val navFood = view.findViewById<ImageView>(R.id.nav_food)
val navFav = view.findViewById<ImageView>(R.id.nav_fav)
val navList = view.findViewById<ImageView>(R.id.nav_list)
val navSupport = view.findViewById<ImageView>(R.id.nav_support)

navHome .setOnClickListener { openActivity(HomeActivity::class.java) }
/**
navFood .setOnClickListener { openActivity(FoodActivity::class.java) }
navFav .setOnClickListener { openActivity(FavoritesActivity::class.java) }
navList .setOnClickListener { openActivity(OrdersActivity::class.java) }
navSupport .setOnClickListener { openActivity(SupportActivity::class.java) }
**/
}

private fun <T> openActivity(activityClass: Class<T>) {
val ctx = requireContext()
val intent = Intent(ctx, activityClass)
startActivity(intent)
}
}
9 changes: 7 additions & 2 deletions app/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
android:textColor="#3B1B0E"
android:textColorHint="@color/shadow_black"
android:textSize="16sp"
tools:layout_editor_absoluteX="38dp"
tools:layout_editor_absoluteY="38dp" />
app:layout_constraintBottom_toTopOf="@+id/textView"
app:layout_constraintEnd_toStartOf="@+id/linearLayout"
app:layout_constraintHorizontal_bias="0.322"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0" />

<TextView
android:id="@+id/textView"
Expand Down Expand Up @@ -60,6 +64,7 @@


<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="100dp"
android:layout_height="24dp"
android:orientation="horizontal"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/activity_log.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<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:id="@+id/goToSignUp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
Expand Down