Skip to content
Open
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
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.

16 changes: 16 additions & 0 deletions .idea/misc.xml

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

10 changes: 10 additions & 0 deletions app/src/main/java/com/example/busbay/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.graphics.drawable.ColorDrawable
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.fragment.app.Fragment
import androidx.preference.PreferenceManager
import com.example.busbay.databinding.ActivityMainBinding
Expand All @@ -16,6 +17,7 @@ class MainActivity : AppCompatActivity() {

private lateinit var binding: ActivityMainBinding
private lateinit var auth: FirebaseAuth
lateinit var toggle: ActionBarDrawerToggle


override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -72,9 +74,17 @@ class MainActivity : AppCompatActivity() {
}
}
}
//________________________________________________________ edit for side bar_________

val drawerLayout = binding.drawerLayout
toggle = ActionBarDrawerToggle(this, drawerLayout, R.string.open, R.string.close)
drawerLayout.addDrawerListener(toggle)
toggle.syncState()

supportActionBar?.setDisplayHomeAsUpEnabled(true)
//______________________________________________________________________________
}

private fun setCurrentFragment(fragment: Fragment) =
supportFragmentManager.beginTransaction().apply {
// add(R.id.flFragment, fragment)
Expand Down
Binary file added app/src/main/res/drawable/atharva_bhanage.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/harsh.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/navigation_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

<corners
android:radius="150dp"/>
</shape>
</shape>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/rounded_header_back.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#F8F49C"/>
<corners
android:radius="30dp" />
</shape>
28 changes: 20 additions & 8 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
<layout
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">





<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -30,10 +28,24 @@
app:itemRippleColor="@color/transparent"
app:labelVisibilityMode="unlabeled"
app:menu="@menu/item_menu">


</com.google.android.material.bottomnavigation.BottomNavigationView>


<androidx.drawerlayout.widget.DrawerLayout
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/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.google.android.material.navigation.NavigationView
android:id="@+id/naView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:headerLayout="@layout/nav_header"
app:menu="@menu/nav_drawer_menu"
android:layout_gravity="start"
android:fitsSystemWindows="true"/>
</androidx.drawerlayout.widget.DrawerLayout>
</RelativeLayout>
</layout>
165 changes: 165 additions & 0 deletions app/src/main/res/layout/nav_header.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?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="300dp"
android:background="@color/actionbarcolor"
android:orientation="vertical">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" About"
android:textSize="30sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginTop="70dp"
android:id="@+id/constraintLayout2"
android:layout_width="400dp"
android:layout_height="100dp"
android:background="@drawable/rounded_header_back"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<ImageView
android:id="@+id/imageView3"
android:layout_width="65dp"
android:layout_height="58dp"
android:layout_marginStart="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/atharva_bhanage" />

<LinearLayout
android:id="@+id/name"
android:layout_width="242dp"
android:layout_height="25dp"
android:layout_marginBottom="20dp"
android:background="@drawable/navigation_drawer"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/caption"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.507"
app:layout_constraintStart_toEndOf="@+id/imageView3"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">

<TextView
android:id="@+id/name_ath"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="150dp"
android:layout_marginBottom="2dp"
android:text="Atharva Bhanage"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>

<LinearLayout
android:id="@+id/caption"
android:layout_width="242dp"
android:layout_height="25dp"
android:layout_marginBottom="20dp"
android:background="@drawable/navigation_drawer"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.507"
app:layout_constraintStart_toEndOf="@+id/imageView3">

<TextView
android:id="@+id/caption_ath"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="150dp"
android:layout_marginBottom="2dp"
android:text="Rishte mein toh hum tumhare baap lgte hein"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_marginTop="20dp"
android:layout_width="400dp"
android:layout_height="100dp"
android:background="@drawable/rounded_header_back"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout2">

<ImageView
android:id="@+id/imageView4"
android:layout_width="65dp"
android:layout_height="58dp"
android:layout_marginStart="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/harsh" />

<LinearLayout
android:id="@+id/name2"
android:layout_width="242dp"
android:layout_height="25dp"
android:layout_marginBottom="20dp"
android:background="@drawable/navigation_drawer"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/caption2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.507"
app:layout_constraintStart_toEndOf="@+id/imageView4"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">

<TextView
android:id="@+id/name_harsh"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="150dp"
android:layout_marginBottom="2dp"
android:text="Harshvardhan Gupta"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>

<LinearLayout
android:id="@+id/caption2"
android:layout_width="242dp"
android:layout_height="25dp"
android:layout_marginBottom="20dp"
android:background="@drawable/navigation_drawer"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.507"
app:layout_constraintStart_toEndOf="@+id/imageView4">

<TextView
android:id="@+id/caption_har"
android:layout_width="230dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="2dp"
android:layout_marginEnd="150dp"
android:layout_marginBottom="2dp"
android:text="Bhai bhai hai bhai"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
23 changes: 23 additions & 0 deletions app/src/main/res/menu/nav_drawer_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/miItem1"
android:title="Item1"/>

<item
android:id="@+id/miItem2"
android:title="Item12"/>

<item
android:id="@+id/miItem3"
android:title="Item3"/>

<item
android:id="@+id/miItem4"
android:title="Item4"/>

<item
android:id="@+id/miItem5"
android:title="Item5"/>
</menu>
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<string name="title_activity_maps">MapsActivity</string>
<string name="title_activity_maps_view">MapsViewActivity</string>
<string name="all_tags_btech">\"CSE18 MnC18 EE18 ME18 CSE19 MnC19 EE19 ME19 CSE20 MnC20 EE20 ME20 CSE21 Mnc21 EE21 ME21 CSE22 MnC22 EE22 ME22 \"</string>

<string name="open">Open</string>
<string name="close">Close</string>
<string name="atharva_bhanage">Atharva Bhanage</string>
<string name="harshvardhan_gupta">Harshvardhan Gupta</string>

</resources>