Merge pull request #45 from TouchInstinct/static_fix

no message
This commit is contained in:
Gavriil 2017-02-16 20:07:11 +03:00 committed by GitHub
commit 80b8ad0eaa
2 changed files with 5 additions and 5 deletions

View File

@ -101,10 +101,10 @@ public class AspectRatioFrameLayout extends FrameLayout {
wrapToContent = false;
aspectRatio = DEFAULT_ASPECT_RATIO;
} else {
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AspectRatioFrameLayout);
wrapToContent = a.getBoolean(R.styleable.AspectRatioFrameLayout_wrapToContent, false);
aspectRatio = a.getFloat(R.styleable.AspectRatioFrameLayout_aspectRatio, DEFAULT_ASPECT_RATIO);
a.recycle();
final TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.AspectRatioFrameLayout);
wrapToContent = typedArray.getBoolean(R.styleable.AspectRatioFrameLayout_wrapToContent, false);
aspectRatio = typedArray.getFloat(R.styleable.AspectRatioFrameLayout_aspectRatio, DEFAULT_ASPECT_RATIO);
typedArray.recycle();
}
}

View File

@ -131,7 +131,7 @@ public final class AttributesUtils {
final int result = typedArray.getInt(AttributesUtils.getField(androidRes, "TextView_maxLines"), Integer.MAX_VALUE);
typedArray.recycle();
return result;
} catch (Exception e) {
} catch (final Exception exception) {
return Integer.MAX_VALUE;
}
}