// Path: advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/V3/LayoutAsset.java
// @Deprecated
// public enum LayoutAsset {
//     classic_1(R.layout.material_search_ios_classic),
//     classic_2(R.layout.material_search_ios),
//     classic_3(R.layout.material_search_ios_simple),
//     //button title/logo button button
//     i_logo_ii(R.layout.i_t_ii),
//     //button title/logo button dynamic_button
//     i_logo_ir(R.layout.i_t_ir),
//     //title/logo button dynamic_button
//     i_logo_ir2(R.layout.i_t_ir2),
//     material(R.layout.search_material);
// 
//     private final int id;
// 
//     LayoutAsset(int id) {
//         this.id = id;
//     }
// 
//     public int getResourceId() {
//         return id;
//     }
// }


import android.content.Context;
import android.content.res.Resources;
import android.support.annotation.LayoutRes;
import android.support.v7.widget.Toolbar;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.hkm.advancedtoolbar.V3.LayoutAsset;
package com.hkm.advancedtoolbar;



/**
 * Created by hesk on 17/7/15.
 */
public class ToolbarHelper {
    public static View generateView(final @LayoutRes int layout, Context ctx) {
        return LayoutInflater.from(ctx).inflate(layout, null);
    }

// Path: advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/V3/LayoutAsset.java
// @Deprecated
// public enum LayoutAsset {
//     classic_1(R.layout.material_search_ios_classic),
//     classic_2(R.layout.material_search_ios),
//     classic_3(R.layout.material_search_ios_simple),
//     //button title/logo button button
//     i_logo_ii(R.layout.i_t_ii),
//     //button title/logo button dynamic_button
//     i_logo_ir(R.layout.i_t_ir),
//     //title/logo button dynamic_button
//     i_logo_ir2(R.layout.i_t_ir2),
//     material(R.layout.search_material);
// 
//     private final int id;
// 
//     LayoutAsset(int id) {
//         this.id = id;
//     }
// 
//     public int getResourceId() {
//         return id;
//     }
// }


// Path: advancedtoolbar/src/main/java/com/hkm/advancedtoolbar/ToolbarHelper.java
import android.content.Context;
import android.content.res.Resources;
import android.support.annotation.LayoutRes;
import android.support.v7.widget.Toolbar;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.hkm.advancedtoolbar.V3.LayoutAsset;

package com.hkm.advancedtoolbar;



/**
 * Created by hesk on 17/7/15.
 */
public class ToolbarHelper {
    public static View generateView(final @LayoutRes int layout, Context ctx) {
        return LayoutInflater.from(ctx).inflate(layout, null);
    }

    public static View renewView(Context activity, Toolbar toolbar, LayoutAsset layoutId) {