Skip to content

Instantly share code, notes, and snippets.

@patrickhammond
patrickhammond / ParcelableHelper.java
Last active April 20, 2021 02:22
A Parcelable is not always immediately deep copied; this forces an immediate deep copy into a new Parcelable instance.
import android.os.Parcel;
import android.os.Parcelable;
public class ParcelableHelper {
/**
* There is not always a guarantee that Parcelable values will be immediately written out and
* read back in. For data data that mutable (its own issue), this can be a problem. This is
* for the times when it would be great to have confidence that you will be working with a copy
* of that data.
*/
@cirocosta
cirocosta / iframe.html
Last active January 6, 2024 23:02
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">