Skip to content

Instantly share code, notes, and snippets.

@followthemoney1
Last active September 2, 2017 11:05
Show Gist options
  • Save followthemoney1/5f8a1fa4199d027969567799dc23c453 to your computer and use it in GitHub Desktop.
Save followthemoney1/5f8a1fa4199d027969567799dc23c453 to your computer and use it in GitHub Desktop.
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/ui/widget/ElasticDragDismissFrameLayout.java
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/util/AnimUtils.java
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/util/ColorUtils.java
https://github.com/nickbutcher/plaid/blob/master/app/src/main/java/io/plaidapp/util/ViewUtils.java
////
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<declare-styleable name="ElasticDragDismissFrameLayout">
<attr name="dragDismissDistance" format="dimension" />
<attr name="dragDismissFraction" format="float" />
<attr name="dragDismissScale" format="float" />
<attr name="dragElasticity" format="float" />
</declare-styleable>
</resources>
///
<?xml version="1.0" encoding="utf-8"?>
<com.example.leaditteam.cafeprototype.helpers.ui.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" android:id="@+id/elasticDragDismissFrameLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" android:transitionGroup="false" app:dragDismissDistance="@dimen/drag_dismiss_distance" app:dragDismissScale="0.95"
android:fitsSystemWindows="true">
/////
<style name="NAME_ACTIVITY" parent="AppTheme">
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@color/alpha_null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
/////
//add to colors
<color name="alpha_null">#9e212121</color>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment