Skip to content

Instantly share code, notes, and snippets.

View Bradleycorn's full-sized avatar

Brad Ball Bradleycorn

View GitHub Profile
@Bradleycorn
Bradleycorn / main_activity_motion_scene.xml
Last active January 19, 2019 00:34
MotionLayout - Motion Scene
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto">
<ConstraintSet android:id="@+id/video_state_embedded_playing">
<Constraint
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
@Bradleycorn
Bradleycorn / activity_main.xml
Last active January 18, 2019 03:22
MotionLayout - Main Activity Layout
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.motion.widget.MotionLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"
app:layoutDescription="@xml/main_activity_motion_scene"
app:currentState="@id/video_state_embedded_stopped">
@Bradleycorn
Bradleycorn / sqlplus.js
Created March 14, 2015 15:42
Titanium Alloy sqlite adapter with support for models with array values
//Based on alloy's built-in sqlite adapter from alloy v1.5.1
//https://github.com/appcelerator/alloy/blob/1.5.1/Alloy/lib/alloy/sync/sql.js
var _ = require('alloy/underscore')._;
// The database name used when none is specified in the
// model configuration.
var ALLOY_DB_DEFAULT = '_alloy_';
var ALLOY_ID_DEFAULT = 'alloy_id';