Moved to: https://github.com/FokkeZB/UTiL/tree/master/validate
This gist shows you how to do a slide-down menu in Titanium.
Features:
- Toggle using a menu button in the ever-visible navigation bar on the top of the screen
- Menu options animating down from under the navigation bar
- Hide by swiping the menu options up
- Hide by tapping the area below the menu options (being the view covered by the slide-down menu
Images:
Supporting text shadow for Labels on Android has been a request ever since Titanium 1.7.x. It's now scheduled for 3.2.x, but it probably has been for every version since :)
This small workaround works for 80% of what I need: just a tiny small shadow 1 pixel up or down.
However, you must know that:
- It returns a Label in a Label, which is not officially supported.
- Any further calls to properties or methods will be on the outer (shadow) label only.
- If you use {x:1} as offset, in reality the text will be positioned {left:-1} relative to the shadow.
- Because of the former note this workaround will doo only for small offsets.
Just so me and you both know from now on... for some reason:
streamer.addEventListener('change', function (e) {
// This doesn't work
if (e.state === Ti.Media.AudioPlayer.STATE_PAUSED) doSomeThing();
// This does:
if (e.state === this.STATE_PAUSED) doSomeThing();
- Compare with: https://gist.github.com/timanrebel/5643468
- Read more at: http://fokkezb.nl/2013/05/27/bind-existing-model
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
// Alloy doesn't listen to changes, so we do: | |
$model.on('change', function (model) { | |
$.name.text = model.get('name'); | |
}); |
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 isProduction(alloyConfig) | |
{ | |
return 'production' == alloyConfig.deployType; | |
} | |
function removeUnimportantLogCallsFromContent(content) | |
{ | |
if (!content) { | |
return; | |
} |
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
<? | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
if (!empty($_FILES['icon']['tmp_name']) && !$_FILES["file"]["error"]) { | |
$icon = new Imagick($_FILES['icon']['tmp_name']); | |
unlink($_FILES['icon']['tmp_name']); | |
} | |
if (empty($icon)) { |