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
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android" | |
android:transitionOrdering="sequential"> | |
<changeBounds> | |
<targets> | |
<target android:targetId="@+id/image" /> | |
</targets> | |
</changeBounds> | |
<fade> | |
<targets> | |
<target android:targetId="@+id/text" /> |
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
constraintLayout.prepareTransition { | |
auto { | |
standardEasing() | |
exclude(metamorphosisDesc2) | |
} | |
transitionSet { | |
fade() | |
slide() | |
accelerateEasing() | |
+metamorphosisDesc2 |
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
snackbarConstraintLayout.prepareTransition { | |
moveResize { // Move resize uses ChangeBounds | |
+fab | |
} | |
slide { | |
+snackbarMessage | |
} | |
decelerateEasing() | |
} | |
snackbarMessage.toggleGone() |
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
rootCoordinatorLayout.prepareTransition { | |
onStart { | |
// Started! | |
} | |
moveResize { | |
+image1 | |
} | |
onEnd { | |
// I am done :) | |
} |
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
constraintLayout.prepareTransition { | |
customTransition<ChangeCardColor> { | |
+colorChangeCardView | |
} | |
} |
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
rootLayout.prepareTransition { | |
moveResize { | |
+image1 // Using + operator to add targets | |
} | |
fade { | |
+text | |
} | |
} | |
text.isGone = true // Layout changes |
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
@file:Suppress("NOTHING_TO_INLINE") | |
import android.content.Context | |
import androidx.annotation.StringRes | |
import androidx.fragment.app.Fragment | |
import androidx.preference.* | |
/** | |
* DSL marker for restricting access scope when [PreferencesBuilder.preference] is nested. | |
*/ |
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
val AppCompatActivity.hasSourceBounds: Boolean get() = intent?.sourceBounds != null | |
fun AppCompatActivity.sourceBounds(boundsAction: (Rect) -> Unit) { | |
intent?.sourceBounds?.let(boundsAction) | |
} | |
/** | |
* Disables upcoming transition when [hasSourceBounds] is true. Should be called before [AppCompatActivity.onCreate] | |
*/ | |
fun AppCompatActivity.preAnimationSetup() { |
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
def validateIdeBuilds = tasks.register("validateIdeBuilds") { | |
doLast { | |
if (project.hasProperty("android.injected.invoked.from.ide")) { | |
def buildCommand = "./gradlew " + gradle.startParameter.taskNames.join(" ") | |
exec { | |
commandLine("sh", "-c", "echo \"$buildCommand\" | pbcopy") | |
} | |
throw new RuntimeException( | |
"Please avoid building from IDE and use commandLine instead." + | |
"The command has been copied to your clipboard" |
OlderNewer