package com.dongnao.skindavid;

import android.app.Activity;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.support.v4.view.LayoutInflaterCompat;

/**
 * Created by Administrator on 2018/2/8 0008.
 */

public class BaseActivity  extends Activity {
    SkinFactory skinFactory;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        skinFactory = new SkinFactory();
        LayoutInflaterCompat.setFactory(getLayoutInflater(),skinFactory);

    }

    public  void changeSkin(){
        skinFactory.apply();
    }
}
