Skip to content

Instantly share code, notes, and snippets.

View zontag's full-sized avatar
🏠
Working from home

Tiago Zontag zontag

🏠
Working from home
  • Curitiba
View GitHub Profile
@zontag
zontag / SkypagePrivacyPolicy.txt
Created September 22, 2020 02:16
Skypage Privacy Policy
**Privacy Policy**
Tiago Louis Zontag built the Skypage app as a Commercial app. This SERVICE is provided by Tiago Louis Zontag and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Skypage unless otherwise defined in this Privacy Policy.
@zontag
zontag / ViewExtensions.swift
Created November 26, 2017 12:34
UIView extensions for shadow, rounded corner and border creation.
import Foundation
import UIKit
extension UIView {
// Rounded corner raius
@IBInspectable var cornerRadius: CGFloat {
get {
return self.layer.cornerRadius
}
@zontag
zontag / KeyboardObserver.swift
Last active October 2, 2017 17:54
Moving Content That Is Located Under the Keyboard
import Foundation
import UIKit
class KeyboardObserver {
let viewController: UIViewController
let scrollView: UIScrollView
var activeField: UITextField?
init(viewController: UIViewController, scrollView: UIScrollView) {
self.viewController = viewController
@zontag
zontag / ItemTouchHelpert.kt
Created May 30, 2017 23:22
ItemTouchHelper with swipe like gmail/inbox
ItemTouchHelper(object : SimpleCallback(0, ItemTouchHelper.LEFT or ItemTouchHelper.RIGHT) {
private var editIcon = ContextCompat.getDrawable(
this@HomeFragment.context, R.mipmap.ic_mode_edit_white_24dp)
private var removeIcon = ContextCompat.getDrawable(
this@HomeFragment.context, R.mipmap.ic_delete_white_24dp)
private var margin =
this@HomeFragment.resources.getDimension(R.dimen.activity_horizontal_margin)
@zontag
zontag / IntentToMaps.java
Last active October 2, 2017 17:26
Intent to maps with destination
private void IntentToMaps() {
float lat = -25.4377566f;
float lng = -49.2900578f;
String destLabel = "Where the party is at";
String uri = String.format(Locale.ENGLISH, "http://maps.google.com/maps?daddr=%f,%f (%s)", lat, lng, destLabel);
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
getContext().startActivity(intent);
}