Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between context.getTheme.obtainStyledAttributes and context.obtainStyledAttributes in View Class

What is the difference between context.getTheme.obtainStyledAttributes() and context.obtainStyledAttributes()?

Is Theme is my app style?

like image 978
Siamak0449 Avatar asked Sep 13 '25 12:09

Siamak0449


1 Answers

It 's the same.

in 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);
}
like image 153
DragonLayout Avatar answered Sep 16 '25 01:09

DragonLayout