Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
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
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "org.hackillinois.android"
minSdkVersion 23
targetSdkVersion 34
versionCode 66
versionName "2025.01.1"
versionCode 67
versionName "2025.01.2"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
24 changes: 24 additions & 0 deletions app/src/main/java/org/hackillinois/android/view/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import android.util.Log
import android.widget.ImageButton
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updateLayoutParams
import androidx.core.view.updatePadding
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentTransaction
import androidx.lifecycle.ViewModelProvider
Expand Down Expand Up @@ -39,9 +44,28 @@ class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

WindowCompat.setDecorFitsSystemWindows(window, false)
setContentView(R.layout.activity_main)

ViewCompat.setOnApplyWindowInsetsListener(bottomAppBar) { view, insets ->
val systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
// Convert 16dp to pixels (you can change this value as needed)
val extraMargin = (0 * resources.displayMetrics.density).toInt()
view.updateLayoutParams<CoordinatorLayout.LayoutParams> {
bottomMargin = systemBarsInsets.bottom + extraMargin
}
insets
}

ViewCompat.setOnApplyWindowInsetsListener(contentFrame) { view, insets ->
val systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
// Your BottomAppBar has a fixed height of 72dp.
val bottomAppBarHeightPx = (36 * resources.displayMetrics.density).toInt()
view.updatePadding(bottom = bottomAppBarHeightPx + systemBarsInsets.bottom)
insets
}

setupBottomAppBar()
setupScannerButton()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ import java.util.*

class CountdownManager(val listener: CountDownListener) {

// 02-23-2024 15:30:00
// 02-28-2025 : 14:30
private val eventStartTime: Calendar = Calendar.getInstance().apply {
timeZone = TimeZone.getTimeZone("America/Chicago")
timeInMillis = 1740722400000 // 1708723800000
timeInMillis = 1740774600000 // 1708723800000
}

// 02-23-2024 19:00:00
// 02-28-2025 : 18:00
private val hackingStartTime: Calendar = Calendar.getInstance().apply {
timeZone = TimeZone.getTimeZone("America/Chicago")
timeInMillis = 1708736400000
timeInMillis = 1740787200000
}

// 02-25-2024 7:00:00
// 03-02-2025 11:30
private val hackingEndTime: Calendar = Calendar.getInstance().apply {
timeZone = TimeZone.getTimeZone("America/Chicago")
timeInMillis = 1708866000000
timeInMillis = 1740936600000
}

private var times = listOf(eventStartTime, hackingStartTime, hackingEndTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ class HomeFragment : Fragment(), CountdownManager.CountDownListener, EventProgre
super.onStart()
isActive = true
countDownManager.start()
// eventProgressManager.start()
eventProgressManager.start()
}

override fun onPause() {
super.onPause()
isActive = false
countDownManager.onPause()
// eventProgressManager.onPause()
eventProgressManager.onPause()
}

override fun onResume() {
super.onResume()
isActive = true
countDownManager.onResume()
// eventProgressManager.onResume()
eventProgressManager.onResume()
}

override fun onStop() {
Expand All @@ -102,7 +102,7 @@ class HomeFragment : Fragment(), CountdownManager.CountDownListener, EventProgre

override fun updateBackground(newBackgroundResource: Int) {
if (isActive) {
// homeBackgroundImageView.setImageResource(newBackgroundResource)
homeBackgroundImageView.setImageResource(newBackgroundResource)
}
}

Expand Down
Binary file added app/src/main/res/drawable/home_tags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="16dp">
android:layout_height="match_parent">

<!-- Main Content -->
<androidx.fragment.app.FragmentContainerView
Expand Down Expand Up @@ -132,4 +131,7 @@
app:fabCustomSize="60dp"
app:srcCompat="@drawable/camera_png" />

<!-- android:layout_alignParentBottom="true"-->
<!-- android:layout_alignParentEnd="true"-->

</androidx.coordinatorlayout.widget.CoordinatorLayout>
6 changes: 3 additions & 3 deletions app/src/main/res/layout/fragment_home_2025.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
android:id="@+id/home_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/witchyPurple">
android:background="@color/cream">


<!-- <ImageView-->
Expand Down Expand Up @@ -48,8 +48,8 @@
android:layout_marginHorizontal="0dp"
android:layout_marginTop="0dp"
android:adjustViewBounds="false"
android:scaleType="centerInside"
android:src="@drawable/home_tags_svg_flipped"
android:scaleType="fitXY"
android:src="@drawable/home_tags"
android:visibility="invisible"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
Expand Down