changes according to smi + iisc, added login screen, added filer, improved the UI
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package `in`.sminnovations.smiadmin
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.ViewCompat
|
||||
@@ -29,7 +30,21 @@ class MainActivity : AppCompatActivity() {
|
||||
navController = navHostFragment.navController
|
||||
|
||||
// Setup the bottom navigation with the NavController
|
||||
binding.navView.setupWithNavController(navController)
|
||||
binding.navView?.let { bottomNav ->
|
||||
bottomNav.setupWithNavController(navController)
|
||||
|
||||
// Hide bottom nav on specific destinations
|
||||
navController.addOnDestinationChangedListener { _, destination, _ ->
|
||||
when (destination.id) {
|
||||
R.id.navigation_login -> {
|
||||
bottomNav.visibility = View.GONE
|
||||
}
|
||||
else -> {
|
||||
bottomNav.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set up navigation item selection listener
|
||||
binding.navView.setOnItemSelectedListener { menuItem ->
|
||||
|
||||
Reference in New Issue
Block a user