Skip to content

Commit

Permalink
Merge pull request #3 from jakepurple13/fix/no-viewmodel-found
Browse files Browse the repository at this point in the history
Fixing #2
  • Loading branch information
Koitharu authored Dec 19, 2024
2 parents 7bf68f4 + 78817bf commit c2040e7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ activity = "1.9.3"
constraintlayout = "2.2.0"
room = "2.6.1"
work = "2.10.0"
koin = "3.5.6"
koin = "4.0.0"
koin_ksp = "1.3.1"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,32 @@ package org.koitharu.workinspector

import android.os.Bundle
import android.view.MenuItem
import android.view.ViewGroup.MarginLayoutParams
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updateLayoutParams
import org.koitharu.workinspector.databinding.WiActivityWorkInspectorBinding

public class WorkInspectorActivity : AppCompatActivity() {
private lateinit var binding: WiActivityWorkInspectorBinding

override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
binding = WiActivityWorkInspectorBinding.inflate(layoutInflater)
setContentView(binding.root)
ViewCompat.setOnApplyWindowInsetsListener(binding.appbar) { v, windowInsets ->
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updateLayoutParams<MarginLayoutParams> {
leftMargin = insets.left
bottomMargin = insets.bottom
rightMargin = insets.right
topMargin = insets.top
}
WindowInsetsCompat.CONSUMED
}
setSupportActionBar(binding.toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
}
Expand Down

0 comments on commit c2040e7

Please sign in to comment.