Example usage for android.widget CheckBox CheckBox

List of usage examples for android.widget CheckBox CheckBox

Introduction

In this page you can find the example usage for android.widget CheckBox CheckBox.

Prototype

public CheckBox(Context context) 

Source Link

Usage

From source file:com.example.sensingapp.SensingApp.java

private void show_screenUploadData() {
    int nCount;/*from   w w w.j  a v  a2 s  .  c  o m*/

    setContentView(R.layout.screen_upload_data);
    m_btnScreenUploadData_Back = (Button) findViewById(R.id.btScreenUploadData_Back);
    m_btnScreenUploadData_Back.setOnClickListener(m_btScreenUploadData_Back_Listener);

    m_btnScreenUploadData_Upload = (Button) findViewById(R.id.btScreenUploadData_Upload);
    m_btnScreenUploadData_Upload.setText(R.string.upload);
    m_btnScreenUploadData_Upload.setOnClickListener(m_btnScreenUploadData_Upload_Listener);

    m_blnUpload = false;

    m_pgbActivityIndicator = (ProgressBar) findViewById(R.id.ScreenUploadData_UploadProgress);

    m_llUploadData_ChkLayoutFileName = (LinearLayout) findViewById(R.id.ScreenUploadData_ChkLayoutFileName);

    readUnUploadedFileName();

    nCount = m_lstUnUploadedFileName.size();
    m_arrChkFilename = new CheckBox[nCount];

    for (int i = 0; i < nCount; i++) {
        m_arrChkFilename[i] = new CheckBox(this);
        m_arrChkFilename[i].setId(i);
        m_arrChkFilename[i].setText(getFileName(m_lstUnUploadedFileName.get(i)));
        m_arrChkFilename[i].setOnCheckedChangeListener(null);
        m_arrChkFilename[i].setLayoutParams(m_lpFilenameChkParams);
        m_llUploadData_ChkLayoutFileName.addView(m_arrChkFilename[i]);

    }

}