为已创建的活动插入选项卡式视图

时间:2016-08-19 06:28:49

标签: android android-layout android-studio android-fragments tabs

我是android和stackoverflow的新手,所以请原谅,如果它听起来或读起来很傻。我有一个假设10个工作细节的列表视图。该列表仅包含作业的名称。当我点击任何名称时,我想打开两个标签视图。第一个选项卡将包含作业的更多详细信息,第二个选项卡将包含一个数据输入页面,该页面将从用户输入存储空间。所有作业详细信息(名称和更多详细信息)都是从从Web获取的json字符串中解析的。

现在,我创建了listview和详细信息页面(包含单个作业的更多详细信息)。但我无法在详细信息页面上实现标签式视图,即我无法制作正常的活动标签。请帮忙。

注意:作业列表页面也会获取所有详细信息,但在XML中,除了作业名称之外的所有详细信息的可见性都保留在"已消失"。

Ijob.java(职位列表活动)

package com.example.administrator.signin;

import com.example.administrator.signin.R;
import java.util.ArrayList;
import java.util.HashMap;

 import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

public class Ijob extends ListActivity {

  private ProgressDialog pDialog;

  // URL to get contacts JSON



    // JSON Node names

private static final String TAG_CON_NO = "CONSUMER_NO";
private static final String TAG_MET_NO = "METER_NO";
private static final String TAG_REC_ON = "RECEIVED_ON";
private static final String TAG_CON_NAME = "CON_NAME";
//private static final String TAG_CON_CAT = "CON_CAT";
private static final String TAG_MET_RAT = "MET_RAT";
private static final String TAG_CON_ADD = "CON_ADD";
//private static final String TAG_CON_ACC_ADD = "CON_ACC_ADD";
private static final String TAG_COM_RSN = "COM_RSN";

private static final String TAG_M_REF = "M_REF";
private static final String TAG_M_DATE = "M_DATE";
//  //private static final String TAG_CON_CAT = " ";
private static final String TAG_PREV_DATA = "PREV_DATA";
private static final String TAG_TELE_NO = "TELE_NO";
private static final String TAG_IE_DT_N_PRSNT_PREV_RDG =     "IE_DT_N_PRSNT_PREV_RDG";
private static final String TAG_LCC_LRO_ROM = "LCC_LRO_ROM";


    // Hashmap for ListView
    ArrayList<HashMap<String, String>> jobList;

    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ijob);

    jobList = new ArrayList<HashMap<String, String>>();

    ListView lv = getListView();

    // Listview on item click listener
    lv.setOnItemClickListener(new OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view,
                                int position, long id) {
            // getting values from selected ListItem
            String CONSUMER_NO = ((TextView) view.findViewById(R.id.CON_NO))
                    .getText().toString();
            String METER_NO = ((TextView) view.findViewById(R.id.MET_NO))
                    .getText().toString();
            String MET_RAT = ((TextView) view.findViewById(R.id.MET_RAT))
                    .getText().toString();
            String REC_ON = ((TextView) view.findViewById(R.id.REC_ON))
                    .getText().toString();
            String CON_NAME = ((TextView) view.findViewById(R.id.CON_NAME))
                    .getText().toString();
            String CON_ADD = ((TextView) view.findViewById(R.id.CON_ADD))
                    .getText().toString();
            String COM_RSN = ((TextView) view.findViewById(R.id.COM_RSN))
                .getText().toString();
            String M_REF = ((TextView) view.findViewById(R.id.M_REF))
                    .getText().toString();
            String M_DATE = ((TextView) view.findViewById(R.id.M_DATE))
                    .getText().toString();
            String PREV_DATA = ((TextView)     view.findViewById(R.id.PREV_DATA)).getText().toString();
            String TELE_NO = ((TextView) view.findViewById(R.id.TELE_NO))
                    .getText().toString();
            String IE_DT_N_PRSNT_PREV_RDG = ((TextView)     view.findViewById(R.id.IE_DT_N_PRSNT_PREV_RDG))
                    .getText().toString();
            String LCC_LRO_ROM = ((TextView)     view.findViewById(R.id.LCC_LRO_ROM))
                    .getText().toString();


            // Starting single contact activity
            Intent in = new Intent(getApplicationContext(),
                    SingleContactActivity.class);
            in.putExtra(TAG_CON_NO, CONSUMER_NO);
            in.putExtra(TAG_MET_NO, METER_NO);
            in.putExtra(TAG_MET_RAT, MET_RAT);
            in.putExtra(TAG_REC_ON, REC_ON);
            in.putExtra(TAG_CON_NAME, CON_NAME);
            in.putExtra(TAG_CON_ADD, CON_ADD);
            in.putExtra(TAG_COM_RSN, COM_RSN);
            in.putExtra(TAG_M_REF, M_REF);
            in.putExtra(TAG_M_DATE, M_DATE);
            in.putExtra(TAG_PREV_DATA, PREV_DATA);
            in.putExtra(TAG_TELE_NO, TELE_NO);
            in.putExtra(TAG_IE_DT_N_PRSNT_PREV_RDG, IE_DT_N_PRSNT_PREV_RDG);
            in.putExtra(TAG_LCC_LRO_ROM, LCC_LRO_ROM);


            startActivity(in);

        }
    });

    // Calling async task to get json
    new GetContacts().execute();
}

/**
 * Async task class to get json by making HTTP call
 * */
private class GetContacts extends AsyncTask<Void, Void, Void> {

    @Override
    protected void onPreExecute() {
        super.onPreExecute();
        // Showing progress dialog
        pDialog = new ProgressDialog(Ijob.this);
        pDialog.setMessage("Please wait...");
        pDialog.setCancelable(false);
        pDialog.show();

    }

    @Override
    protected Void doInBackground(Void... arg0) {
        // Creating service handler class instance
        ServiceHandler sh = new ServiceHandler();

        // Making a request to url and getting response
        String aid = Settings.Secure.getString(getContentResolver(), Settings.Secure.ANDROID_ID);
        String url = "http://00.00.00.00/fetch_emp_1.jsp?ecd=" + aid;
        String jsonStr = sh.makeServiceCall(url, ServiceHandler.GET);

        Log.d("Response: ", "> " + jsonStr);

        if (jsonStr != null) {
            try {
//                  JSONObject jsonObj = new JSONObject(jsonStr);

                JSONArray jobs = new JSONArray(jsonStr);

                // Getting JSON Array node
//                  jobs = jsonObj.getJSONArray("");

                // looping through All Contacts
                for (int i = 0; i < jobs.length(); i++) {
                    JSONObject c = jobs.getJSONObject(i);

                    String CON_NO = c.getString(TAG_CON_NO);//  +" - "+c.getString(TAG_CON_CAT);
                    String MET_NO = c.getString(TAG_MET_NO);
                    String MET_RAT = c.getString(TAG_MET_RAT);
                    String REC_ON = c.getString(TAG_REC_ON);
                    String CON_NAME = (i + 1) + " . " + c.getString(TAG_CON_NAME);
                    String CON_ADD = c.getString(TAG_CON_ADD); //+" "+c.getString(TAG_CON_ACC_ADD);
                    String COM_RSN = c.getString(TAG_COM_RSN);
                    String M_REF = c.getString(TAG_M_REF);
                    String M_DATE = c.getString(TAG_M_DATE);
                    String PREV_DATA = c.getString(TAG_PREV_DATA);
                    String TELE_NO = c.getString(TAG_TELE_NO);
                    String IE_DT_N_PRSNT_PREV_RDG = c.getString(TAG_IE_DT_N_PRSNT_PREV_RDG);
                    String LCC_LRO_ROM = c.getString(TAG_LCC_LRO_ROM);

                    // tmp hashmap for single contact
                    HashMap<String, String> contact = new HashMap<String, String>();

                    // adding each child node to HashMap key => value
                    contact.put(TAG_CON_NO, CON_NO);
                    contact.put(TAG_MET_NO, MET_NO);
                    contact.put(TAG_MET_RAT, MET_RAT);
                    contact.put(TAG_REC_ON, REC_ON);
                    contact.put(TAG_CON_NAME, CON_NAME);
                    contact.put(TAG_CON_ADD, CON_ADD);
                    contact.put(TAG_COM_RSN, COM_RSN);

                    contact.put(TAG_M_REF, M_REF);
                    contact.put(TAG_M_DATE, M_DATE);
                    contact.put(TAG_PREV_DATA, PREV_DATA);
                    contact.put(TAG_TELE_NO, TELE_NO);
                    contact.put(TAG_IE_DT_N_PRSNT_PREV_RDG, IE_DT_N_PRSNT_PREV_RDG);
                    contact.put(TAG_LCC_LRO_ROM, LCC_LRO_ROM);

                    // adding contact to contact list
                    jobList.add(contact);
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
        } else {
            Log.e("ServiceHandler", "Couldn't get any data from the url");
        }

        return null;
    }

    @Override
    protected void onPostExecute(Void result) {
        super.onPostExecute(result);
        // Dismiss the progress dialog
        if (pDialog.isShowing())
            pDialog.dismiss();
        /**
         * Updating parsed JSON data into ListView
         * */
        ListAdapter adapter = new SimpleAdapter(
                Ijob.this, jobList,
                R.layout.list_item, new String[]{TAG_CON_NO, TAG_MET_NO, TAG_MET_RAT,
                TAG_REC_ON, TAG_CON_NAME, TAG_CON_ADD, TAG_COM_RSN, TAG_M_REF, TAG_M_DATE, TAG_PREV_DATA, TAG_TELE_NO, TAG_IE_DT_N_PRSNT_PREV_RDG, TAG_LCC_LRO_ROM}, new int[]{R.id.CON_NO,
                R.id.MET_NO, R.id.MET_RAT, R.id.REC_ON, R.id.CON_NAME, R.id.CON_ADD, R.id.COM_RSN, R.id.M_REF, R.id.M_DATE, R.id.PREV_DATA, R.id.TELE_NO, R.id.IE_DT_N_PRSNT_PREV_RDG, R.id.LCC_LRO_ROM});

        setListAdapter(adapter);
    }

}



}

单个作业详细信息页面如下:

package com.example.administrator.signin;

 import android.app.ActionBar;
 import android.app.Activity;
 import android.app.FragmentTransaction;
 import android.content.Intent;
 import android.os.Bundle;
 import android.widget.TextView;






 public class SingleContactActivity  extends Activity {


// JSON node keys
private static final String TAG_CON_NO = "CONSUMER_NO";
private static final String TAG_MET_NO = "METER_NO";
private static final String TAG_REC_ON = "RECEIVED_ON";
private static final String TAG_CON_NAME = "CON_NAME";
private static final String TAG_CON_ADD = "CON_ADD";
private static final String TAG_COM_RSN = "COM_RSN";
private static final String TAG_MET_RAT = "MET_RAT";

private static final String TAG_M_REF = "M_REF";
private static final String TAG_M_DATE = "M_DATE";
//private static final String TAG_CON_CAT = " ";


private static final String TAG_PREV_DATA = "PREV_DATA";
private static final String TAG_TELE_NO = "TELE_NO";
private static final String TAG_IE_DT_N_PRSNT_PREV_RDG = "IE_DT_N_PRSNT_PREV_RDG";
private static final String TAG_LCC_LRO_ROM = "LCC_LRO_ROM";






@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_single_contact);


    // getting intent data
    Intent in = getIntent();

    // Get JSON values from previous intent
    String CON_NO = in.getStringExtra(TAG_CON_NO);
    String MET_NO = in.getStringExtra(TAG_MET_NO);
    String REC_ON = in.getStringExtra(TAG_REC_ON);
    String CON_NAME = in.getStringExtra(TAG_CON_NAME);
    String CON_ADD = in.getStringExtra(TAG_CON_ADD);
    String COM_RSN = in.getStringExtra(TAG_COM_RSN);


    String MET_RAT = in.getStringExtra(TAG_MET_RAT);
    //String CON_CAT = in.getStringExtra(TAG_CON_CAT);

    String MET_REF = in.getStringExtra(TAG_M_REF);
    String M_DATE = in.getStringExtra(TAG_M_DATE);
    String PREV_DATA = in.getStringExtra(TAG_PREV_DATA);
    String IE_DT_N_PRSNT_PREV_RDG = in.getStringExtra(TAG_IE_DT_N_PRSNT_PREV_RDG);
    String LCC_LRO_ROM = in.getStringExtra(TAG_LCC_LRO_ROM);

    String TELE_NO = in.getStringExtra(TAG_TELE_NO);


    //PARSING THE STRING ===================


    String delims = "[;]";

    String[] CON_NAME_tokens = CON_NAME.split(" . ");


    String[] PREV_DATA_tokens = PREV_DATA.split(delims);
    String[] MM_YY_1_final = PREV_DATA_tokens[0].split(":");

    String[] MM_YY_2_tokens = PREV_DATA_tokens[1].split(delims);
    String[] MM_YY_2_final = MM_YY_2_tokens[0].split(":");

    String[] MM_YY_3_tokens = PREV_DATA_tokens[2].split(delims);
    String[] MM_YY_3_final = MM_YY_3_tokens[0].split(":");

    String[] MM_YY_4_tokens = PREV_DATA_tokens[3].split(delims);
    String[] MM_YY_4_final = MM_YY_4_tokens[0].split(":");

    String[] MM_YY_5_tokens = PREV_DATA_tokens[4].split(delims);
    String[] MM_YY_5_final = MM_YY_5_tokens[0].split(":");

    String[] MM_YY_6_tokens = PREV_DATA_tokens[5].split(delims);
    String[] MM_YY_6_final = MM_YY_6_tokens[0].split(":");

    String[] MM_YY_7_tokens = PREV_DATA_tokens[6].split(delims);
    String[] MM_YY_7_final = MM_YY_7_tokens[0].split(":");

    String[] MM_YY_8_tokens = PREV_DATA_tokens[7].split(delims);
    String[] MM_YY_8_final = MM_YY_8_tokens[0].split(":");

    String[] MM_YY_9_tokens = PREV_DATA_tokens[8].split(delims);
    String[] MM_YY_9_final = MM_YY_9_tokens[0].split(":");

    String[] MM_YY_10_tokens = PREV_DATA_tokens[9].split(delims);
    String[] MM_YY_10_final = MM_YY_10_tokens[0].split(":");

    String[] MM_YY_11_tokens = PREV_DATA_tokens[10].split(delims);
    String[] MM_YY_11_final = MM_YY_11_tokens[0].split(":");

    String[] MM_YY_12_tokens = PREV_DATA_tokens[11].split(delims);
    String[] MM_YY_12_final = MM_YY_12_tokens[0].split(":");

    String[] MM_YY_13_tokens = PREV_DATA_tokens[12].split(delims);
    String[] MM_YY_13_final = MM_YY_13_tokens[0].split(":");

    String[] MM_YY_14_tokens = PREV_DATA_tokens[13].split(delims);
    String[] MM_YY_14_final = MM_YY_14_tokens[0].split(":");

    String[] MM_YY_15_tokens = PREV_DATA_tokens[14].split(delims);
    String[] MM_YY_15_final = MM_YY_15_tokens[0].split(":");

    String[] MM_YY_16_tokens = PREV_DATA_tokens[15].split(delims);
    String[] MM_YY_16_final = MM_YY_16_tokens[0].split(":");

    String[] MM_YY_17_tokens = PREV_DATA_tokens[16].split(delims);
    String[] MM_YY_17_final = MM_YY_17_tokens[0].split(":");

    String[] MM_YY_18_tokens = PREV_DATA_tokens[17].split(delims);
    String[] MM_YY_18_final = MM_YY_18_tokens[0].split(":");

    String[] MM_YY_19_tokens = PREV_DATA_tokens[18].split(delims);
    String[] MM_YY_19_final = MM_YY_18_tokens[0].split(":");

    String[] MM_YY_20_tokens = PREV_DATA_tokens[19].split(delims);
    String[] MM_YY_20_final = MM_YY_20_tokens[0].split(":");

    String[] MM_YY_21_tokens = PREV_DATA_tokens[20].split(delims);
    String[] MM_YY_21_final = MM_YY_21_tokens[0].split(":");

    String[] MM_YY_22_tokens = PREV_DATA_tokens[21].split(delims);
    String[] MM_YY_22_final = MM_YY_22_tokens[0].split(":");

    String[] MM_YY_23_tokens = PREV_DATA_tokens[22].split(delims);
    String[] MM_YY_23_final = MM_YY_23_tokens[0].split(":");

    String[] MM_YY_24_tokens = PREV_DATA_tokens[23].split(delims);
    String[] MM_YY_24_final = MM_YY_24_tokens[0].split(":");


    String[] IE_DT_N_PRSNT_PREV_RDG_tokens =
IE_DT_N_PRSNT_PREV_RDG.split(delims);
    String[] IE_date_final = IE_DT_N_PRSNT_PREV_RDG_tokens[0].split(":");

    String[] Present_Rdg_tokens =            IE_DT_N_PRSNT_PREV_RDG_tokens[1].split(delims);
    String[] Present_Rdg_final = Present_Rdg_tokens[0].split(":");

    String[] Last_Rdg_tokens = IE_DT_N_PRSNT_PREV_RDG_tokens[2].split(delims);
    String[] Last_Rdg_final = Last_Rdg_tokens[0].split(":");


    String[] LCC_LRO_ROM_tokens = LCC_LRO_ROM.split(delims);
    String[] LCC_Act_final = LCC_LRO_ROM_tokens[0].split(":");

    String[] Last_Read_On_tokens = LCC_LRO_ROM_tokens[1].split(delims);
    String[] Last_Read_On_final = Last_Read_On_tokens[0].split(":");


    String[] R_no_tokens = LCC_LRO_ROM_tokens[2].split(delims);
    String[] R_no_final = R_no_tokens[0].split("\\s");

    String[] O_no_tokens = LCC_LRO_ROM_tokens[3].split(delims);
    String[] O_no_final = R_no_tokens[0].split("\\s");

    String[] M_no_tokens = LCC_LRO_ROM_tokens[4].split(delims);
    String[] M_no_final = R_no_tokens[0].split("\\s");


    //END OF PARSING STRINGS==================


    // Displaying all values on the screen
    TextView lblMref = (TextView) findViewById(R.id.m_ref);
    TextView lblMdate = (TextView) findViewById(R.id.m_date);
    TextView lblRec_On = (TextView) findViewById(R.id.rec_on_label);
    TextView lblCons_No = (TextView) findViewById(R.id.con_no_label);
    TextView lblMet_No = (TextView) findViewById(R.id.met_no_label);
    TextView lblCons_Name = (TextView) findViewById(R.id.con_name_label);
    TextView lblCons_Addr = (TextView) findViewById(R.id.con_add_label);
    TextView lblComp_Reason = (TextView) findViewById(R.id.com_rsn_label);
    TextView lblMet_Rat = (TextView) findViewById(R.id.met_rat_label);
    TextView lblCon_Cat = (TextView) findViewById(R.id.con_cat_label);
    TextView lblTele_No = (TextView) findViewById(R.id.tele_no_label);

    TextView lblIE_Date_final = (TextView) findViewById(R.id.IE_label);
    TextView lblPresent_Rdng_final = (TextView) findViewById(R.id.present_reading_label);
    TextView lblLast_Rdng_final = (TextView) findViewById(R.id.prev_reading_label);

    TextView lblLCC_Act_final = (TextView) findViewById(R.id.lcc_action_label);
    TextView lblLast_read_On_final = (TextView) findViewById(R.id.last_read_label);
    TextView lblR_no_final = (TextView) findViewById(R.id.R_no_label);
    TextView lblO_no_final = (TextView) findViewById(R.id.O_no_label);
    TextView lblM_no_final = (TextView) findViewById(R.id.M_no_label);


    TextView lblMMYY_1 = (TextView) findViewById(R.id.mm_yy_1);
    TextView lblMMYY_2 = (TextView) findViewById(R.id.mm_yy_2);
    TextView lblMMYY_3 = (TextView) findViewById(R.id.mm_yy_3);
    TextView lblMMYY_4 = (TextView) findViewById(R.id.mm_yy_4);
    TextView lblMMYY_5 = (TextView) findViewById(R.id.mm_yy_5);
    TextView lblMMYY_6 = (TextView) findViewById(R.id.mm_yy_6);
    TextView lblMMYY_7 = (TextView) findViewById(R.id.mm_yy_7);
    TextView lblMMYY_8 = (TextView) findViewById(R.id.mm_yy_8);
    TextView lblMMYY_9 = (TextView) findViewById(R.id.mm_yy_9);
    TextView lblMMYY_10 = (TextView) findViewById(R.id.mm_yy_10);
    TextView lblMMYY_11 = (TextView) findViewById(R.id.mm_yy_11);
    TextView lblMMYY_12 = (TextView) findViewById(R.id.mm_yy_12);
    TextView lblMMYY_13 = (TextView) findViewById(R.id.mm_yy_13);
    TextView lblMMYY_14 = (TextView) findViewById(R.id.mm_yy_14);
    TextView lblMMYY_15 = (TextView) findViewById(R.id.mm_yy_15);
    TextView lblMMYY_16 = (TextView) findViewById(R.id.mm_yy_16);
    TextView lblMMYY_17 = (TextView) findViewById(R.id.mm_yy_17);
    TextView lblMMYY_18 = (TextView) findViewById(R.id.mm_yy_18);
    TextView lblMMYY_19 = (TextView) findViewById(R.id.mm_yy_19);
    TextView lblMMYY_20 = (TextView) findViewById(R.id.mm_yy_20);
    TextView lblMMYY_21 = (TextView) findViewById(R.id.mm_yy_21);
    TextView lblMMYY_22 = (TextView) findViewById(R.id.mm_yy_22);
    TextView lblMMYY_23 = (TextView) findViewById(R.id.mm_yy_23);
    TextView lblMMYY_24 = (TextView) findViewById(R.id.mm_yy_24);

    TextView lblCont_1 = (TextView) findViewById(R.id.mm_yy_1_content);
    TextView lblCont_2 = (TextView) findViewById(R.id.mm_yy_2_content);
    TextView lblCont_3 = (TextView) findViewById(R.id.mm_yy_3_content);
    TextView lblCont_4 = (TextView) findViewById(R.id.mm_yy_4_content);
    TextView lblCont_5 = (TextView) findViewById(R.id.mm_yy_5_content);
    TextView lblCont_6 = (TextView) findViewById(R.id.mm_yy_6_content);
    TextView lblCont_7 = (TextView) findViewById(R.id.mm_yy_7_content);
    TextView lblCont_8 = (TextView) findViewById(R.id.mm_yy_8_content);
    TextView lblCont_9 = (TextView) findViewById(R.id.mm_yy_9_content);
    TextView lblCont_10 = (TextView) findViewById(R.id.mm_yy_10_content);
    TextView lblCont_11 = (TextView) findViewById(R.id.mm_yy_11_content);
    TextView lblCont_12 = (TextView) findViewById(R.id.mm_yy_12_content);
    TextView lblCont_13 = (TextView) findViewById(R.id.mm_yy_13_content);
    TextView lblCont_14 = (TextView) findViewById(R.id.mm_yy_14_content);
    TextView lblCont_15 = (TextView) findViewById(R.id.mm_yy_15_content);
    TextView lblCont_16 = (TextView) findViewById(R.id.mm_yy_16_content);
    TextView lblCont_17 = (TextView) findViewById(R.id.mm_yy_17_content);
    TextView lblCont_18 = (TextView) findViewById(R.id.mm_yy_18_content);
    TextView lblCont_19 = (TextView) findViewById(R.id.mm_yy_19_content);
    TextView lblCont_20 = (TextView) findViewById(R.id.mm_yy_20_content);
    TextView lblCont_21 = (TextView) findViewById(R.id.mm_yy_21_content);
    TextView lblCont_22 = (TextView) findViewById(R.id.mm_yy_22_content);
    TextView lblCont_23 = (TextView) findViewById(R.id.mm_yy_23_content);
    TextView lblCont_24 = (TextView) findViewById(R.id.mm_yy_24_content);


    lblMref.setText(MET_REF);
    lblMdate.setText(M_DATE);
    lblRec_On.setText(REC_ON);
    lblCons_No.setText(CON_NO);
    lblMet_No.setText(MET_NO);
    lblCons_Name.setText(CON_NAME_tokens[1]);
    lblCons_Addr.setText(CON_ADD);
    lblComp_Reason.setText(COM_RSN);
    lblMet_Rat.setText(MET_RAT);
    // lblCon_Cat.setText(CON_CAT);

    lblIE_Date_final.setText(IE_date_final[1]);
    lblPresent_Rdng_final.setText(Present_Rdg_final[1]);
    lblLast_Rdng_final.setText(Last_Rdg_final[1]);

    lblLCC_Act_final.setText(LCC_Act_final[1]);
    lblLast_read_On_final.setText(Last_Read_On_final[1]);
    lblR_no_final.setText(R_no_final[2]);
    lblO_no_final.setText(O_no_final[2]);
    lblM_no_final.setText(M_no_final[2]);

    lblTele_No.setText(TELE_NO);


    lblMMYY_1.setText(MM_YY_1_final[0]);
    lblMMYY_2.setText(MM_YY_2_final[0]);
    lblMMYY_3.setText(MM_YY_3_final[0]);
    lblMMYY_4.setText(MM_YY_4_final[0]);
    lblMMYY_5.setText(MM_YY_5_final[0]);
    lblMMYY_6.setText(MM_YY_6_final[0]);
    lblMMYY_7.setText(MM_YY_7_final[0]);
    lblMMYY_8.setText(MM_YY_8_final[0]);
    lblMMYY_9.setText(MM_YY_9_final[0]);
    lblMMYY_10.setText(MM_YY_10_final[0]);
    lblMMYY_11.setText(MM_YY_11_final[0]);
    lblMMYY_12.setText(MM_YY_12_final[0]);
    lblMMYY_13.setText(MM_YY_13_final[0]);
    lblMMYY_14.setText(MM_YY_14_final[0]);
    lblMMYY_15.setText(MM_YY_15_final[0]);
    lblMMYY_16.setText(MM_YY_16_final[0]);
    lblMMYY_17.setText(MM_YY_17_final[0]);
    lblMMYY_18.setText(MM_YY_18_final[0]);
    lblMMYY_19.setText(MM_YY_19_final[0]);
    lblMMYY_20.setText(MM_YY_20_final[0]);
    lblMMYY_21.setText(MM_YY_21_final[0]);
    lblMMYY_22.setText(MM_YY_22_final[0]);
    lblMMYY_23.setText(MM_YY_23_final[0]);
    lblMMYY_24.setText(MM_YY_24_final[0]);


    lblCont_1.setText(MM_YY_1_final[1]);
    lblCont_2.setText(MM_YY_2_final[1]);
    lblCont_3.setText(MM_YY_3_final[1]);
    lblCont_4.setText(MM_YY_4_final[1]);
    lblCont_5.setText(MM_YY_5_final[1]);
    lblCont_6.setText(MM_YY_6_final[1]);
    lblCont_7.setText(MM_YY_7_final[1]);
    lblCont_8.setText(MM_YY_8_final[1]);
    lblCont_9.setText(MM_YY_9_final[1]);
    lblCont_10.setText(MM_YY_10_final[1]);
    lblCont_11.setText(MM_YY_11_final[1]);
    lblCont_12.setText(MM_YY_12_final[1]);
    lblCont_13.setText(MM_YY_13_final[1]);
    lblCont_14.setText(MM_YY_14_final[1]);
    lblCont_15.setText(MM_YY_15_final[1]);
    lblCont_16.setText(MM_YY_16_final[1]);
    lblCont_17.setText(MM_YY_17_final[1]);
    lblCont_18.setText(MM_YY_18_final[1]);
    lblCont_19.setText(MM_YY_19_final[1]);
    lblCont_20.setText(MM_YY_20_final[1]);
    lblCont_21.setText(MM_YY_21_final[1]);
    lblCont_22.setText(MM_YY_22_final[1]);
    lblCont_23.setText(MM_YY_23_final[1]);
    lblCont_24.setText(MM_YY_24_final[1]);


}
}

0 个答案:

没有答案