private void updatePinProgressContentDescription ( ProgressButton button ) { int progress = button . getProgress ( ) ; if ( progress <= 0 ) { button . setContentDescription ( getString ( button . isChecked ( ) ? R . string . content_desc_pinned_not_downloaded : R . string . content_desc_unpinned_not_downloaded ) ) ; } else if ( progress >= button . getMax ( ) ) { button . setContentDescription ( getString ( button . isChecked ( ) ? R . string . content_desc_pinned_downloaded : R . string . content_desc_unpinned_downloaded ) ) ; } else { button . setContentDescription ( getString ( button . isChecked ( ) ? R . string . content_desc_pinned_downloading : R . string . content_desc_unpinned_downloading ) ) ; } }
Helper method to update the progressButton s content description .