Skip to content

Instantly share code, notes, and snippets.

Victor J. Valencia Gómez viktor1190

  • Universidad Tecnológica de Pereira
Block or report user

Report or block viktor1190

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
@viktor1190
viktor1190 / AccountAuthenticator.java
Created Jun 29, 2017 — forked from burgalon/AccountAuthenticator.java
Implementing OAuth2 with AccountManager, Retrofit and Dagger
View AccountAuthenticator.java
public class AccountAuthenticator extends AbstractAccountAuthenticator {
private final Context context;
@Inject @ClientId String clientId;
@Inject @ClientSecret String clientSecret;
@Inject ApiService apiService;
public AccountAuthenticator(Context context) {
super(context);
@viktor1190
viktor1190 / gist:526764e15efee9a1b9a193d861d66eb1
Created May 28, 2017 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1
View gist:526764e15efee9a1b9a193d861d66eb1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@viktor1190
viktor1190 / AssetDatabaseOpenHelper.java
Created Jan 3, 2017 — forked from wontondon/AssetDatabaseOpenHelper.java
Copy sqlite database from assets dir - Android
View AssetDatabaseOpenHelper.java
package com.javatarts.basketballgm.data;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
View template_eng.txt
public class MyAndroidFragment {
// =============================================================================================
// CONSTANTS
// =============================================================================================
public final String LOG_TAG = getClass().getSimpleName();
private static final int WINDOW_TITLE = R.string.windows_label_mi_clase;
private static final String BUNDLE_KEY_SOME_INT = "bk_some_int";
@viktor1190
viktor1190 / introrx.md
Created Aug 13, 2016 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
View CursorRecyclerViewAdapter.java
/*
* Copyright (C) 2014 skyfish.jy@gmail.com
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
@viktor1190
viktor1190 / estructura_es.txt
Last active Oct 27, 2016
Es una simple estructura de comentarios que uso para mantener la legibilidad del codigo en mis proyectos, especialmente para android, la idea con esto es dividir el código en secciones donde puedas ubicar de manera fácil cada componente de la clase y al mismo tiempo mantener una homogeneidad
View estructura_es.txt
public class MiClase {
// =============================================================================================
// CONSTANTES
// =============================================================================================
public final String LOG_TAG = getClass().getSimpleName();
private static final int WINDOW_TITLE = R.string.windows_label_mi_clase;
View PedidosActivity.java
package com.homeelementsweb.pedidosrecaudosmovilsantander.Controladores.Actividades.Pedido;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
View DigitaProductoPedidoActivity.java
package com.homeelementsweb.pedidosrecaudosmovilsantander.Controladores.Actividades.Pedido;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
You can’t perform that action at this time.