Skip to content

Instantly share code, notes, and snippets.

jchernandez / Screenshot_20170210-151459.png
Last active Feb 10, 2017
Implementación del TopBarView para la aplicación de la Consar
jchernandez / touch_effect.xml
Last active Feb 5, 2020
Drawable for a touch hover effect pre lollipop and with ripple effect and an example usage
View touch_effect.xml
<selector xmlns:android=""
<item android:state_pressed="false">
<color android:color="@android:color/transparent"/>
<item android:state_pressed="true">
<!--<color name="touch_hover">#44565656</color> -->
<color android:color="@color/touch_hover" />
This progressbar is tinted with the accent color of an application
set a color filter to the progressbar drawable
so change the color of the progressbar in pre-lollipop versions
package com.urbanity.wallet.ui.components;
import android.annotation.TargetApi;
double t = 0;
Location temp = new Location("");
do {
double newLat = (uLocation.getLatitude() + (t * Math.cos(3 * t)));
double newLong = -(-uLocation.getLongitude() + (t * Math.sin(3 * t)));
LatLng latLng = new LatLng(newLat, newLong);
t = t + 0.00009;
jchernandez / mb_cdmx.json
Last active Mar 8, 2016
Json array of location, name of all the MetroBus from Mexico City, also has the encoded ploylines ot the 6 MB lines.
View mb_cdmx.json
"name": "Linea 1",
"stations": [{
"name": "Metrobus Indios Verdes",
"latitude": "19.496586",
"longitude": "-99.119804"
}, {
jchernandez /
Last active Aug 3, 2020
Simple Post Request with basic auth, using android Volley library
StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {
public void onResponse(String s) {
///handle response from service
}, new ErrorResponse() {
public void onErrorResponse(VolleyError volleyError) {
//handle error response
}) {