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
interface Constraint<INPUT, OUTPUT> { | |
suspend fun invoke(input: INPUT): OUTPUT? | |
} | |
abstract class SatisfyConstraint<INPUT, OUTPUT> : Constraint<INPUT, OUTPUT> { | |
abstract suspend fun isSatisfied(input: INPUT): Boolean | |
abstract suspend fun process(input: INPUT): OUTPUT | |
override suspend fun invoke(input: INPUT): OUTPUT? = |
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
#... | |
jobs: | |
test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: |
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
public void appendTextFile(String text) { | |
File file = new File("sdcard/text.txt"); | |
if (!file.exists()) { | |
try { | |
file.createNewFile(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
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 android.content.Context | |
import android.graphics.Point | |
import android.graphics.Rect | |
import android.util.AttributeSet | |
import android.view.View | |
import androidx.appcompat.widget.AppCompatEditText | |
class GroupFocusableEditText : AppCompatEditText { | |
private var parentRect = Rect() |
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
class QuadGradientView : FrameLayout { | |
private var currentHue = 0f | |
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) { | |
setWillNotDraw(false) | |
} | |
constructor(context: Context) : super(context) { | |
setWillNotDraw(false) | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content" | |
android:paddingStart="16dp" | |
android:paddingTop="16dp" | |
android:paddingEnd="16dp"> | |
<androidx.constraintlayout.widget.ConstraintLayout |
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
# ... | |
jobs: | |
test: | |
# ... | |
apk: | |
# ... | |
firebase: | |
name: Run UI tests with Firebase Test Lab | |
needs: apk |
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
# ... | |
jobs: | |
test: | |
# ... | |
apk: | |
name: Generate APK | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
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
name: Android CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: |