Code example for ContextThemeWrapper

Methods: from

0
        customPanelView.addView(listView);
        addView(customPanelView);
    } 
 
    private View inflateView(Context context, ViewGroup parent, int layoutId, int styleId) {
        final LayoutInflater inflater = LayoutInflater.from(new ContextThemeWrapper(context, styleId));
        return inflater.inflate(layoutId, parent, false);
    } 
 
    private ViewGroup inflateViewGroup(Context context, int layoutId) {
        final LayoutInflater inflater = LayoutInflater.from(context);
        return (ViewGroup) inflater.inflate(layoutId, this, false);
    } 
 
    private ViewGroup inflateViewGroup(Context context, ViewGroup parent, int layoutId, int styleId) {
        return (ViewGroup) inflateView(context, parent, layoutId, styleId);
    } 
 
    private TextView inflateTextView(Context context, ViewGroup parent, int layoutId, int styleId, Spannable text) {
        final TextView titleView = (TextView) inflateView(context, parent, layoutId, styleId);
Connect your IDE to all the code out there  Get Codota for Java