List<String> items = new ArrayList<>();
items.add("your stuff");
items.add("more stuff");
simpleSpinner.populate(this, items);
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
| public class ActionAlert { | |
| public static void show(Context context, String title, String message, String actionText, DialogInterface.OnClickListener actionCallback) { | |
| new AlertDialog.Builder(context) | |
| .setTitle(title) | |
| .setMessage(message) | |
| .setPositiveButton(actionText, actionCallback) | |
| .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { | |
| @Override | |
| public void onClick(DialogInterface dialog, int which) { |
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
| # Show running containers | |
| docker container ls | |
| # Show all containers | |
| docker container ls -a | |
| # Create container from image | |
| # -d run as daemon in background | |
| # -p say what port to map in container | |
| # --name give container a 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
| map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(38, 263), 3.0f)); |
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
| import UIKit | |
| @IBDesignable | |
| class BaseTextField: UITextField { | |
| let leftPadding: CGFloat = 20 | |
| override func awakeFromNib() { | |
| self.delegate = self | |
| self.returnKeyType = UIReturnKeyType.Done |
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
| import UIKit | |
| class OkAlert { | |
| class func show(inViewController viewController: UIViewController, title: String, message: String) { | |
| let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert) | |
| alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: nil)) | |
| viewController.presentViewController(alert, animated: true, completion: nil) | |
| } |
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
| import UIKit | |
| class BaseViewController: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| listenForTapsOnViewToDismissKeyboard() | |
| applyGlobalColorTheme() | |
| } |