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 Animated, { Easing } from 'react-native-reanimated'; | |
const { and, cond, block, set, eq, neq, not, clockRunning, startClock, Clock, timing, stopClock, Value } = Animated; | |
type ResetParams = { | |
state: Animated.TimingState; | |
from?: Animated.Adaptable<number>; | |
to?: Animated.Adaptable<number>; | |
config: Animated.TimingConfig; | |
clock: Animated.Clock; |
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 java.io.ByteArrayInputStream | |
import java.io.ByteArrayOutputStream | |
import java.io.IOException | |
import java.io.ObjectInputStream | |
import java.io.ObjectOutputStream | |
import java.io.Serializable | |
import kotlin.experimental.and | |
object ObjectSerializer { |
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 RecyclerTouchListener(context: Context, recyclerView: RecyclerView, val clickListener: ClickListener) : RecyclerView.OnItemTouchListener { | |
val gestureDetector: GestureDetector = GestureDetector(context, object : GestureDetector.SimpleOnGestureListener() { | |
override fun onSingleTapUp(e: MotionEvent?): Boolean = true | |
override fun onLongPress(e: MotionEvent) { | |
val child: View? = recyclerView.findChildViewUnder(e.x, e.y) | |
if (child != null) | |
clickListener.onLongClick(child, recyclerView.getChildAdapterPosition(child).toLong()) | |
super.onLongPress(e) | |
} | |
}) |