Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Rodrigo Martins policante

🏠
Working from home
Block or report user

Report or block policante

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@policante
policante / version.gradle
Created May 3, 2019
Script para incrementar versão Android
View version.gradle
def readVersion() {
def versionFile = new File(project.rootDir, 'version.properties')
def version = new Properties()
def stream
try {
stream = new FileInputStream(versionFile)
version.load(stream)
} catch (FileNotFoundException ignore) {
//
} finally {
@policante
policante / BaseNavigationController.swift
Created Feb 20, 2019
UINavigationController swipe back like Facebook, Instagram
View BaseNavigationController.swift
class BaseNavigationController: UINavigationController, UINavigationControllerDelegate {
var interactivePopTransition: UIPercentDrivenInteractiveTransition!
override func viewDidLoad() {
self.delegate = self
}
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
addPanGesture(viewController)
@policante
policante / LineDrawerView.swift
Created Feb 20, 2019
Classe para desenhar linha animada entre 2 pontos
View LineDrawerView.swift
class LineDrawerView: UIView {
convenience init() {
self.init(frame: .zero)
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
}
View ViewBox.java
public class ViewBox extends LinearLayout {
private float radiusCorner = 0f;
private int backgroundRes = -1;
private int paddingBox = 0;
public ViewBox(Context context) {
super(context);
init(null);
}
View String+extensions.swift
//
// String+extensions.swift
//
// Created by Rodrigo Martins on 01/09/17.
// Copyright © 2017 Tinker Tecnologia. All rights reserved.
//
import Foundation
extension String {
View UIColor+extension.swift
//
// UIColor+extension.swift
//
// Created by Rodrigo Martins on 03/07/17.
// Copyright © 2017 Rodrigo Martins. All rights reserved.
//
import UIKit
extension UIColor {
View Utils
git clone https://android.googlesource.com/platform/packages/apps/Launcher3
@policante
policante / Podfile
Created Oct 13, 2017
Podfile with build settings SWIFT_VERSION specific
View Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
View CountDown.java
public class CountDown {
private CountDownTimer countDownTimer;
private int timeSeconds = 30;
public CountDown(){
countDownTimer = new CountDownTimer(timeSeconds * 1000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
String v = String.format("%02d", millisUntilFinished / 60000);
View OnSwipeTouchListener.java
import android.content.Context;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
public class OnSwipeTouchListener implements OnTouchListener {
private final GestureDetector gestureDetector;
You can’t perform that action at this time.