Commit 1a95364a authored by Edward Wang's avatar Edward Wang
Browse files

HeaderScrollView: don't get attrs unnecessarily

parent 27d001b5
/*****************************************************************************
* AudioBrowserActivity.java
* HeaderScrollView.java
*****************************************************************************
* Copyright © 2011-2013 VLC authors and VideoLAN
* Copyright © 2011-2014 VLC authors and VideoLAN
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -91,9 +91,10 @@ public class HeaderScrollView extends HorizontalScrollView {
public void highlightTab(int existingPosition, int newPosition) {
LinearLayout hl = (LinearLayout) findViewById(R.id.header_layout);
TypedArray attrs = getContext().obtainStyledAttributes(new int[] { R.attr.font_light, R.attr.font_default});
if (hl == null)
return;
TypedArray attrs = getContext().obtainStyledAttributes(new int[] { R.attr.font_light, R.attr.font_default});
TextView oldView = (TextView) hl.getChildAt(existingPosition);
if (oldView != null)
oldView.setTextColor(attrs.getColor(0, 0));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment