Does your osx terminal speak java 7? Start Terminal.app
and try: java -version
:
> java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
class Singleton private constructor(application: Application) { | |
companion object { | |
@Volatile | |
private var INSTANCE: Singleton? = null | |
fun getInstance(application: Application): Singleton = | |
INSTANCE ?: synchronized(this) { | |
INSTANCE | |
?: Singleton(application).also { INSTANCE = it } | |
} |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Copyright (C) 2015 The Android Open Source Project | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
package net.bubblemix.cardcheck; | |
/** | |
* Validator for credit card numbers | |
* Checks validity and returns card type | |
* | |
* @author ian.chen | |
*/ | |
public class RegexCardValidator { | |
##Getting results from DialogFragments to another Fragment.
When setting up the DialogFragment make a call to Fragment.setTargetFragment()
Then from DialogFragment you can access the main fragment with
Fragment.getTargetFragment()
Use interfaces to provide the required actions to the calling Fragment.
##Example code.
###AddFriendDialogFragment - Calls back to calling fragment.