This file contains 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 au.com.myapp; | |
import org.junit.runners.model.InitializationError; | |
import org.robolectric.RobolectricTestRunner; | |
import org.robolectric.annotation.Config; | |
import org.robolectric.manifest.AndroidManifest; | |
import org.robolectric.res.FileFsFile; | |
import org.robolectric.util.ReflectionHelpers; |
This file contains 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
import androidx.compose.foundation.layout.Column | |
import androidx.compose.material.Button | |
import androidx.compose.material.Text | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
data class DataCustomView( | |
val title: String, | |
val description: String |
This file contains 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
import androidx.compose.ui.test.assertIsDisplayed | |
import androidx.compose.ui.test.junit4.createComposeRule | |
import androidx.compose.ui.test.onNodeWithText | |
import androidx.compose.ui.test.performClick | |
import androidx.test.ext.junit.runners.AndroidJUnit4 | |
import org.junit.Rule | |
import org.junit.Test | |
import org.junit.runner.RunWith | |
import kotlin.test.assertTrue |
This file contains 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
/* Copyright 2022 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
val callbacks = object : GLFrontBufferedRenderer.Callback<DATA_TYPE> { | |
override fun onDrawFrontBufferedLayer( | |
eglManager: EGLManager, | |
bufferWidth: Int, | |
bufferHeight: Int, | |
transform: FloatArray, | |
param: DATA_TYPE |
This file contains 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
/* Copyright 2022 Google LLC. | |
SPDX-License-Identifier: Apache-2.0 */ | |
class InputView : View { | |
// init motion predictor | |
val motionEventPredicor: MotionEventPredicor = MotionEventPredictor.newInstance(this) | |
setOnTouchListener | |
{ |
This file contains 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
/* Copyright 2023 Google. | |
SPDX-License-Identifier: Apache-2.0 */ | |
@Composable | |
fun hoverableHighlightAndPointer() { | |
val highlightIndication: Indication = remember { | |
HighlightIndication() | |
} | |
val interactionSource = MutableInteractionSource() |
This file contains 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
// https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/collections/Collections.kt | |
/** | |
* Returns the index of the last item in the list that match predicate | |
* @param predicate function returning boolean for matching element. | |
* | |
* @return the index of the last element found | |
* otherwise returns -1 | |
*/ | |
public inline fun <T> List<T>.findLastIndex(predicate: (T) -> Boolean): Int { |
This file contains 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
set backspace=2 " allow backspacing over everything in insert mode | |
set history=50 " keep 50 lines of command line history | |
set ignorecase " search commands are case-insensitive | |
set incsearch " while typing a search command, show matches incrementally | |
" instead of waiting for you to press enter | |
set ruler " show the cursor position all the time | |
set viminfo='20,\"50 " read/write a .viminfo file, don't store more than 50 lines of registers | |
set encoding=utf8 " non-ascii characters are encoded with UTF-8 by default | |
set formatoptions=croq " c=autowrap comments, r=continue comment on <enter>, |
This file contains 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
/* Copyright 2023 Cedric Ferry. | |
SPDX-License-Identifier: Apache-2.0 */ | |
import android.view.Window | |
import androidx.core.view.ViewCompat | |
import androidx.core.view.WindowCompat | |
import androidx.core.view.WindowInsetsCompat | |
import androidx.core.view.WindowInsetsControllerCompat | |
OlderNewer