コード例 #1
0
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent data) {
   // TODO Auto-generated method stub
   super.onActivityResult(requestCode, resultCode, data);
   if (resultCode == 1) { // no futuro isso irá sofre alterações
     startTransacao(this, R.string.msg_erro_carregar_lista);
   }
 }
コード例 #2
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onActivityCreated(savedInstanceState);
    setHasOptionsMenu(true);

    if (savedInstanceState != null) {
      listaCoisas = savedInstanceState.getParcelableArrayList(Constantes.OBJ_COISAS);
      resultado();
    } else {
      startTransacao(this, R.string.msg_erro_carregar_lista);
    }
  }
コード例 #3
0
  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    // TODO Auto-generated method stub
    super.onCreateOptionsMenu(menu, inflater);

    inflater.inflate(R.menu.menu, menu);

    SearchView searchView =
        (SearchView) MenuItemCompat.getActionView(menu.findItem(R.id.menu_pesquisar));
    searchView.setQueryHint(this.getString(R.string.pesquisar));

    ((EditText) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text))
        .setHintTextColor(getResources().getColor(R.color.branco));
    searchView.setOnQueryTextListener(onQuerySearchView);
  }
コード例 #4
0
 @Override
 public void onSaveInstanceState(Bundle outState) {
   // TODO Auto-generated method stub
   super.onSaveInstanceState(outState);
   outState.putParcelableArrayList(Constantes.OBJ_COISAS, listaCoisas);
 }