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.geometry.Size | |
import androidx.compose.ui.graphics.Outline | |
import androidx.compose.ui.graphics.Path | |
import androidx.compose.ui.graphics.Shape | |
import androidx.compose.ui.unit.Density | |
import androidx.compose.ui.unit.LayoutDirection | |
class EdgeCurveShape( | |
private val direction: Direction, | |
) : Shape { |
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.annotation.FloatRange | |
import androidx.compose.ui.geometry.Size | |
import androidx.compose.ui.graphics.Outline | |
import androidx.compose.ui.graphics.Path | |
import androidx.compose.ui.graphics.Shape | |
import androidx.compose.ui.unit.Density | |
import androidx.compose.ui.unit.LayoutDirection | |
import kotlin.math.atan2 | |
import kotlin.math.cos | |
import kotlin.math.pow |
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.core.view.AccessibilityDelegateCompat | |
import android.core.view.ViewCompat | |
val button: Button = /* ... */ | |
ViewCompat.setAccessibilityDelegate( | |
button, | |
object : AccessibilityDelegateCompat() { | |
override fun performAccessibilityAction(host: View?, action: Int, args: Bundle?): Boolean { | |
return 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
package com.lmwn.poc.dialogwithconfigchanges | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.fragment.app.DialogFragment | |
import com.lmwn.poc.dialogwithconfigchanges.databinding.ActivityMainBinding | |
import com.lmwn.poc.dialogwithconfigchanges.databinding.ViewAwesomeDialogBinding |
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
#!/bin/zsh | |
# Copy artifact from JFrog to another Nexus | |
# | |
# ## Prerequisites: ## | |
# * macOS | |
# * zsh | |
# * jq | |
# * wget | |
# * curl | |
# * JFrog |
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
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 |
NewerOlder