Some of the TextViews in my ListView are affected by the Strike-Through effect wherein only those with "Discounted Price" should be the ones With Strike-Through effect.The TextView of the Original Price is Different from the TextView of the Discounted Price.
Here is my code:
if(data.getDisc_price().equals("0")){
holder.textDiscPrice.setVisibility(View.INVISIBLE);
}
else{
holder.textPrice.setPaintFlags(holder.textPrice.getPaintFlags()| Paint.STRIKE_THRU_TEXT_FLAG);
holder.textDiscPrice.setText("Less " +data.getDisc_price()+"%" + " Php "+formatter.format(
(Double.parseDouble(data.getPrice())
-(Double.parseDouble(data.getPrice())*(Double.parseDouble(data.getDisc_price())/100)))));
What causes the bug? Any Ideas?