diff --git a/app/src/main/java/org/hackillinois/android/view/MainActivity.kt b/app/src/main/java/org/hackillinois/android/view/MainActivity.kt
index 1f0b3271..132df17f 100644
--- a/app/src/main/java/org/hackillinois/android/view/MainActivity.kt
+++ b/app/src/main/java/org/hackillinois/android/view/MainActivity.kt
@@ -56,19 +56,26 @@ class MainActivity : AppCompatActivity() {
private fun setupBottomAppBar() {
// by default, home button is selected
- val selectedIconColor = ContextCompat.getColor(this, R.color.selectedAppBarIcon)
- val unselectedIconColor = ContextCompat.getColor(this, R.color.unselectedAppBarIcon)
+ val selectedIconColor = ContextCompat.getColor(this, R.color.black)
+ val unselectedIconColor = ContextCompat.getColor(this, R.color.black)
+ // Set default icons (assume these are your unselected drawables)
+ bottomAppBar.homeButton.setImageResource(R.drawable.battle_png)
+ bottomAppBar.scheduleButton.setImageResource(R.drawable.schedule_png)
+ bottomAppBar.shopButton.setImageResource(R.drawable.shop_png)
+ bottomAppBar.profileButton.setImageResource(R.drawable.profile_png)
+
+ // Set default color filter on home button (as it's selected by default)
bottomAppBar.homeButton.setColorFilter(selectedIconColor)
val bottomBarButtons = listOf(
bottomAppBar.homeButton,
bottomAppBar.scheduleButton,
bottomAppBar.shopButton,
- bottomAppBar.profileButton,
+ bottomAppBar.profileButton
)
- // make all buttons unselectedColor and then set selected button to selectedColor
+ // Set click listeners for each button.
bottomBarButtons.forEach { button ->
button.setOnClickListener { view ->
val newSelection = bottomBarButtons.indexOf(button)
@@ -77,15 +84,31 @@ class MainActivity : AppCompatActivity() {
if (newSelection != currentSelection) {
currentSelection = newSelection
- // change icon colors
+ // Reset all buttons: set unselected drawable and color filter.
+ bottomAppBar.homeButton.setImageResource(R.drawable.battle_png)
+ bottomAppBar.scheduleButton.setImageResource(R.drawable.schedule_png)
+ bottomAppBar.shopButton.setImageResource(R.drawable.shop_png)
+ bottomAppBar.profileButton.setImageResource(R.drawable.profile_png)
bottomBarButtons.forEach { (it as ImageButton).setColorFilter(unselectedIconColor) }
- (view as ImageButton).setColorFilter(selectedIconColor)
+ // Set the clicked button to selected drawable and color filter.
when (view) {
- bottomAppBar.homeButton -> switchFragment(HomeFragment(), false)
- bottomAppBar.scheduleButton -> switchFragment(ScheduleFragment(), false)
- bottomAppBar.shopButton -> switchFragment(ShopFragment(), false)
- bottomAppBar.profileButton -> switchFragment(ProfileFragment(), false)
+ bottomAppBar.homeButton -> {
+ bottomAppBar.homeButton.setImageResource(R.drawable.battle_underlined_png)
+ switchFragment(HomeFragment(), false)
+ }
+ bottomAppBar.scheduleButton -> {
+ bottomAppBar.scheduleButton.setImageResource(R.drawable.schedule_underlined_png)
+ switchFragment(ScheduleFragment(), false)
+ }
+ bottomAppBar.shopButton -> {
+ bottomAppBar.shopButton.setImageResource(R.drawable.shop_underlined_png)
+ switchFragment(ShopFragment(), false)
+ }
+ bottomAppBar.profileButton -> {
+ bottomAppBar.profileButton.setImageResource(R.drawable.profile_underlined_png)
+ switchFragment(ProfileFragment(), false)
+ }
else -> return@setOnClickListener
}
}
@@ -113,7 +136,7 @@ class MainActivity : AppCompatActivity() {
bottomAppBar.shopButton,
bottomAppBar.profileButton,
)
- val unselectedIconColor = ContextCompat.getColor(this, R.color.unselectedAppBarIcon)
+ val unselectedIconColor = ContextCompat.getColor(this, R.color.black)
bottomBarButtons.forEach { (it as ImageButton).setColorFilter(unselectedIconColor) }
// if not already on scanner selection page, switch fragment to scanner selection page
diff --git a/app/src/main/res/drawable/battle_png.png b/app/src/main/res/drawable/battle_png.png
new file mode 100644
index 00000000..3edf550c
Binary files /dev/null and b/app/src/main/res/drawable/battle_png.png differ
diff --git a/app/src/main/res/drawable/battle_underlined_png.png b/app/src/main/res/drawable/battle_underlined_png.png
new file mode 100644
index 00000000..c5d50d03
Binary files /dev/null and b/app/src/main/res/drawable/battle_underlined_png.png differ
diff --git a/app/src/main/res/drawable/calendar_icon.png b/app/src/main/res/drawable/calendar_icon.png
new file mode 100644
index 00000000..ce30e91e
Binary files /dev/null and b/app/src/main/res/drawable/calendar_icon.png differ
diff --git a/app/src/main/res/drawable/camera_icon.png b/app/src/main/res/drawable/camera_icon.png
new file mode 100644
index 00000000..63e682af
Binary files /dev/null and b/app/src/main/res/drawable/camera_icon.png differ
diff --git a/app/src/main/res/drawable/camera_png.png b/app/src/main/res/drawable/camera_png.png
new file mode 100644
index 00000000..15f2a675
Binary files /dev/null and b/app/src/main/res/drawable/camera_png.png differ
diff --git a/app/src/main/res/drawable/home_icon.png b/app/src/main/res/drawable/home_icon.png
new file mode 100644
index 00000000..0cb694f8
Binary files /dev/null and b/app/src/main/res/drawable/home_icon.png differ
diff --git a/app/src/main/res/drawable/ic_profile.xml b/app/src/main/res/drawable/ic_profile.xml
index bd37d41e..eb4d396f 100644
--- a/app/src/main/res/drawable/ic_profile.xml
+++ b/app/src/main/res/drawable/ic_profile.xml
@@ -3,7 +3,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="@color/unselectedAppBarIcon">
+ android:tint="@color/black">
diff --git a/app/src/main/res/drawable/ic_today.xml b/app/src/main/res/drawable/ic_today.xml
index a6b0e7d0..e8d8255d 100644
--- a/app/src/main/res/drawable/ic_today.xml
+++ b/app/src/main/res/drawable/ic_today.xml
@@ -3,7 +3,7 @@
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="@color/unselectedAppBarIcon">
+ android:tint="@color/black">
diff --git a/app/src/main/res/drawable/prizes_icon.png b/app/src/main/res/drawable/prizes_icon.png
new file mode 100644
index 00000000..432452a6
Binary files /dev/null and b/app/src/main/res/drawable/prizes_icon.png differ
diff --git a/app/src/main/res/drawable/profile_icon.png b/app/src/main/res/drawable/profile_icon.png
new file mode 100644
index 00000000..be0648c5
Binary files /dev/null and b/app/src/main/res/drawable/profile_icon.png differ
diff --git a/app/src/main/res/drawable/profile_png.png b/app/src/main/res/drawable/profile_png.png
new file mode 100644
index 00000000..a7586105
Binary files /dev/null and b/app/src/main/res/drawable/profile_png.png differ
diff --git a/app/src/main/res/drawable/profile_underlined_png.png b/app/src/main/res/drawable/profile_underlined_png.png
new file mode 100644
index 00000000..e121c87d
Binary files /dev/null and b/app/src/main/res/drawable/profile_underlined_png.png differ
diff --git a/app/src/main/res/drawable/schedule_png.png b/app/src/main/res/drawable/schedule_png.png
new file mode 100644
index 00000000..bb2a206e
Binary files /dev/null and b/app/src/main/res/drawable/schedule_png.png differ
diff --git a/app/src/main/res/drawable/schedule_underlined_png.png b/app/src/main/res/drawable/schedule_underlined_png.png
new file mode 100644
index 00000000..dba74f51
Binary files /dev/null and b/app/src/main/res/drawable/schedule_underlined_png.png differ
diff --git a/app/src/main/res/drawable/shop_png.png b/app/src/main/res/drawable/shop_png.png
new file mode 100644
index 00000000..5aca0a16
Binary files /dev/null and b/app/src/main/res/drawable/shop_png.png differ
diff --git a/app/src/main/res/drawable/shop_underlined_png.png b/app/src/main/res/drawable/shop_underlined_png.png
new file mode 100644
index 00000000..29f2184b
Binary files /dev/null and b/app/src/main/res/drawable/shop_underlined_png.png differ
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 247d9706..853ff912 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -2,6 +2,7 @@
@@ -16,39 +17,47 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
- app:backgroundTint="@color/darkForest">
+ app:backgroundTint="@color/cream">
+
+ app:layout_constraintVertical_bias="0.0"
+ app:layout_constraintHorizontal_chainStyle="spread"
+ app:tint="@color/black"
+ app:srcCompat="@drawable/battle_png" />
+
+ app:srcCompat="@drawable/schedule_png" />
+
+ app:srcCompat="@drawable/profile_png" />
+
+ app:srcCompat="@drawable/shop_png" />
+
-
-
+ android:layout_width="72dp"
+ android:layout_height="72dp"
+ app:backgroundTint="@color/cream"
+ android:layout_gravity="bottom|center"
+ android:layout_marginBottom="30dp"
+ android:layout_marginTop="20dp"
+ app:fabCustomSize="72dp"
+ app:maxImageSize="40dp"
+ app:srcCompat="@drawable/camera_png" />
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index cc2931ea..b82afe23 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -13,8 +13,8 @@
#ED9B21
#08151B
#6D9CA0
- #ACCEBE
- #FFFFFF
+
+
#0D387C
@@ -61,5 +61,9 @@
#8C3712
#C5673F
#0E3F41
+
+
+ #F5F0DD
+ #000000
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 5ef6f4d6..e317318e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -15,6 +15,12 @@
Internet Required
You must be connected to the internet in order to use the HackIllinois app. Please retry once you have verified your connection.
+
+ Home
+ Schedule
+ Prizes
+ Profile
+
Get Started
Welcome!
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 7a3265ee..7454180f 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ