This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onConfigurationChanged(newConfig: Configuration) { | |
super.onConfigurationChanged(newConfig) | |
val isLandscape = newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE | |
if (isLandscape) { | |
supportActionBar?.hide() | |
supportActionBar?.setDisplayShowTitleEnabled(false) | |
window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN) | |
window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN) | |
} else { // turn OFF full screen | |
supportActionBar?.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
A class that makes api calls to the backend, process responses, and returns proper data models | |
*/ | |
class NetworkLayer(val api: CdiApi) { | |
fun fetchProgramData(track: String, race: Number): List<ProgramEntry> { | |
// Get a ProgramResponse object (the network model) back from the api | |
val response: ProgramResponse = api.fetchProgram(track, race) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.bradball.android.androidapptemplate.ui.theme | |
import androidx.compose.foundation.isSystemInDarkTheme | |
import androidx.compose.material.* | |
import androidx.compose.runtime.* | |
import androidx.compose.ui.graphics.Color | |
private val DarkColorPalette = AppColors( | |
materialColors = darkColors( | |
primary = purple200, |
OlderNewer