Skip to content

Commit

Permalink
Fix issue jpardogo#54
Browse files Browse the repository at this point in the history
  • Loading branch information
jpardogo committed Jan 14, 2015
1 parent ea64507 commit eb09e19
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions library/src/com/astuetz/PagerSlidingTabStrip.java
Original file line number Diff line number Diff line change
Expand Up @@ -503,18 +503,22 @@ private void updateSelection(int position) {
}

private void notSelected(View tab) {
TextView title = (TextView) tab.findViewById(R.id.tab_title);
if (title != null) {
title.setTypeface(tabTypeface, tabTypefaceStyle);
ViewCompat.setAlpha(title, tabTextAlpha);
if (tab != null) {
TextView title = (TextView) tab.findViewById(R.id.tab_title);
if (title != null) {
title.setTypeface(tabTypeface, tabTypefaceStyle);
ViewCompat.setAlpha(title, tabTextAlpha);
}
}
}

private void selected(View tab) {
TextView title = (TextView) tab.findViewById(R.id.tab_title);
if (title != null) {
title.setTypeface(tabTypeface, tabTypefaceSelectedStyle);
ViewCompat.setAlpha(title, tabTextSelectedAlpha);
if (tab != null) {
TextView title = (TextView) tab.findViewById(R.id.tab_title);
if (title != null) {
title.setTypeface(tabTypeface, tabTypefaceSelectedStyle);
ViewCompat.setAlpha(title, tabTextSelectedAlpha);
}
}
}

Expand Down

0 comments on commit eb09e19

Please sign in to comment.