Android Open Source - BCC Add B C C Manage






From Project

Back to project page BCC.

License

The source code is released under:

MIT License

If you think the Android project BCC listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.bcc;
// w  w  w  . j  ava  2 s .com
import java.util.ArrayList;
import java.util.List;

import com.bcc.util.Facade;
import com.bcc.util.adaptor.ManageBCCListAdaptor;
import com.sdsu.bcc.database.data.CardInformation;

import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.RelativeLayout;

public class AddBCCManage extends ListActivity {
  
  private static Facade m_store = new Facade();
  private ProgressDialog m_ProgressDialog = null;
  private ManageBCCListAdaptor m_adapter = null;
  private List<CardInformation> m_values = new ArrayList<CardInformation>();
  private Runnable fetchList;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.addbcc_manage_list_view);
    
    RelativeLayout layout = (RelativeLayout)findViewById(android.R.id.empty);
    layout.setBackgroundColor(Color.parseColor("#FF001E2F"));
    
    ListView list = (ListView)findViewById(android.R.id.list);
    list.setBackgroundColor(Color.parseColor("#FF001E2F"));
    
    LayoutInflater inflater = getLayoutInflater();
    ViewGroup header = (ViewGroup)inflater.inflate(R.layout.header, list, false);
    
    list.addHeaderView(header, null, false);
    
    m_adapter = new ManageBCCListAdaptor(this,m_values);
    setListAdapter(m_adapter);
    
    fetchList = new Runnable(){
            @Override
            public void run() {
                getList();
            }
        };
        Thread thread =  new Thread(null, fetchList, "ImportExportListFetchBackground");
        thread.start();
        m_ProgressDialog = ProgressDialog.show(AddBCCManage.this,    
              "Please wait...", "Retrieving data ...", true);
  }

  @Override
  protected void onResume() {
    // TODO Auto-generated method stub
    super.onResume();
  }
  
  @Override
  public void onConfigurationChanged(Configuration newConfig) {
    // do nothing when keyboard open
    super.onConfigurationChanged(newConfig);
  }
  
  private void getList(){
    try{
      m_values = m_store.getCardList(this);
      Thread.sleep(500);
      Log.i("ARRAY", ""+ m_values.size());
    } catch (Exception e) { 
      Log.e("BACKGROUND_PROC", e.getMessage());
    }
    runOnUiThread(returnResponse);
    }
  
  private Runnable returnResponse = new Runnable() {

        @Override
        public void run() {
            if(m_values != null && m_values.size() > 0){
                m_adapter.notifyDataSetChanged();
                for(int i=0;i<m_values.size();i++)
                m_adapter.add(m_values.get(i));
            }
            m_ProgressDialog.dismiss();
            m_adapter.notifyDataSetChanged();
        }
    };
}




Java Source Code List

com.bcc.AddBCCManage.java
com.bcc.AddBCC.java
com.bcc.BCCActivity.java
com.bcc.ImportExportBCC.java
com.bcc.ImportExportManage.java
com.bcc.OCRResult.java
com.bcc.SetPrefs.java
com.bcc.util.BCCUtil.java
com.bcc.util.Facade.java
com.bcc.util.adaptor.ManageBCCListAdaptor.java
com.bcc.util.adaptor.ManageListAdaptor.java
com.itwizard.mezzofanti.AssetsManager.java
com.itwizard.mezzofanti.CameraManager.java
com.itwizard.mezzofanti.CaptureLayout.java
com.itwizard.mezzofanti.CustomImageButton.java
com.itwizard.mezzofanti.DownloadManager.java
com.itwizard.mezzofanti.InstallActivity.java
com.itwizard.mezzofanti.Mezzofanti.java
com.itwizard.mezzofanti.OCR.java
com.itwizard.mezzofanti.OnScreenHint.java
com.sdsu.bcc.BCCConstants.java
com.sdsu.bcc.database.DatabaseImpl.java
com.sdsu.bcc.database.DatabaseOperation.java
com.sdsu.bcc.database.data.CardInformation.java
com.sdsu.bcc.database.data.CategoryInformation.java
com.sdsu.bcc.database.data.ContactInformation.java
com.sdsu.bcc.database.data.FilesInformation.java
com.sdsu.bcc.database.data.ImageInformation.java
com.sdsu.bcc.database.impl.BCCDataStore.java
com.sdsu.bcc.database.impl.CategoryDataStore.java
com.sdsu.bcc.database.impl.ContactDataStore.java
com.sdsu.bcc.database.impl.FilesDataStore.java
com.sdsu.bcc.database.impl.ImageDataStore.java
com.sdsu.bcc.file.FileDataStoreFactory.java
com.sdsu.bcc.file.FileDataStoreOperations.java
com.sdsu.bcc.file.impl.CSVDataStore.java