android.widget.ImageView.isEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(225)

本文整理了Java中android.widget.ImageView.isEnabled()方法的一些代码示例,展示了ImageView.isEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.isEnabled()方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:isEnabled

ImageView.isEnabled介绍

暂无

代码示例

代码示例来源:origin: derry/delion

@Override
  public void onAnimationEnd(Animator animation) {
    // This is to deal with the view going invisible when resuming the activity and
    // running this animation.  The view is still there and clickable but does not
    // render and only a layout triggers a refresh.  See crbug.com/306890.
    if (!mToggleTabStackButton.isEnabled()) requestLayout();
  }
});

代码示例来源:origin: pro100svitlo/LockPattern

private void checkItemInPosition( float x, float y){
  for (int i = 0; i < mAllDots.size(); i++) {
    if (mAllDots.get(i).isEnabled()){
      float currentX_min = mDotsCoordinatesX[i] - mDotWidth /2;
      float currentX_max = mDotsCoordinatesX[i] + mDotWidth /2;

代码示例来源:origin: gigabytedevelopers/FireFiles

@Override
  protected void onPostExecute(Void e) {
    super.onPostExecute(e);
    if(!TextUtils.isEmpty(sizeString)) {
      size.setText(sizeString);
    }
    if(null != result){
      ImageView.ScaleType scaleType = doc.mimeType.equals(Document.MIME_TYPE_APK) ? ImageView.ScaleType.FIT_CENTER : ImageView.ScaleType.CENTER_CROP;
      iconThumb.setScaleType(scaleType);
      iconThumb.setTag(null);
      iconThumb.setImageBitmap(result);
      final float targetAlpha = iconMime.isEnabled() ? 1f : 0.5f;
      iconMimeBackground.animate().alpha(0f).start();
      iconMime.setAlpha(targetAlpha);
      iconMime.animate().alpha(0f).start();
      iconThumb.setAlpha(0f);
      iconThumb.animate().alpha(targetAlpha).start();
    }
  }
}

代码示例来源:origin: wasdennnoch/AndroidN-ify

protected void setIcon(ImageView iv, Drawable d) {
    int tagId = getResources().getIdentifier("qs_icon_tag", "id", PACKAGE_SYSTEMUI);
    if (!Objects.equals(d, iv.getTag(tagId))) {
      iv.setImageDrawable(d);
      iv.setTag(tagId, d);
    }
    if (!iv.isEnabled()) {
      iv.setEnabled(true);
      iv.setColorFilter(null);
    }
  }
}

代码示例来源:origin: gigabytedevelopers/FireFiles

@Override
  protected void onPostExecute(Bitmap result) {
    if (isCancelled()) {
      result = null;
    }
    if (mIconThumb.getTag() == this && result != null) {
      mIconThumb.setScaleType(Utils.isAPK(mMimeType) ? ImageView.ScaleType.CENTER_INSIDE : ImageView.ScaleType.CENTER_CROP);
      mIconThumb.setTag(null);
      mIconThumb.setImageBitmap(result);
      mIconMimeBackground.setVisibility(View.INVISIBLE);
      final float targetAlpha = mIconMime.isEnabled() ? 1f : 0.5f;
      mIconMime.setAlpha(targetAlpha);
      mIconMime.animate().alpha(0f).start();
      mIconThumb.setAlpha(0f);
      mIconThumb.animate().alpha(targetAlpha).start();
    }
  }
}

代码示例来源:origin: upyun/android-push-sdk

btn_flashlight.setEnabled(!btn_flashlight.isEnabled());
  break;
case R.id.btn_camera_beauty:

代码示例来源:origin: klinker41/android-smsmms

private void toggleSendImage() {
  if (imageToSend.isEnabled()) {
    imageToSend.setEnabled(false);
    imageToSend.setAlpha(0.3f);
  } else {
    imageToSend.setEnabled(true);
    imageToSend.setAlpha(1.0f);
  }
}

代码示例来源:origin: upyun/android-push-sdk

boolean converted = mClient.covertCamera();
if (converted) {
  mImgFlash.setEnabled(!mImgFlash.isEnabled());

代码示例来源:origin: klinker41/android-smsmms

@Override
  public void run() {
    com.klinker.android.send_message.Settings sendSettings = new com.klinker.android.send_message.Settings();
    sendSettings.setMmsc(settings.getMmsc());
    sendSettings.setProxy(settings.getMmsProxy());
    sendSettings.setPort(settings.getMmsPort());
    sendSettings.setUseSystemSending(true);
    Transaction transaction = new Transaction(MainActivity.this, sendSettings);
    Message message = new Message(messageField.getText().toString(), toField.getText().toString());
    if (imageToSend.isEnabled()) {
      message.setImage(BitmapFactory.decodeResource(getResources(), R.drawable.android));
    }
    transaction.sendNewMessage(message, Transaction.NO_THREAD_ID);
  }
}).start();

相关文章

ImageView类方法