All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.res.android.ResourceTable Maven / Gradle / Ivy

package org.robolectric.res.android;

import org.robolectric.res.android.ResourceTypes.ResTable_map;

public class ResourceTable {
  public static class flag_entry {
    public final String name;
    public final int value;
    public final String description;

    public flag_entry(String name, int value, String description) {
      this.name = name;
      this.value = value;
      this.description = description;
    }
  }
  ;

  public static flag_entry[] gFormatFlags = {
    new flag_entry(
        "reference",
        ResTable_map.TYPE_REFERENCE,
        "a reference to another resource, in the form"
            + " \"@[+][package:]type:name\"\n"
            + "or to a theme attribute in the form"
            + " \"?[package:][type:]name\"."),
    new flag_entry(
        "string",
        ResTable_map.TYPE_STRING,
        "a string value, using '\\\\;' to escape characters such as '\\\\n"
            + "' or '\\\\uxxxx' for a unicode character."),
    new flag_entry(
        "integer", ResTable_map.TYPE_INTEGER, "an integer value, such as \"100\"."),
    new flag_entry(
        "boolean",
        ResTable_map.TYPE_BOOLEAN,
        "a boolean value, either \"true\" or \"false\"."),
    new flag_entry(
        "color",
        ResTable_map.TYPE_COLOR,
        "a color value, in the form of \"#rgb\","
            + " \"#argb\",\n"
            + "\"#rrggbb\", or \"#aarrggbb\"."),
    new flag_entry(
        "float", ResTable_map.TYPE_FLOAT, "a floating point value, such as \"1.2\"."),
    new flag_entry(
        "dimension",
        ResTable_map.TYPE_DIMENSION,
        "a dimension value, which is a floating point number appended with a unit such as"
            + " \"14.5sp\".\n"
            + "Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels"
            + " based on preferred font size),\n"
            + "in (inches), mm (millimeters)."),
    new flag_entry(
        "fraction",
        ResTable_map.TYPE_FRACTION,
        "a fractional value, which is a floating point number appended with either % or %p, such as"
            + " \"14.5%\".\n"
            + "The % suffix always means a percentage of the base size; the optional %p suffix"
            + " provides a size relative to\n"
            + "some parent container."),
    new flag_entry("enum", ResTable_map.TYPE_ENUM, null),
    new flag_entry("flags", ResTable_map.TYPE_FLAGS, null)
    // new flag_entry(null, 0, null)
  };
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy