private void obtainStyledAttributes(@Nullable final AttributeSet attributeSet,
                                        @AttrRes final int defaultStyle,
                                        @StyleRes final int defaultStyleResource) {
        TypedArray typedArray = getContext()
                .obtainStyledAttributes(attributeSet, R.styleable.ElevationShadowView, defaultStyle,
                        defaultStyleResource);

        try {
            obtainShadowElevation(typedArray);
            obtainShadowOrientation(typedArray);
            obtainEmulateParallelLight(typedArray);
        } finally {
            typedArray.recycle();
        }
    }
private void obtainStyledAttributes ( @ Nullable final AttributeSet attributeSet , @ AttrRes final int defaultStyle , @ StyleRes final int defaultStyleResource ) { TypedArray typedArray = getContext ( ) . obtainStyledAttributes ( attributeSet , R . styleable . ElevationShadowView , defaultStyle , defaultStyleResource ) ; try { obtainShadowElevation ( typedArray ) ; obtainShadowOrientation ( typedArray ) ; obtainEmulateParallelLight ( typedArray ) ; } finally { typedArray . recycle ( ) ; } }
Obtains the view's attributes from a specific attribute set.

@param attributeSet
The attribute set, the view's attributes should be obtained from, as an instance of
the type {@link AttributeSet} or null, if no attributes should be obtained
@param defaultStyle
The default style to apply to this view. If 0, no style will be applied (beyond what
is included in the theme). This may either be an attribute resource, whose value will
be retrieved from the current theme, or an explicit style resource
@param defaultStyleResource
A resource identifier of a style resource that supplies default values for the view,
used only if the default style is 0 or can not be found in the theme. Can be 0 to not
look for defaults