SubtitleCoordinatorLayoutExample icon indicating copy to clipboard operation
SubtitleCoordinatorLayoutExample copied to clipboard

Suggestion: handle HeaderView.hideOrSetText better

Open AndroidDeveloperLB opened this issue 10 years ago • 0 comments

If called multiple times, it could stay hidden. I suggest changing to :

private void hideOrSetText(TextView tv, String text) {
    if (text == null || text.equals(""))
        tv.setVisibility(GONE);
    else {
        tv.setText(text);
        tv.setVisibility(VISIBLE);
    }
}

AndroidDeveloperLB avatar Nov 09 '15 10:11 AndroidDeveloperLB