Lines Matching refs:index

72      * @param index the index of the value in the TypedArray
77 public void bridgeSetValue(int index, String name, boolean isFramework, ResourceValue value) {
78 mResourceData[index] = value;
79 mNames[index] = name;
80 mIsFramework[index] = isFramework;
104 int index = 1;
107 mIndices[index++] = i;
129 * Retrieve the styled string value for the attribute at <var>index</var>.
131 * @param index Index of attribute to retrieve.
137 public CharSequence getText(int index) {
138 if (index < 0 || index >= mResourceData.length) {
142 if (mResourceData[index] != null) {
144 return mResourceData[index].getValue();
151 * Retrieve the string value for the attribute at <var>index</var>.
153 * @param index Index of attribute to retrieve.
159 public String getString(int index) {
160 if (index < 0 || index >= mResourceData.length) {
164 if (mResourceData[index] != null) {
165 return mResourceData[index].getValue();
172 * Retrieve the boolean value for the attribute at <var>index</var>.
174 * @param index Index of attribute to retrieve.
180 public boolean getBoolean(int index, boolean defValue) {
181 if (index < 0 || index >= mResourceData.length) {
185 if (mResourceData[index] == null) {
189 String s = mResourceData[index].getValue();
198 * Retrieve the integer value for the attribute at <var>index</var>.
200 * @param index Index of attribute to retrieve.
206 public int getInt(int index, int defValue) {
207 if (index < 0 || index >= mResourceData.length) {
211 if (mResourceData[index] == null) {
215 String s = mResourceData[index].getValue();
235 if (mIsFramework[index]) {
236 map = Bridge.getEnumValues(mNames[index]);
240 ResourceValue attr = res.getProjectResource(ResourceType.ATTR, mNames[index]);
260 keyword, mNames[index]), null /*data*/);
270 * Retrieve the float value for the attribute at <var>index</var>.
272 * @param index Index of attribute to retrieve.
277 public float getFloat(int index, float defValue) {
278 if (index < 0 || index >= mResourceData.length) {
282 if (mResourceData[index] == null) {
286 String s = mResourceData[index].getValue();
295 s, mNames[index]), null /*data*/);
304 * Retrieve the color value for the attribute at <var>index</var>. If
309 * @param index Index of attribute to retrieve.
316 public int getColor(int index, int defValue) {
317 if (index < 0 || index >= mResourceData.length) {
321 if (mResourceData[index] == null) {
326 mResourceData[index], mContext);
335 * Retrieve the ColorStateList for the attribute at <var>index</var>.
339 * @param index Index of attribute to retrieve.
344 public ColorStateList getColorStateList(int index) {
345 if (index < 0 || index >= mResourceData.length) {
349 if (mResourceData[index] == null) {
353 ResourceValue resValue = mResourceData[index];
402 * Retrieve the integer value for the attribute at <var>index</var>.
404 * @param index Index of attribute to retrieve.
411 public int getInteger(int index, int defValue) {
412 return getInt(index, defValue);
416 * Retrieve a dimensional unit attribute at <var>index</var>. Unit
421 * @param index Index of attribute to retrieve.
432 public float getDimension(int index, float defValue) {
433 if (index < 0 || index >= mResourceData.length) {
437 if (mResourceData[index] == null) {
441 String s = mResourceData[index].getValue();
454 if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true /*requireUnit*/)) {
462 s, mNames[index]), null /*data*/);
468 * Retrieve a dimensional unit attribute at <var>index</var> for use
474 * @param index Index of attribute to retrieve.
485 public int getDimensionPixelOffset(int index, int defValue) {
486 return (int) getDimension(index, defValue);
490 * Retrieve a dimensional unit attribute at <var>index</var> for use
497 * @param index Index of attribute to retrieve.
508 public int getDimensionPixelSize(int index, int defValue) {
510 return getDimension(index);
512 if (mResourceData[index] != null) {
513 String s = mResourceData[index].getValue();
520 s, mNames[index]), null /*data*/);
534 * @param index Index of the attribute to retrieve.
541 public int getLayoutDimension(int index, String name) {
544 return getDimension(index);
559 public int getLayoutDimension(int index, int defValue) {
560 return getDimensionPixelSize(index, defValue);
563 private int getDimension(int index) {
564 if (mResourceData[index] == null) {
568 String s = mResourceData[index].getValue();
581 if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true /*requireUnit*/)) {
594 * Retrieve a fractional unit attribute at <var>index</var>.
596 * @param index Index of attribute to retrieve.
609 public float getFraction(int index, int base, int pbase, float defValue) {
610 if (index < 0 || index >= mResourceData.length) {
614 if (mResourceData[index] == null) {
618 String value = mResourceData[index].getValue();
623 if (ResourceHelper.parseFloatAttribute(mNames[index], value, mValue,
632 value, mNames[index]), null /*data*/);
639 * <var>index</var>. Note that attribute resource as resolved when
645 * @param index Index of attribute to retrieve.
652 public int getResourceId(int index, int defValue) {
653 if (index < 0 || index >= mResourceData.length) {
657 // get the Resource for this index
658 ResourceValue resValue = mResourceData[index];
750 "Unable to resolve id \"%1$s\" for attribute \"%2$s\"", value, mNames[index]),
757 * Retrieve the Drawable for the attribute at <var>index</var>. This
762 * @param index Index of attribute to retrieve.
767 public Drawable getDrawable(int index) {
768 if (index < 0 || index >= mResourceData.length) {
772 if (mResourceData[index] == null) {
776 ResourceValue value = mResourceData[index];
787 * Retrieve the CharSequence[] for the attribute at <var>index</var>.
792 * @param index Index of attribute to retrieve.
797 public CharSequence[] getTextArray(int index) {
798 if (index < 0 || index >= mResourceData.length) {
802 if (mResourceData[index] == null) {
806 String value = mResourceData[index].getValue();
818 index, mResourceData[index].getName())), null /*data*/);
824 * Retrieve the raw TypedValue for the attribute at <var>index</var>.
826 * @param index Index of attribute to retrieve.
833 public boolean getValue(int index, TypedValue outValue) {
834 if (index < 0 || index >= mResourceData.length) {
838 if (mResourceData[index] == null) {
842 String s = mResourceData[index].getValue();
844 return ResourceHelper.parseFloatAttribute(mNames[index], s, outValue,
849 * Determines whether there is an attribute at <var>index</var>.
851 * @param index Index of attribute to retrieve.
856 public boolean hasValue(int index) {
857 if (index < 0 || index >= mResourceData.length) {
861 return mResourceData[index] != null;
865 * Retrieve the raw TypedValue for the attribute at <var>index</var>
869 * @param index Index of attribute to retrieve.
876 public TypedValue peekValue(int index) {
877 if (index < 0 || index >= mResourceData.length) {
881 if (getValue(index, mValue)) {