RoyceNguyen / BuildCalculator

0 stars 0 forks source link

Click to show less not working #24

Open RoyceNguyen opened 7 years ago

RoyceNguyen commented 7 years ago

if(build.getText() != (buildslist.get(position)).getName()){ //update the text of build build.setText(((Build) list.getItemAtPosition(position)).getName()); if (wep != null) { build.setText(wep.getName()); } gearChoice.setText(((Build) list.getItemAtPosition(position)).getName()); if (gear != null) { gearChoice.setText(gear.getName()); } //update the text of the show more details.setText("Click to show less"); //update the chevron image chevron.setImageResource(R.drawable.ic_expand_less_black_24dp);

            }
            else{

                build.setText(" ");
                gearChoice.setText(" ");
                details.setText("Click to show more");
                //update the chevron image
                chevron.setImageResource(R.drawable.ic_expand_more_black_24dp);
            }`  

Heres the code for our listview to show the cards more or less . ive tried multiple ways like doing build.setText(((Build) list.getItemAtPosition(position)).setName(".")) ; or build.setText(wep.setName(" ")); (void type not allowed) or gearChoice.setText(((Build) list.getItemAtPosition(0)).getName()); in order to try and change the textview into an empty string or give it an empty value to be shown . Showing more is working fine and is showing both gear and weapon names . @cfiliault @Blazeblackbird Click to show more is empty at the start before you click on it so i dont know if theres a way you can "reset" a card to its previous state to make it empty instead of trying to give it a null value .

screenshot_1492888769