Java Code Examples for com.zhy.autolayout.utils.L#e()

The following examples show how to use com.zhy.autolayout.utils.L#e() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AutoLayoutConifg.java    From AutoLayout with Apache License 2.0 6 votes vote down vote up
private void getMetaData(Context context)
{
    PackageManager packageManager = context.getPackageManager();
    ApplicationInfo applicationInfo;
    try
    {
        applicationInfo = packageManager.getApplicationInfo(context
                .getPackageName(), PackageManager.GET_META_DATA);
        if (applicationInfo != null && applicationInfo.metaData != null)
        {
            mDesignWidth = (int) applicationInfo.metaData.get(KEY_DESIGN_WIDTH);
            mDesignHeight = (int) applicationInfo.metaData.get(KEY_DESIGN_HEIGHT);
        }
    } catch (PackageManager.NameNotFoundException e)
    {
        throw new RuntimeException(
                "you must set " + KEY_DESIGN_WIDTH + " and " + KEY_DESIGN_HEIGHT + "  in your manifest file.", e);
    }

    L.e(" designWidth =" + mDesignWidth + " , designHeight = " + mDesignHeight);
}
 
Example 2
Source File: AutoLayoutConifg.java    From AndroidAutoLayout with Apache License 2.0 6 votes vote down vote up
private void getMetaData(Context context)
{
    PackageManager packageManager = context.getPackageManager();
    ApplicationInfo applicationInfo;
    try
    {
        applicationInfo = packageManager.getApplicationInfo(context
                .getPackageName(), PackageManager.GET_META_DATA);
        if (applicationInfo != null && applicationInfo.metaData != null)
        {
            mDesignWidth = (int) applicationInfo.metaData.get(KEY_DESIGN_WIDTH);
            mDesignHeight = (int) applicationInfo.metaData.get(KEY_DESIGN_HEIGHT);
        }
    } catch (PackageManager.NameNotFoundException e)
    {
        throw new RuntimeException(
                "you must set " + KEY_DESIGN_WIDTH + " and " + KEY_DESIGN_HEIGHT + "  in your manifest file.", e);
    }

    L.e(" designWidth =" + mDesignWidth + " , designHeight = " + mDesignHeight);
}
 
Example 3
Source File: AutoAttr.java    From AutoLayout with Apache License 2.0 5 votes vote down vote up
public void apply(View view)
{

    boolean log = view.getTag() != null && view.getTag().toString().equals("auto");

    if (log)
    {
        L.e(" pxVal = " + pxVal + " ," + this.getClass().getSimpleName());
    }
    int val;
    if (useDefault())
    {
        val = defaultBaseWidth() ? getPercentWidthSize() : getPercentHeightSize();
        if (log)
        {
            L.e(" useDefault val= " + val);
        }
    } else if (baseWidth())
    {
        val = getPercentWidthSize();
        if (log)
        {
            L.e(" baseWidth val= " + val);
        }
    } else
    {
        val = getPercentHeightSize();
        if (log)
        {
            L.e(" baseHeight val= " + val);
        }
    }

    val = Math.max(val, 1);//for very thin divider
    execute(view, val);
}
 
Example 4
Source File: AutoLayoutConifg.java    From AutoLayout with Apache License 2.0 5 votes vote down vote up
public void init(Context context)
{
    getMetaData(context);

    int[] screenSize = ScreenUtils.getScreenSize(context, useDeviceSize);
    mScreenWidth = screenSize[0];
    mScreenHeight = screenSize[1];
    L.e(" screenWidth =" + mScreenWidth + " ,screenHeight = " + mScreenHeight);
}
 
Example 5
Source File: AutoAttr.java    From AndroidAutoLayout with Apache License 2.0 5 votes vote down vote up
public void apply(View view)
{

    boolean log = view.getTag() != null && view.getTag().toString().equals("auto");

    if (log)
    {
        L.e(" pxVal = " + pxVal + " ," + this.getClass().getSimpleName());
    }
    int val;
    if (useDefault())
    {
        val = defaultBaseWidth() ? getPercentWidthSize() : getPercentHeightSize();
        if (log)
        {
            L.e(" useDefault val= " + val);
        }
    } else if (baseWidth())
    {
        val = getPercentWidthSize();
        if (log)
        {
            L.e(" baseWidth val= " + val);
        }
    } else
    {
        val = getPercentHeightSize();
        if (log)
        {
            L.e(" baseHeight val= " + val);
        }
    }

    if (val > 0)
        val = Math.max(val, 1);//for very thin divider
    execute(view, val);
}
 
Example 6
Source File: AutoLayoutConifg.java    From AndroidAutoLayout with Apache License 2.0 5 votes vote down vote up
public void init(Context context)
{
    getMetaData(context);

    int[] screenSize = ScreenUtils.getScreenSize(context, useDeviceSize);
    mScreenWidth = screenSize[0];
    mScreenHeight = screenSize[1];
    L.e(" screenWidth =" + mScreenWidth + " ,screenHeight = " + mScreenHeight);
}