Skip to content

Instantly share code, notes, and snippets.

@condesa
condesa / README.md
Last active March 4, 2016 11:13
Volley Manager is a wrapper that allows framework Volley integration easily and quickly.

VolleyManager

Description

This library helps developers integrating Volley framework to their Android Application.

It offers a methods for calling APIs REST.

@condesa
condesa / gist:2918651
Created June 12, 2012 16:47
Intents implícitos
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class IntentTestActivity extends Activity {
/** Called when the activity is first created. */
@condesa
condesa / gist:2913003
Created June 11, 2012 21:58
Uso de Runnable en Android
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.widget.Toast;
import android.widget.Button;
import android.view.View;
import android.view.View.OnClickListener;;
public class RunnableTestActivity extends Activity {
@condesa
condesa / gist:2912922
Created June 11, 2012 21:41
Prueba de un thread en Android
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.widget.ProgressBar;
public class ThreadTestActivity extends Activity {
ProgressBar bar;
Handler handler = new Handler(){
@Override
@condesa
condesa / gist:2896425
Created June 8, 2012 16:01
Estilo del ArrayAdapter en Android
//Adapter con un layout del framework de Android
lv.setAdapter(new ArrayAdapter(this,android.R.layout.simple_list_item_1,datos));
//Adapter con un layout propio
lv.setAdapter(new ArrayAdapter(this,R.layout.list_item,datos));
@condesa
condesa / gist:2896250
Created June 8, 2012 15:43
Método getView de un ArrayAdapter en Android
public View getView(int position, View convertView, ViewGroup parent){
if(convertView==null){
convertView = new TextView(this);
}
convertView.setText(buildStringFor(position));
return(convertView);
}
@condesa
condesa / gist:2896234
Created June 8, 2012 15:41
Creación de un ArrayAdapter
String[] datos = {"uno", "dos", "tres", "cuatro"};
new ArrayAdapter(this, android.R.layout.simple_list_item_1, datos);
@condesa
condesa / gist:2889483
Created June 7, 2012 15:35
Estructura de un RadioGroup en Androi
<?xml version="1.0" encoding="utf-8"?>
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RadioButton
android:id="@+id/rb_01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@condesa
condesa / gist:2888981
Created June 7, 2012 14:06
Uso del método findViewById en Android
protected Button btn;
btn = (Button)findViewById(R.id.btn);
@condesa
condesa / gist:2884977
Created June 6, 2012 21:36
TextView como elemento raíz de un Layout File en Android
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:typeface="monospace"
android:text="Esta es mi etiqueta al estilo Androideity"
android:textColor="#A4C639"
android:textStyle="bold" />