View.get中的context.getTheme.obtainStyledAttributes和context.obtainStyledAttributes之间的区别

Sia*_*449 3 android difference

context.getTheme.obtainStyledAttributes() 和之间有什么区别context.obtainStyledAttributes()

主题是我的应用程序风格?

小智 6

一样的.

在Context.java中

 /**
 * Retrieve styled attribute information in this Context's theme.  See
 * {@link android.content.res.Resources.Theme#obtainStyledAttributes(int[])}
 * for more information.
 *
 * @see android.content.res.Resources.Theme#obtainStyledAttributes(int[])
 */
public final TypedArray obtainStyledAttributes(@StyleableRes int[] attrs) {
    return getTheme().obtainStyledAttributes(attrs);
}
Run Code Online (Sandbox Code Playgroud)