Skip to content

Instantly share code, notes, and snippets.

View minyoad's full-sized avatar

minyoad minyoad

View GitHub Profile
@OrenBochman
OrenBochman / !!intents.md
Last active March 1, 2023 09:12
All about Intents in Android

Intents

Explicit v.s. Implicit

A quick demo of implicit and explicit intents.

Requesting data from another activity

  1. Use startActivityForResult() to start the second Activity
  2. To return data from the second Activity:
@jmblog
jmblog / gist:3222899
Created August 1, 2012 02:21
Simple HTML encoding/decoding using jQuery
// http://stackoverflow.com/questions/1219860/javascript-jquery-html-encoding
function htmlEncode(value){
return $('<div/>').text(value).html();
}
function htmlDecode(value){
return $('<div/>').html(value).text();
}