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
@Composable | |
fun Modifier.tapOrPress( | |
onStart: (offsetX: Float) -> Unit, | |
onCancel: (offsetX: Float) -> Unit, | |
onCompleted: (offsetX: Float) -> Unit | |
): Modifier { | |
val interactionSource = remember { MutableInteractionSource() } | |
return this.pointerInput(interactionSource) { | |
forEachGesture { | |
coroutineScope { |
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
@Composable | |
fun Modifier.startGesture( | |
onStart: (offsetX: Float) -> Unit | |
): Modifier { | |
val interactionSource = remember { MutableInteractionSource() } | |
return this.pointerInput(interactionSource) { | |
forEachGesture { | |
coroutineScope { | |
awaitPointerEventScope { | |
val touch = awaitFirstDown().also { it.consumeDownChange() } |
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
# Trigger on every tag creation | |
on: | |
push: | |
tags: | |
- 'release-*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
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: Create release branch on package repo | |
uses: GuillaumeFalourd/create-other-repo-branch-action@v1 | |
with: | |
repository_owner: piotrprus | |
repository_name: kmm-swift-packages | |
new_branch_name: develop | |
access_token: ${{ secrets.API_TOKEN_GITHUB}} |
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: Push directory to another repository | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source-directory: 'swiftpackage' | |
destination-github-username: 'piotrprus' | |
destination-repository-name: 'kmm-swift-packages' | |
user-email: prus.piotr@gmail.com | |
target-branch: main |
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
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 |
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
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/white" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" |
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
<receiver android:name=".MyWidgetProvider" > | |
<intent-filter> | |
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> | |
</intent-filter> | |
<meta-data android:name="android.appwidget.provider" | |
android:resource="@xml/my_widget_provider" /> | |
</receiver> |
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"?> | |
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" | |
android:initialLayout="@layout/widget_initial" | |
android:minWidth="110dp" | |
android:minHeight="40dp" | |
android:resizeMode="horizontal" | |
android:updatePeriodMillis="1800000" | |
android:widgetCategory="home_screen"> | |
</appwidget-provider> |