All sheets now have the ability to scroll; a custom selectable item background has been added to clickable views to get a custom coloured ripple effect on click

This commit is contained in:
denizk0461
2023-05-01 22:19:44 +02:00
parent b0631d323e
commit 5a9ab267aa
16 changed files with 236 additions and 160 deletions
@@ -3,6 +3,7 @@ package com.denizk0461.studip.sheet
import android.os.Bundle
import android.view.View
import com.denizk0461.studip.R
import com.denizk0461.studip.data.showToast
import com.denizk0461.studip.data.viewBinding
import com.denizk0461.studip.databinding.SheetAllergenConfigBinding
import com.denizk0461.studip.model.AllergenPreferences
@@ -100,6 +101,9 @@ class AllergenConfigSheet(
)
}
// Tell the user that saving was successful
showToast(context, getString(R.string.allergens_config_confirmation))
// Close the sheet
dismiss()
}
@@ -73,6 +73,13 @@ class DevCodeSheet(
intent.putExtras(bundle)
})
}
"QkNFTExT".d64 -> {
startActivity(Intent(context, ImageActivity::class.java).also { intent ->
val bundle = Bundle()
bundle.putString("img", "bcells")
intent.putExtras(bundle)
})
}
"NEVENT" -> { // nuke events
nukeEvents()
showToast(context, "Nuked all events")
@@ -97,7 +104,6 @@ class DevCodeSheet(
nukeEverything()
showToast(context, "Nuked everything")
}
"HACK()" -> showToast(context, "Hack attempt unsuccessful")
else -> showToast(context, "Code is invalid")
}
dismiss()