@Test public void testGetImageQuality() throws Exception { assertEquals(WXImageQuality.AUTO,attr.getImageQuality()); attr.put(IMAGE_QUALITY,HIGH); assertEquals(WXImageQuality.HIGH,attr.getImageQuality()); }
public WXImageQuality getImageQuality() { Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : get(Name.IMAGE_QUALITY); WXImageQuality imageQuality = WXImageQuality.AUTO; String value; if (obj != null && !TextUtils.isEmpty(value = obj.toString())) { try { imageQuality = WXImageQuality.valueOf(value.toUpperCase(Locale.US)); }catch (IllegalArgumentException e){ WXLogUtils.e("Image", "Invalid value image quality. Only low, normal, high, original are valid"); } } return imageQuality; }
WXAttr implements Map<String, Object>,Cloneable { public WXImageQuality getImageQuality() { Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : get(Name.IMAGE_QUALITY); WXImageQuality imageQuality = WXImageQuality.AUTO; String value; if (obj != null && !TextUtils.isEmpty(value = obj.toString())) { try { imageQuality = WXImageQuality.valueOf(value.toUpperCase(Locale.US)); }catch (IllegalArgumentException e){ WXLogUtils.e("Image", "Invalid value image quality. Only low, normal, high, original are valid"); } } return imageQuality; } }
WXAttr implements Map<String, Object>,Cloneable { public WXImageQuality getImageQuality() { Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : get(Name.IMAGE_QUALITY); WXImageQuality imageQuality = WXImageQuality.AUTO; String value; if (obj != null && !TextUtils.isEmpty(value = obj.toString())) { try { imageQuality = WXImageQuality.valueOf(value.toUpperCase(Locale.US)); }catch (IllegalArgumentException e){ WXLogUtils.e("Image", "Invalid value image quality. Only low, normal, high, original are valid"); } } return imageQuality; } WXAttr();  WXAttr(@NonNull Map<String,Object> standardMap);  WXAttr(@NonNull Map<String,Object> standardMap, int extra); }
WXAttr implements Map<String, Object>,Cloneable { public WXImageQuality getImageQuality() { Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : get(Name.IMAGE_QUALITY); WXImageQuality imageQuality = WXImageQuality.AUTO; String value; if (obj != null && !TextUtils.isEmpty(value = obj.toString())) { try { imageQuality = WXImageQuality.valueOf(value.toUpperCase(Locale.US)); }catch (IllegalArgumentException e){ WXLogUtils.e("Image", "Invalid value image quality. Only low, normal, high, original are valid"); } } return imageQuality; } WXAttr();  WXAttr(@NonNull Map<String,Object> standardMap);  WXAttr(@NonNull Map<String,Object> standardMap, int extra); static String getPrefix(Map<String, Object> attr); static String getSuffix(Map<String, Object> attr); static String getValue(Map<String, Object> attr); WXImageQuality getImageQuality(); WXImageSharpen getImageSharpen(); String getImageSrc(); boolean canRecycled(); boolean showIndicators(); boolean autoPlay(); String getScope(); String getLoadMoreRetry(); String getLoadMoreOffset(); String optString(String key); boolean getIsRecycleImage(); String getScrollDirection(); int getOrientation(); float getElevation(int viewPortW); float getColumnWidth(); int getColumnCount(); float getColumnGap(); int getLayoutType(); @Override boolean equals(Object o); @Override int hashCode(); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @NonNull @Override Set<Entry<String, Object>> entrySet(); @Override Object get(Object key); @Override boolean isEmpty(); @NonNull @Override Set<String> keySet(); @Override Object put(String key, Object value); @Override void putAll(Map<? extends String, ?> map); @Override Object remove(Object key); @Override int size(); @NonNull @Override Collection<Object> values(); ArrayMap<String, Object> getBindingAttrs(); WXStatement getStatement(); void setBindingAttrs(ArrayMap<String, Object> mBindingAttrs); void setStatement(WXStatement mStatement); void parseStatements(); void skipFilterPutAll(Map<String,Object> attrs); @UiThread void mergeAttr(); @Override WXAttr clone(); }
WXAttr implements Map<String, Object>,Cloneable { public WXImageQuality getImageQuality() { Object obj = containsKey(Name.QUALITY) ? get(Name.QUALITY) : get(Name.IMAGE_QUALITY); WXImageQuality imageQuality = WXImageQuality.AUTO; String value; if (obj != null && !TextUtils.isEmpty(value = obj.toString())) { try { imageQuality = WXImageQuality.valueOf(value.toUpperCase(Locale.US)); }catch (IllegalArgumentException e){ WXLogUtils.e("Image", "Invalid value image quality. Only low, normal, high, original are valid"); } } return imageQuality; } WXAttr();  WXAttr(@NonNull Map<String,Object> standardMap);  WXAttr(@NonNull Map<String,Object> standardMap, int extra); static String getPrefix(Map<String, Object> attr); static String getSuffix(Map<String, Object> attr); static String getValue(Map<String, Object> attr); WXImageQuality getImageQuality(); WXImageSharpen getImageSharpen(); String getImageSrc(); boolean canRecycled(); boolean showIndicators(); boolean autoPlay(); String getScope(); String getLoadMoreRetry(); String getLoadMoreOffset(); String optString(String key); boolean getIsRecycleImage(); String getScrollDirection(); int getOrientation(); float getElevation(int viewPortW); float getColumnWidth(); int getColumnCount(); float getColumnGap(); int getLayoutType(); @Override boolean equals(Object o); @Override int hashCode(); @Override void clear(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @NonNull @Override Set<Entry<String, Object>> entrySet(); @Override Object get(Object key); @Override boolean isEmpty(); @NonNull @Override Set<String> keySet(); @Override Object put(String key, Object value); @Override void putAll(Map<? extends String, ?> map); @Override Object remove(Object key); @Override int size(); @NonNull @Override Collection<Object> values(); ArrayMap<String, Object> getBindingAttrs(); WXStatement getStatement(); void setBindingAttrs(ArrayMap<String, Object> mBindingAttrs); void setStatement(WXStatement mStatement); void parseStatements(); void skipFilterPutAll(Map<String,Object> attrs); @UiThread void mergeAttr(); @Override WXAttr clone();  }