mangstadt / ez-vcard

A vCard parser library for Java
Other
399 stars 92 forks source link

doesn't show all contacts #95

Closed hithamHL closed 4 years ago

hithamHL commented 5 years ago

Hi mangstadt i want to open and show vcard file in a listview but when do that the method all() only show one contact

List<VCard> vcards = Ezvcard.parse(file).all();

                    int Vsize=vcards.size();

                        for (VCard vcard : vcards) {
                            //  System.out.println("Name: " + vcard.getFormattedName().getValue());
                            for (int i = 0; i<=Vsize; i++){

                                 contactName = vcard.getFormattedName().getValue()+":" +String.valueOf(i) ;
                                list_vcard.contact_name_Vcard = contactName;

                                // System.out.println("Telephone numbers:");
                                for (Telephone tel : vcard.getTelephoneNumbers()) {
                                    // System.out.println(tel.getTypes() + ": " + tel.getText());
                                     contatNumber = tel.getText();
                                    list_vcard.contact_number_Vcard = contatNumber;
                                }

                                vcardArrayList.add(list_vcard);

                            }
                        }
mangstadt commented 5 years ago

Please post the contents of the vCard file.