Android Open Source - android-cassowary-layout Measure Spec Utils






From Project

Back to project page android-cassowary-layout.

License

The source code is released under:

Apache License

If you think the Android project android-cassowary-layout listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package no.agens.cassowarylayout.util;
/*from w  ww.j a v a  2 s.  c  o  m*/
import android.view.View;

/**
 * Created by alex on 14/11/14.
 */
public class MeasureSpecUtils {
    public static String getModeAsString(int modeOrSpec) {
        String modeAsString;
        int mode = View.MeasureSpec.getMode(modeOrSpec);
        if (mode == View.MeasureSpec.EXACTLY) {
            modeAsString = "EXACTLY";
        } else if (mode == View.MeasureSpec.AT_MOST) {
            modeAsString = "AT_MOST";
        } else if (mode == View.MeasureSpec.UNSPECIFIED) {
            modeAsString = "UNSPECIFIED";
        } else {
            modeAsString = "unknown mode " + modeOrSpec;
        }

        return modeAsString;
    }
}




Java Source Code List

no.agens.cassowarylayout.ApplicationTest.java
no.agens.cassowarylayout.CassowaryLayout.java
no.agens.cassowarylayout.CassowaryModel.java
no.agens.cassowarylayout.ChildNode.java
no.agens.cassowarylayout.ConstraintParser.java
no.agens.cassowarylayout.ContainerNode.java
no.agens.cassowarylayout.DefaultViewIdResolver.java
no.agens.cassowarylayout.Node.java
no.agens.cassowarylayout.ViewIdResolver.java
no.agens.cassowarylayout.util.CassowaryUtil.java
no.agens.cassowarylayout.util.DimensionParserTest.java
no.agens.cassowarylayout.util.DimensionParser.java
no.agens.cassowarylayout.util.ExpressionTokenizerTest.java
no.agens.cassowarylayout.util.InfixToPostFixTest.java
no.agens.cassowarylayout.util.MeasureSpecUtils.java
no.agens.cassowarylayout.util.TimerUtil.java
no.agens.cassowarylayoutdemo.ApplicationTest.java
no.agens.cassowarylayoutdemo.CassowaryLayoutInLinearLayoutActivity.java
no.agens.cassowarylayoutdemo.CassowaryLayoutMatchParentActivity.java
no.agens.cassowarylayoutdemo.CassowaryLayoutWrapContentActivity.java
no.agens.cassowarylayoutdemo.CassowaryLayoutsInCassowaryLayoutActivity.java
no.agens.cassowarylayoutdemo.CassowaryLayoutsInListViewActivity.java
no.agens.cassowarylayoutdemo.CenterInParentActivity.java
no.agens.cassowarylayoutdemo.CenterViewRelativeToSiblingActivity.java
no.agens.cassowarylayoutdemo.ChessBoardActivity.java
no.agens.cassowarylayoutdemo.DynamicWidthActivity.java
no.agens.cassowarylayoutdemo.ExampleMenuActivity.java
no.agens.cassowarylayoutdemo.FixedAspectRatioDemoActivity.java
no.agens.cassowarylayoutdemo.IntrinsicHeightTextInWrapContentContainerActivity.java
no.agens.cassowarylayoutdemo.LayoutParamsSwitcherActivity.java
no.agens.cassowarylayoutdemo.LinearLayoutInCassowaryLayoutActivity.java
no.agens.cassowarylayoutdemo.ParallaxScrollingActivity.java
no.agens.cassowarylayoutdemo.PreSetupTestActivity.java
no.agens.cassowarylayoutdemo.ProgrammaticDemoActivity.java
no.agens.cassowarylayoutdemo.XmlLayoutDemoActivity.java
no.agens.cassowarylayoutdemo.util.EditRatioDialog.java