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
| // Zed keymap | |
| // | |
| // For information on binding keys, see the Zed | |
| // documentation: https://zed.dev/docs/key-bindings | |
| // | |
| // To see the default key bindings run `zed: open default keymap` | |
| // from the command palette. | |
| [ | |
| { | |
| "context": "Workspace", |
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
| const solids = [ | |
| "#FF8A80", | |
| "#FF5252", | |
| "#FF1744", | |
| "#D50000", | |
| "#FF80AB", | |
| "#FF4081", | |
| "#F50057", | |
| "#C51162", |
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
| # find jni include directories | |
| find_package(JNI) | |
| if (NOT JAVA_INCLUDE_PATH) | |
| message(FATAL_ERROR "Failed to find Java include path.") | |
| endif() | |
| # For CMake 3.24 and higher versions | |
| find_package(JNI REQUIRED) |
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
| import android.view.View | |
| import androidx.core.view.ScrollingView | |
| import androidx.test.espresso.NoMatchingViewException | |
| import androidx.test.espresso.ViewAssertion | |
| object ScrollingViewAssertions { | |
| fun hasScrolledVertically(): ViewAssertion { | |
| return HasScrolledVerticallyAssertion() | |
| } |
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
| import android.view.View | |
| import androidx.core.view.isVisible | |
| import androidx.recyclerview.widget.RecyclerView | |
| import androidx.test.espresso.PerformException | |
| import androidx.test.espresso.UiController | |
| import androidx.test.espresso.ViewAction | |
| import androidx.test.espresso.matcher.ViewMatchers | |
| import androidx.test.espresso.util.HumanReadables | |
| import androidx.test.espresso.util.TreeIterables | |
| import androidx.viewpager2.widget.ViewPager2 |
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
| # See device info | |
| cat /sys/bus/usb/devices/1-2/product | |
| # Set authorized to 0 | |
| echo 0 | sudo tee /sys/bus/usb/devices/1-2/authorized |
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
| import android.graphics.Rect | |
| import android.view.View | |
| import androidx.recyclerview.widget.GridLayoutManager | |
| import androidx.recyclerview.widget.LinearLayoutManager | |
| import androidx.recyclerview.widget.RecyclerView | |
| import androidx.recyclerview.widget.StaggeredGridLayoutManager | |
| class SpacingItemDecoration( | |
| private val spacing: Int, | |
| private val includeEdge: Boolean, |
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
| import android.content.res.Resources | |
| import android.util.TypedValue | |
| class DimensionExtensions { | |
| companion object { | |
| val Int.dp: Int | |
| get() = TypedValue.applyDimension( | |
| TypedValue.COMPLEX_UNIT_DIP, | |
| this.toFloat(), | |
| Resources.getSystem().displayMetrics |
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
| fun Path.forEach(callback: (Path) -> Unit) { | |
| val pathMeasure = PathMeasure(this, false) | |
| do { | |
| val pathLength = pathMeasure.length | |
| val pathSegment = Path() | |
| pathMeasure.getSegment(0f, pathLength, pathSegment, true) | |
| callback(pathSegment) | |
| } while (pathMeasure.nextContour()) | |
| } | |
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
| import android.graphics.Canvas | |
| import android.view.View | |
| import android.widget.EdgeEffect | |
| import androidx.dynamicanimation.animation.SpringAnimation | |
| import androidx.dynamicanimation.animation.SpringForce | |
| import androidx.recyclerview.widget.RecyclerView | |
| class BouncyEdgeEffectFactory : RecyclerView.EdgeEffectFactory() { | |
| companion object { |