Skip to content

Instantly share code, notes, and snippets.

@LuizGadao
LuizGadao / app.js
Last active January 3, 2016 13:59 — forked from skypanther/app.js
// implement like this:
var window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
// draw the gridlines first so your other elements stack on top of them
// without requiring you to set the z-index property of each
var grid = require('gridlines');
grid.drawgrid(10,window);
@LuizGadao
LuizGadao / AddToDoActivity.java
Created October 29, 2014 19:28
Lab 4, in coursera.
package course.labs.todomanager;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
@LuizGadao
LuizGadao / PhotoMultipartRequest.java
Created January 7, 2015 22:36
My solution to send picture with Volley and get response in JSON.
package br.com.autoalerta.autoalerta.utils;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
import com.android.volley.VolleyLog;
@LuizGadao
LuizGadao / activity_what.xml
Created June 2, 2015 13:25
scroll height with online image
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="wrap_content" tools:context="akou.open.WhatActivity"
android:background="#d6d6d6">
<ScrollView
android:layout_width="match_parent"
android:id="@+id/scrollView1"
android:layout_height="wrap_content"
android:scrollbarAlwaysDrawVerticalTrack="true">
<LinearLayout
@LuizGadao
LuizGadao / BlankFragment.java
Last active October 6, 2015 03:45
textview-mask
package com.luizgadao.navigationdrawer;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@LuizGadao
LuizGadao / MainActivityFragment.java
Created October 22, 2015 15:29
simple webview with android.
package br.com.luizcarlos.bridhost;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
@LuizGadao
LuizGadao / fragment_main.xml
Created October 27, 2015 13:52
support layout for embend webview in Fragment
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:showIn="@layout/activity_main"
tools:context=".MainActivityFragment">
@LuizGadao
LuizGadao / MainActivityFragment.java
Created October 27, 2015 13:54
Fragment embed youtube video in Webview.
package br.com.mytest.luizgadao.testyoutubewebview;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
@LuizGadao
LuizGadao / alpha.xml
Created December 19, 2015 21:09
android alpha animation
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="2000"
/>
@LuizGadao
LuizGadao / rotate.xml
Created December 19, 2015 21:47
android animation rotate
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="2000"
android:repeatMode="reverse"
android:repeatCount="2"/>