```mermaid
sequenceDiagram
participant dotcom
participant iframe
participant viewscreen
dotcom->>iframe: loads html w/ iframe url
iframe->>viewscreen: request template
viewscreen->>iframe: html & javascript
iframe->>dotcom: iframe ready
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
| @Composable | |
| fun Screen() { | |
| var date by remember { | |
| mutableStateOf( | |
| TextFieldValue( | |
| text = "dd-MM-yyyy" | |
| ) | |
| ) | |
| } |
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
| public enum MyPermission { | |
| // declare runtime permissions specific to your app here (don't keep unused ones) | |
| READ_PHONE_STATE(Manifest.permission.READ_PHONE_STATE), | |
| FINE_LOCATION(Manifest.permission.ACCESS_FINE_LOCATION); | |
| public static MyPermission fromAndroidPermission(String androidPermission) { | |
| for (MyPermission permission : MyPermission.values()) { | |
| if (permission.getAndroidPermission().equals(androidPermission)) { | |
| return permission; | |
| } |
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
| package com.studio.mattiaferigutti.exoplayertest | |
| import android.annotation.SuppressLint | |
| import android.net.Uri | |
| import android.os.Bundle | |
| import android.util.Log | |
| import android.view.View | |
| import androidx.appcompat.app.AppCompatActivity | |
| import com.google.android.exoplayer2.* | |
| import com.google.android.exoplayer2.source.ProgressiveMediaSource |
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
| BindingScoped.kt | |
| @Scope | |
| @Retention(AnnotationRetention.BINARY) | |
| annotation class BindingScoped | |
| ------------------------------------------------------- | |
| CustomBindingComponent.kt |
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
| function set-studio-jdk() { | |
| export JAVA_HOME=$1/Contents/jre/jdk/Contents/home/ | |
| } |
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
| // https://github.com/Zhuinden/fragmentviewbindingdelegate-kt | |
| import android.view.View | |
| import androidx.fragment.app.Fragment | |
| import androidx.lifecycle.DefaultLifecycleObserver | |
| import androidx.lifecycle.Lifecycle | |
| import androidx.lifecycle.LifecycleOwner | |
| import androidx.lifecycle.Observer | |
| import androidx.viewbinding.ViewBinding | |
| import kotlin.properties.ReadOnlyProperty |
The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.
In your layout you can use:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image_view"
app:srcCompat="@drawable/..." />
Then in your code apply the ShapeAppearanceModel to define your custom corners:
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
| #!/usr/bin/bash | |
| for commit in $(git --no-pager log --reverse --after="2016-10-01T10:36:00-07:00" --pretty=format:%H) | |
| do | |
| echo $commit | |
| git checkout $commit | |
| #write linguist data to a file | |
| echo "" >> ~/repo-linguist-report.txt | |
| echo "commit: $commit" >> ~/repo-linguist-report.txt |
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
| /* Copyright 2019 Google LLC. | |
| SPDX-License-Identifier: Apache-2.0 */ | |
| fun animateVisibility(view: View, visible: Boolean) { | |
| val targetAlpha = if (visible) 1f else 0f | |
| if (view.alpha == targetAlpha) return | |
| view.visibility = View.VISIBLE | |
| val spring = view.spring(SpringAnimation.ALPHA) | |
| (view.getTag(R.id.tag_pending_end_listener) as? | |
| DynamicAnimation.OnAnimationEndListener)?.let { |
NewerOlder