有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java ClassNotFoundException:解组Android时找不到类

我已经将在eclipse中开发的旧安卓程序迁移到安卓 studio。迁移时没有错误,应用程序也正常工作。但在按下“后退”按钮/或尝试完成当前活动并返回时,会出现一个错误弹出窗口,应用程序会崩溃

****如果我评论sheBalanceDTO=in。readParcelable(SHEBalanceDTO.class.getClassLoader())目的地。可书面强制执行(sheBalanceDTO、旗帜)在ClaimHistoryDTO应用程序中不会崩溃

这是logcat错误

2019-11-21 15:38:25.524 7172-7172/lk.slic.mobile E/Parcel: Class not found when unmarshalling: 2019/05/01
    java.lang.ClassNotFoundException: Invalid name: 2019/05/01
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:453)
        at 安卓.os.Parcel.readParcelableCreator(Parcel.java:2827)
        at 安卓.os.Parcel.readParcelable(Parcel.java:2781)
        at lk.slic.dto.ClaimHistoryDTO.<init>(ClaimHistoryDTO.java:27)
        at lk.slic.dto.ClaimHistoryDTO$1.createFromParcel(ClaimHistoryDTO.java:36)
        at lk.slic.dto.ClaimHistoryDTO$1.createFromParcel(ClaimHistoryDTO.java:33)
        at 安卓.os.Parcel.readParcelable(Parcel.java:2790)
        at 安卓.os.Parcel.readValue(Parcel.java:2684)
        at 安卓.os.Parcel.readArrayMapInternal(Parcel.java:3053)
        at 安卓.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:288)
        at 安卓.os.BaseBundle.unparcel(BaseBundle.java:232)
        at 安卓.os.BaseBundle.containsKey(BaseBundle.java:504)
        at 安卓.content.Intent.hasExtra(Intent.java:7956)
        at 安卓.app.Activity.finish(Activity.java:5751)
        at 安卓.app.Activity.finish(Activity.java:5763)
        at lk.slic.mobile.claimhistoryfirstpage.onBackPressed(claimhistoryfirstpage.java:257)
        at 安卓.app.Activity.onKeyUp(Activity.java:3176)
        at 安卓.view.KeyEvent.dispatch(KeyEvent.java:3389)
        at 安卓.app.Activity.dispatchKeyEvent(Activity.java:3466)
        at com.安卓.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:602)
        at 安卓.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:6163)
        at 安卓.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6018)
        at 安卓.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5471)
        at 安卓.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5524)
        at 安卓.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5490)
        at 安卓.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5649)
        at 安卓.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5498)
        at 安卓.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5706)
        at 安卓.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5471)
        at 安卓.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5524)
        at 安卓.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5490)
        at 安卓.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5498)
        at 安卓.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5471)
        at 安卓.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5524)
        at 安卓.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5490)
        at 安卓.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5682)
        at 安卓.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:5851)
        at 安卓.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3395)
        at 安卓.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2842)
        at 安卓.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2833)
        at 安卓.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3372)
        at 安卓.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
        at 安卓.os.MessageQueue.nativePollOnce(Native Method)
        at 安卓.os.MessageQueue.next(MessageQueue.java:326)
        at 安卓.os.Looper.loop(Looper.java:183)
        at 安卓.app.ActivityThread.main(ActivityThread.java:7266)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.安卓.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.安卓.internal.os.ZygoteInit.main(ZygoteInit.java:975)
2019-11-21 15:38:25.525 7172-7172/lk.slic.mobile E/InputEventSender: Exception dispatching finished signal.
2019-11-21 15:38:25.525 7172-7172/lk.slic.mobile E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
2019-11-21 15:38:25.528 7172-7172/lk.slic.mobile E/MessageQueue-JNI: 安卓.os.BadParcelableException: ClassNotFoundException when unmarshalling: 2019/05/01
        at 安卓.os.Parcel.readParcelableCreator(Parcel.java:2855)
        at 安卓.os.Parcel.readParcelable(Parcel.java:2781)
        at lk.slic.dto.ClaimHistoryDTO.<init>(ClaimHistoryDTO.java:27)
        at lk.slic.dto.ClaimHistoryDTO$1.createFromParcel(ClaimHistoryDTO.java:36)
        at lk.slic.dto.ClaimHistoryDTO$1.createFromParcel(ClaimHistoryDTO.java:33)
        at 安卓.os.Parcel.readParcelable(Parcel.java:2790)
        at 安卓.os.Parcel.readValue(Parcel.java:2684)
        at 安卓.os.Parcel.readArrayMapInternal(Parcel.java:3053)
        at 安卓.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:288)
        at 安卓.os.BaseBundle.unparcel(BaseBundle.java:232)
        at 安卓.os.BaseBundle.containsKey(BaseBundle.java:504)
        at 安卓.content.Intent.hasExtra(Intent.java:7956)
        at 安卓.app.Activity.finish(Activity.java:5751)
        at 安卓.app.Activity.finish(Activity.java:5763)
        at lk.slic.mobile.claimhistoryfirstpage.onBackPressed(claimhistoryfirstpage.java:257)
        at 安卓.app.Activity.onKeyUp(Activity.java:3176)
        at 安卓.view.KeyEvent.dispatch(KeyEvent.java:3389)
        at 安卓.app.Activity.dispatchKeyEvent(Activity.java:3466)
        at com.安卓.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:602)

类别索赔历史数据

public class ClaimHistoryDTO implements Parcelable {



    public ClaimHistoryDTO() {

    }

    protected ClaimHistoryDTO(Parcel in) {
        employeeDTO = in.readParcelable(EmployeeDTO.class.getClassLoader());
        dependentDTO = in.createTypedArrayList(DependentDTO.CREATOR);
        policyDetailsDTO = in.readParcelable(PolicyDetailsDTO.class.getClassLoader());
        benefitsDTO = in.readParcelable(BenefitsDTO.class.getClassLoader());
        sheBalanceDTO = in.readParcelable(SHEBalanceDTO.class.getClassLoader());
        pendingClaimsDTO = in.createTypedArrayList(PendingClaimsDTO.CREATOR);
        previousClaimsDTO = in.createTypedArrayList(PreviousClaimsDTO.CREATOR);
        FeedBack = in.readString();
    }

    public static final Creator<ClaimHistoryDTO> CREATOR = new Creator<ClaimHistoryDTO>() {
        @Override
        public ClaimHistoryDTO createFromParcel(Parcel in) {
            return new ClaimHistoryDTO(in);
        }

        @Override
        public ClaimHistoryDTO[] newArray(int size) {
            return new ClaimHistoryDTO[size];
        }
    };


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(employeeDTO, flags);
        dest.writeTypedList(dependentDTO);
        dest.writeParcelable(policyDetailsDTO, flags);
        dest.writeParcelable(benefitsDTO, flags);
        dest.writeParcelable(sheBalanceDTO, flags);
        dest.writeTypedList(pendingClaimsDTO);
        dest.writeTypedList(previousClaimsDTO);
        dest.writeString(FeedBack);
    }
}

她平衡到

public class SHEBalanceDTO implements Parcelable {


    public SHEBalanceDTO() {

    }

    protected SHEBalanceDTO(Parcel in) {
        FromDate = in.readString();
        ToDate = in.readString();
        GeneralHospitalDays = in.readString();
        PrivateHospitalDays = in.readString();
        ICUDays = in.readString();
        Indoor1 = in.readString();
        Indoor2 = in.readString();
        Indoor3 = in.readString();
        Indoor4 = in.readString();
        Indoor5 = in.readString();
        Indoor6 = in.readString();
        Indoor34 = in.readString();
        Indoor2346 = in.readString();
        Indoor23456 = in.readString();
        Indoor123456 = in.readString();
        IndoorEXT1 = in.readString();
        IndoorEXT2 = in.readString();
        Dental = in.readString();
        NormalBirth = in.readString();
        TwinBirth = in.readString();
        Spectacles = in.readString();
        Lens = in.readString();
        CriticalIllness = in.readString();
        Other = in.readString();
        TotalPaidClaimAmount = in.readString();
        AuredictCover = in.readString();
        AvailableBalance = in.readString();
    }

    public static final Creator<SHEBalanceDTO> CREATOR = new Creator<SHEBalanceDTO>() {
        @Override
        public SHEBalanceDTO createFromParcel(Parcel in) {
            return new SHEBalanceDTO(in);
        }

        @Override
        public SHEBalanceDTO[] newArray(int size) {
            return new SHEBalanceDTO[size];
        }
    };

public void setFromDate(String fromDate) {
    FromDate = fromDate;
}

public String getFromDate() {
    return FromDate;
}

public void setToDate(String toDate) {
    ToDate = toDate;
}

public String getToDate() {
    return ToDate;
}

public String getGeneralHospitalDays() {
    return GeneralHospitalDays;
}

public void setGeneralHospitalDays(String generalHospitalDays) {
    GeneralHospitalDays = generalHospitalDays;
}

public String getPrivateHospitalDays() {
    return PrivateHospitalDays;
}

public void setPrivateHospitalDays(String privateHospitalDays) {
    PrivateHospitalDays = privateHospitalDays;
}

public String getICUDays() {
    return ICUDays;
}

public void setICUDays(String iCUDays) {
    ICUDays = iCUDays;
}

public String getIndoor1() {
    return Indoor1;
}

public void setIndoor1(String indoor1) {
    Indoor1 = indoor1;
}

public String getIndoor2() {
    return Indoor2;
}

public void setIndoor2(String indoor2) {
    Indoor2 = indoor2;
}

public String getIndoor3() {
    return Indoor3;
}

public void setIndoor3(String indoor3) {
    Indoor3 = indoor3;
}

public String getIndoor4() {
    return Indoor4;
}

public void setIndoor4(String indoor4) {
    Indoor4 = indoor4;
}

public String getIndoor5() {
    return Indoor5;
}

public void setIndoor5(String indoor5) {
    Indoor5 = indoor5;
}

public String getIndoor6() {
    return Indoor6;
}

public void setIndoor6(String indoor6) {
    Indoor6 = indoor6;
}

public String getIndoor34() {
    return Indoor34;
}

public void setIndoor34(String indoor34) {
    Indoor34 = indoor34;
}

public String getIndoor2346() {
    return Indoor2346;
}

public void setIndoor2346(String indoor2346) {
    Indoor2346 = indoor2346;
}

public String getIndoor23456() {
    return Indoor23456;
}

public void setIndoor23456(String indoor23456) {
    Indoor23456 = indoor23456;
}

public String getIndoor123456() {
    return Indoor123456;
}

public void setIndoor123456(String indoor123456) {
    Indoor123456 = indoor123456;
}

public String getIndoorEXT1() {
    return IndoorEXT1;
}

public void setIndoorEXT1(String indoorEXT1) {
    IndoorEXT1 = indoorEXT1;
}

public String getIndoorEXT2() {
    return IndoorEXT2;
}

public void setIndoorEXT2(String indoorEXT2) {
    IndoorEXT2 = indoorEXT2;
}

public String getDental() {
    return Dental;
}

public void setDental(String dental) {
    Dental = dental;
}

public String getNormalBirth() {
    return NormalBirth;
}

public void setNormalBirth(String normalBirth) {
    NormalBirth = normalBirth;
}

public String getTwinBirth() {
    return TwinBirth;
}

public void setTwinBirth(String twinBirth) {
    TwinBirth = twinBirth;
}

public String getSpectacles() {
    return Spectacles;
}

public void setSpectacles(String spectacles) {
    Spectacles = spectacles;
}

public String getLens() {
    return Lens;
}

public void setLens(String lens) {
    Lens = lens;
}

public String getCriticalIllness() {
    return CriticalIllness;
}

public void setCriticalIllness(String criticalIllness) {
    CriticalIllness = criticalIllness;
}

public String getOther() {
    return Other;
}

public void setOther(String other) {
    Other = other;
}

public String getTotalPaidClaimAmount() {
    return TotalPaidClaimAmount;
}

public void setTotalPaidClaimAmount(String totalPaidClaimAmount) {
    TotalPaidClaimAmount = totalPaidClaimAmount;
}

public String getAuredictCover() {
    return AuredictCover;
}

public void setAuredictCover(String auredictCover) {
    AuredictCover = auredictCover;
}

public String getAvailableBalance() {
    return AvailableBalance;
}

public void setAvailableBalance(String availableBalance) {
    AvailableBalance = availableBalance;
}

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(FromDate);
        dest.writeString(ToDate);
        dest.writeString(GeneralHospitalDays);
        dest.writeString(PrivateHospitalDays);
        dest.writeString(ICUDays);
        dest.writeString(Indoor1);
        dest.writeString(Indoor2);
        dest.writeString(Indoor3);
        dest.writeString(Indoor4);
        dest.writeString(Indoor5);
        dest.writeString(Indoor6);
        dest.writeString(Indoor34);
        dest.writeString(Indoor2346);
        dest.writeString(Indoor23456);
        dest.writeString(Indoor123456);
        dest.writeString(IndoorEXT1);
        dest.writeString(IndoorEXT2);
        dest.writeString(Dental);
        dest.writeString(NormalBirth);
        dest.writeString(TwinBirth);
        dest.writeString(Spectacles);
        dest.writeString(Lens);
        dest.writeString(CriticalIllness);
        dest.writeString(Other);
        dest.writeString(TotalPaidClaimAmount);
        dest.writeString(AuredictCover);
        dest.writeString(AvailableBalance);
    }
}

类别claimhistoryfirstpage

public class claimhistoryfirstpage extends Activity {

    static int track = 0;
    TextView tvDNAME;
    TextView tvDREL;
    TextView tvDBDY;
    TextView tvDEFFDATE;
    ArrayList<DependentDTO> arr_dependent;
    ClaimHistoryDTO claimHistoryDTO;
    SHEBalanceDTO sheBalanceDTO;
    ImageButton imgbtn1;
    ImageButton imgbtn2;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.claimhistoryfirstpage);

        //claimHistoryDTO=(ClaimHistoryDTO)getIntent().getParcelableExtra("ClaimHistoryDTO");
        claimHistoryDTO = GlobalVar.getInstance().getClaimHistoryDTO();
        Log.v("EE>>>>>", claimHistoryDTO.getEmployeeDTO().getEmployeeNumber());

        Button btnMain = (Button) findViewById(R.id.btnMenu);
        btnMain.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                    /*Toast toasterror = Toast.makeText(getApplicationContext(),"T A D A!!!!!!!!!!!", Toast.LENGTH_SHORT);
                   toasterror.show();*/
                finish();
                Intent i = new Intent(claimhistoryfirstpage.this, firstpage.class);
                startActivity(i);

            }
        });

        Button btnExit = (Button) findViewById(R.id.btnExit);
        btnExit.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View arg0) {

                PopIt("Exit Application", "Are you sure you want to exit?");

            }
        });

        Button btnNext = (Button) findViewById(R.id.btnNext);
        btnNext.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                Log.v("inside onclick>>>>>", claimHistoryDTO.getEmployeeDTO().getEmployeeNumber());


                Intent i = new Intent(claimhistoryfirstpage.this, claimhistorysecpage.class);
                startActivity(i);
            }

        });

        Button btnBack = (Button) findViewById(R.id.btnBack);
        btnBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            /*Toast toasterror = Toast.makeText(getApplicationContext(),"T A D A!!!!!!!!!!!", Toast.LENGTH_SHORT);
              toasterror.show();*/
                finish();

            }
        });
        //   EmployeeDTO employeeDTO=(EmployeeDTO)getIntent().getSerializableExtra("EmployeeDTO");

        EmployeeDTO employeeDTO = claimHistoryDTO.getEmployeeDTO();
        arr_dependent = claimHistoryDTO.getDependentDTO();
        PolicyDetailsDTO policyDetailsDTO = claimHistoryDTO.getPolicyDetailsDTO();

          /*  Log.v("year limit",employeeDTO.getYearLimit(), null);
            arr_dependent =  getIntent().getParcelableArrayListExtra("arr_dependent");
            PolicyDetailsDTO policyDetailsDTO=(PolicyDetailsDTO)getIntent().getSerializableExtra("PolicyDetailsDTO");*/

        //---Setting the Employee Details---
        TextView tvEMP_NUM = (TextView) findViewById(R.id.tvEMP_NUM);
        TextView tvEMP_MEMNAME = (TextView) findViewById(R.id.tvEMP_MEMNAME);
        TextView tvEMP_POLNUM = (TextView) findViewById(R.id.tvEMP_POLNUM);
        TextView tvEMP_CAT = (TextView) findViewById(R.id.tvEMP_CAT);
        TextView tvEMP_DOB = (TextView) findViewById(R.id.tvEMP_DOB);
        TextView tvEMP_YEARLIMIT = (TextView) findViewById(R.id.tvEMP_YEARLIMIT);
        TextView tvEMP_EVENTLIMIT = (TextView) findViewById(R.id.tvEMP_EVENTLIMIT);
        TextView tvEMP_TOTPREM = (TextView) findViewById(R.id.tvEMP_TOTPREM);
        TextView tvEMP_RECPREM = (TextView) findViewById(R.id.tvEMP_RECPREM);
        TextView tvEMP_BALPREM = (TextView) findViewById(R.id.tvEMP_BALPREM);

        tvEMP_NUM.setText(employeeDTO.getEmployeeNumber().toString());
        tvEMP_MEMNAME.setText(employeeDTO.getMemberName().toString());
        tvEMP_POLNUM.setText(employeeDTO.getPolicyNumber().toString());
        tvEMP_CAT.setText(employeeDTO.getEmployeeCategory().toString());
        tvEMP_DOB.setText(employeeDTO.getDateOfBirth().toString());
        tvEMP_YEARLIMIT.setText(employeeDTO.getYearLimit());
        tvEMP_EVENTLIMIT.setText(employeeDTO.getEventLimit());

        tvEMP_TOTPREM.setText(employeeDTO.getTotalPremium());
        tvEMP_RECPREM.setText(employeeDTO.getReceivalblePremium());
        tvEMP_BALPREM.setText(employeeDTO.getBalancePremium());

        //----End of Setting Employee Details---

        //----Setting the First Depenedent--------
        tvDNAME = (TextView) findViewById(R.id.tvDNAME);
        tvDREL = (TextView) findViewById(R.id.tvDREL);
        tvDBDY = (TextView) findViewById(R.id.tvDBDY);
        tvDEFFDATE = (TextView) findViewById(R.id.tvDEFFDATE);

        if (arr_dependent.size() > 0) {
            tvDNAME.setText(arr_dependent.get(0).getDependentName());
            tvDREL.setText(arr_dependent.get(0).getRelationship());
            tvDBDY.setText(arr_dependent.get(0).getDependentBirthday());
            tvDEFFDATE.setText(arr_dependent.get(0).getDependentEffectiveDate());
            // End of Setting the first dependent

            imgbtn1 = (ImageButton) findViewById(R.id.imageButton1);
            imgbtn1.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    if (track == 0) {
                        track = 0;
                        // imgbtn1.setEnabled(false);

                    } else {
                        //imgbtn1.setEnabled(true);
                        track = track - 1;
                        setDependentDetails(track);
                    }

                }
            });

            imgbtn2 = (ImageButton) findViewById(R.id.imageButton2);
            imgbtn2.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {

                    int size = arr_dependent.size() - 1;

                    if (track == size) {
                        //imgbtn2.setEnabled(false);
                        track = size;
                    } else {
                        //imgbtn1.setEnabled(true);
                        track = track + 1;
                        setDependentDetails(track);
                    }

                }
            });
        } else {
            tvDNAME.setText("");
            tvDREL.setText("");
            tvDBDY.setText("");
            tvDEFFDATE.setText("");
        }

        //Setting the policy details
        TextView tvPOL_POLNUM = (TextView) findViewById(R.id.tvPOL_POLNUM);
        TextView tvPOL_COMPANY = (TextView) findViewById(R.id.tvPOL_COMPANY);
        TextView tvPOL_RENEWALDATE = (TextView) findViewById(R.id.tvPOL_RENEWALDATE);
        TextView tvPOL_EFFDATE = (TextView) findViewById(R.id.tvPOL_EFFDATE);
        TextView tvPOL_DEBITNOTENO = (TextView) findViewById(R.id.tvPOL_DEBITNOTENO);

        TextView tvPOL_CILIMIT = (TextView) findViewById(R.id.tvPOL_CILIMIT);
        TextView tvPOL_CIEMPLIMIT = (TextView) findViewById(R.id.tvPOL_CIEMPLIMIT);
        TextView tvPOL_PERIOD = (TextView) findViewById(R.id.tvPOL_PERIOD);
        TextView tvPOL_CIDES1 = (TextView) findViewById(R.id.tvPOL_CIDES1);
        TextView tvPOL_CIDES2 = (TextView) findViewById(R.id.tvPOL_CIDES2);
        TextView tvPOL_CIDES3 = (TextView) findViewById(R.id.tvPOL_CIDES3);

        TextView tvPOL_CIDES4 = (TextView) findViewById(R.id.tvPOL_CIDES4);
        TextView tvPOL_OTHERBENEFITS = (TextView) findViewById(R.id.tvPOL_OTHERBENEFITS);
        TextView tvPOL_INDOORMED = (TextView) findViewById(R.id.tvPOL_INDOORMED);
        TextView tvPOL_INDOORCATDES = (TextView) findViewById(R.id.tvPOL_INDOORCATDES);
        TextView tvPOL_INDOORCAT = (TextView) findViewById(R.id.tvPOL_INDOORCAT);

        TextView tvPOL_OUTDOORMED = (TextView) findViewById(R.id.tvPOL_OUTDOORMED);
        TextView tvPOL_OUTDOORCAT = (TextView) findViewById(R.id.tvPOL_OUTDOORCAT);
        TextView tvPOL_OUTDOORCATDES = (TextView) findViewById(R.id.tvPOL_OUTDOORCATDES);
        TextView tvPOL_EXCESS = (TextView) findViewById(R.id.tvPOL_EXCESS);
        TextView tvPOL_REMARK = (TextView) findViewById(R.id.tvPOL_REMARK);


        if (policyDetailsDTO != null) {
            Log.v("POLICY DETAILS", policyDetailsDTO.getPolicyNumber(), null);

            tvPOL_POLNUM.setText(policyDetailsDTO.getPolicyNumber());
            tvPOL_COMPANY.setText(policyDetailsDTO.getCompanyName());
            tvPOL_RENEWALDATE.setText(policyDetailsDTO.getRenewalDate());
            tvPOL_EFFDATE.setText(policyDetailsDTO.getEffectiveDate());
            tvPOL_DEBITNOTENO.setText(policyDetailsDTO.getDebitNoteNumber());
            tvPOL_CILIMIT.setText(policyDetailsDTO.getCicLimit());
            tvPOL_CIEMPLIMIT.setText(policyDetailsDTO.getCicEmployeeLimit());
            tvPOL_PERIOD.setText(policyDetailsDTO.getPeriod());
            tvPOL_CIDES1.setText(policyDetailsDTO.getCicDescription1());
            tvPOL_CIDES2.setText(policyDetailsDTO.getCicDescription2());
            tvPOL_CIDES3.setText(policyDetailsDTO.getCicDescription3());
            tvPOL_CIDES4.setText(policyDetailsDTO.getCicDescription4());
            tvPOL_OTHERBENEFITS.setText(policyDetailsDTO.getOtherBenefits());
            tvPOL_INDOORMED.setText(policyDetailsDTO.getIndoorMedicine());
            tvPOL_INDOORCATDES.setText(policyDetailsDTO.getIndoorCategoryDescription());
            tvPOL_INDOORCAT.setText(policyDetailsDTO.getIndoorCategory());
            tvPOL_OUTDOORMED.setText(policyDetailsDTO.getOutdoorMedicine());
            tvPOL_OUTDOORCAT.setText(policyDetailsDTO.getOutdoorCategory());
            tvPOL_OUTDOORCATDES.setText(policyDetailsDTO.getOutdoorCategoryDescription());
            tvPOL_EXCESS.setText(policyDetailsDTO.getExcess());
            tvPOL_REMARK.setText(policyDetailsDTO.getRemarks());

        } else {
            Log.v("POLICY DETAILS", "policy details dto is null", null);
        }

        //End of setting policy details

    }

    public void setDependentDetails(int val) {
        tvDNAME.setText(arr_dependent.get(val).getDependentName());
        tvDREL.setText(arr_dependent.get(val).getRelationship());
        tvDBDY.setText(arr_dependent.get(val).getDependentBirthday());
        tvDEFFDATE.setText(arr_dependent.get(val).getDependentEffectiveDate());
    }

    @Override
    public void onBackPressed() {
        moveTaskToBack(true);
        finish();
    }

    public void PopIt(String title, String message) {
        new AlertDialog.Builder(this)
                .setTitle(title)
                .setMessage(message)
                .setPositiveButton("YES", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface arg0, int arg1) {
                        //do stuff onclick of YES

                        DELETEsms deletesms = new DELETEsms();
                        deletesms.deleteSMS(getApplicationContext(), "SLIC");
                        Intent startMain = new Intent(Intent.ACTION_MAIN);
                        startMain.addCategory(Intent.CATEGORY_HOME);
                        startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        //startMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                        startActivity(startMain);

                        finish();
                        System.exit(0);

                    }
                })
                .setNegativeButton("NO", new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface arg0, int arg1) {
                        //do stuff onclick of CANCEL
                        Toast.makeText(getBaseContext(), "You touched CANCEL", Toast.LENGTH_SHORT).show();
                    }
                }).show();
    }

}

共 (0) 个答案