package com.shunzhi.parent.util; import android.app.Activity; import android.content.res.TypedArray; import android.util.TypedValue; /** * Created by ToaHanDong on 2018/3/14. */ public class AttrsUtils { public static TypedArray getAttrs(Activity activity){ TypedValue typedValue=new TypedValue(); activity.getTheme().resolveAttribute(android.R.attr.selectableItemBackground,typedValue,true); int[] sttrides=new int[]{android.R.attr.selectableItemBackground}; TypedArray typedArray=activity.getTheme().obtainStyledAttributes(sttrides); return typedArray; } }