Android Open Source - penmanship Android X M L Constants






From Project

Back to project page penmanship.

License

The source code is released under:

Apache License

If you think the Android project penmanship 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 com.mindsnacks.penmanship;
//from   ww w  .  ja v  a  2 s.c  o  m
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Tony Cosentini Date: 1/13/14 Time: 11:26 AM
 */
public class AndroidXMLConstants {
  public static final String XMLNS_ANDROID = "xmlns:android";
  public static final String ANDROID_NAMESPACE = "http://schemas.android.com/apk/res/android";

  public static final String LAYOUT_WIDTH = "android:layout_width";
  public static final String LAYOUT_HEIGHT = "android:layout_height";

  public static final String MATCH_PARENT = "match_parent";
  public static final String WRAP_CONTENT = "wrap_content";

  public static final String ID = "android:id";
  public static final String ID_MARKDROID_CONTENT = "@+id/markdroid_content";

  public static final String TAG = "android:tag";

  public static final String STYLE = "style";
  public static final String STYLE_MARKDROID_CONTENT = "@style/markdroid_content";

  public static final String ORIENTATION = "android:orientation";
  public static final String VERTICAL = "vertical";

  public static final String LINEAR_LAYOUT = "LinearLayout";
  public static final String TEXT_VIEW = "TextView";
  public static final String IMAGE_VIEW = "ImageView";

  public static final String ADJUST_VIEW_BOUNDS = "android:adjustViewBounds";
  public static final String SOURCE = "android:src";

  public static final String TRUE = "true";

  public static final String TEXT = "android:text";

  public static Map<String, String> getDefaultLayoutSizes() {
    Map<String, String> attributes = new HashMap<String, String>();

    attributes.put(AndroidXMLConstants.LAYOUT_WIDTH, AndroidXMLConstants.MATCH_PARENT);
    attributes.put(AndroidXMLConstants.LAYOUT_HEIGHT, AndroidXMLConstants.WRAP_CONTENT);

    return attributes;
  }

  public static Map<String, String> getDefaultLinearLayoutAttributes() {
    Map<String, String> attributes = getDefaultLayoutSizes();

    attributes.put(AndroidXMLConstants.LAYOUT_WIDTH, AndroidXMLConstants.MATCH_PARENT);
    attributes.put(AndroidXMLConstants.LAYOUT_HEIGHT, AndroidXMLConstants.WRAP_CONTENT);
    attributes.put(AndroidXMLConstants.ORIENTATION, AndroidXMLConstants.VERTICAL);

    return attributes;
  }
}




Java Source Code List

com.mindsnacks.penmanship.AndroidMarkdownVisitor.java
com.mindsnacks.penmanship.AndroidXMLConstants.java
com.mindsnacks.penmanship.AndroidXMLNode.java
com.mindsnacks.penmanship.BaseVisitor.java
com.mindsnacks.penmanship.Penmanship.java
com.mindsnacks.penmanship.Penmanship.java
com.mindsnacks.penmanship.group_handlers.BaseHandler.java
com.mindsnacks.penmanship.group_handlers.ImageGroupHandler.java
com.mindsnacks.penmanship.group_handlers.TextNodeGroupHandler.java
com.penmanship.example.MainActivity.java