コード例 #1
0
ファイル: Activity2.java プロジェクト: BorisMor/homework1
  private void setScaleType() {
    for (ScaleType stValue : ImageView.ScaleType.values()) {
      ItemSpinner item = new ItemSpinner(stValue, stValue.toString());
      this.ListSpinner.add(item);
    }

    ArrayAdapter adapterSelectDetail =
        new ArrayAdapter(this, android.R.layout.simple_spinner_item, this.ListSpinner);
    adapterSelectDetail.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    this.spScaleType.setAdapter(adapterSelectDetail);
  }
コード例 #2
0
 /** apply scaleType property in ImageView */
 public static void applyScaleType(View view, DynamicProperty property) {
   if (view instanceof ImageView) {
     switch (property.type) {
       case STRING:
         {
           ((ImageView) view)
               .setScaleType(ImageView.ScaleType.valueOf(property.getValueString().toUpperCase()));
         }
         break;
     }
   }
 }
コード例 #3
0
 static 
 {
     $SwitchMap$android$widget$ImageView$ScaleType = new int[android.widget.ImageView.ScaleType.values().length];
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.CENTER_INSIDE.ordinal()] = 1;
     }
     catch (NoSuchFieldError nosuchfielderror7) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.FIT_CENTER.ordinal()] = 2;
     }
     catch (NoSuchFieldError nosuchfielderror6) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.FIT_START.ordinal()] = 3;
     }
     catch (NoSuchFieldError nosuchfielderror5) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.FIT_END.ordinal()] = 4;
     }
     catch (NoSuchFieldError nosuchfielderror4) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.CENTER_CROP.ordinal()] = 5;
     }
     catch (NoSuchFieldError nosuchfielderror3) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.FIT_XY.ordinal()] = 6;
     }
     catch (NoSuchFieldError nosuchfielderror2) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.CENTER.ordinal()] = 7;
     }
     catch (NoSuchFieldError nosuchfielderror1) { }
     try
     {
         $SwitchMap$android$widget$ImageView$ScaleType[android.widget.ImageView.ScaleType.MATRIX.ordinal()] = 8;
     }
     catch (NoSuchFieldError nosuchfielderror)
     {
         return;
     }
 }