changes according to smi + iisc, added login screen, added filer, improved the UI

This commit is contained in:
chandrashekhar reddy
2025-02-04 17:27:33 +05:30
parent 830d347606
commit 43c3137041
29 changed files with 699 additions and 46 deletions

View File

@@ -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 ->