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
func onClick(_ sender: UIView) { | |
guard let currentRadioButton = sender as? RadioButton else { | |
return | |
} | |
[ | |
radioButton1, | |
radioButton2 | |
].forEach { $0.isChecked = false } // Set all to unchecked first | |
currentRadioButton.isChecked = !currentRadioButton.isChecked |
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
func onClick(_ sender: UIView) { | |
guard let currentRadioButton = sender as? RadioButton else { | |
return | |
} | |
[ | |
radioButton1, | |
radioButton2 | |
].forEach { $0.isChecked = false } // Set all to unchecked first | |
currentRadioButton.isChecked = !currentRadioButton.isChecked |
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
mMediaPlayer = new MediaPlayer(); | |
// ... other initialization here ... | |
mMediaPlayer.setWakeMode(getApplicationContext(), PowerManager.PARTIAL_WAKE_LOCK); |
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
leapcast -d --fullscreen --name [FRIENDLY_NAME] --chrome [PATH_TO_GOOGLE_CHROME] |
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
class YOUR_APP_ID_HERE(LEAPfactory): | |
url = "http://127.0.0.1:5000/chromecast/receiver" |
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
public class GCMIntentService extends GCMBaseIntentService { | |
. | |
. | |
. | |
private Looper mServiceLooper; | |
public GCMIntentService() { | |
. | |
. |
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
public static String getPath(final Context context, final Uri uri) { | |
if (uri == null || context == null) { | |
return null; | |
} | |
if (uri.getPath().matches("file.*")) { | |
// This is a file Uri so we can use the path returned in getPath(). | |
return uri.getPath(); | |
} |
NewerOlder