Advertisement
Guest User

Untitled

a guest
Apr 10th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. package br.livro.android.cap14.banco;
  2.  
  3. import java.util.List;
  4.  
  5. import android.app.ListActivity;
  6. import android.content.Intent;
  7. import android.os.Bundle;
  8. import android.view.Menu;
  9. import android.view.MenuItem;
  10.  
  11. public class CadastroCarros extends ListActivity {
  12.   protected static final int INSERIR_EDITAR = 1;
  13.   protected static final int BUSCAR = 2;
  14.   public static RepositorioCarro repositorio;
  15.   protected List<Carro> carros;
  16.  
  17.    
  18.     @Override
  19.     protected void onCreate(Bundle icicle) {
  20.         super.onCreate(icicle);
  21.         repositorio = new RepositorioCarro(this);
  22.         //atualizarLista();
  23.        
  24.     }
  25.    
  26.     protected void atualizarLista(){
  27.         carros = repositorio.listarCarros();
  28.         setListAdapter(new CarroListAdapter(this,carros));
  29.     }
  30.    
  31.    
  32.    
  33.    
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement