本文整理了Java中android.widget.ImageView.setEnabled()
方法的一些代码示例,展示了ImageView.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageView.setEnabled()
方法的具体详情如下:
包路径:android.widget.ImageView
类名称:ImageView
方法名:setEnabled
暂无
代码示例来源:origin: igreenwood/SimpleCropView
/**
* Set locking the getCroppedBitmap frame.
*
* @param enabled should lock getCroppedBitmap frame?
*/
@Override public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
mIsEnabled = enabled;
}
代码示例来源:origin: ZieIony/Carbon
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
}
代码示例来源:origin: sunfusheng/StickyHeaderListView
private void addIndicatorImageViews() {
llIndexContainer.removeAllViews();
if (bannerCount < 2) return;
for (int i = 0; i < bannerCount; i++) {
ImageView iv = new ImageView(mActivity);
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(DensityUtil.dip2px(mActivity, 5), DensityUtil.dip2px(mActivity, 5));
lp.leftMargin = DensityUtil.dip2px(mActivity, (i == 0) ? 0 : 7);
iv.setLayoutParams(lp);
iv.setBackgroundResource(R.drawable.xml_round_orange_grey_sel);
iv.setEnabled(i == 0);
llIndexContainer.addView(iv);
}
}
代码示例来源:origin: novoda/android-demos
private View configureOption(View option, CharSequence title, boolean active) {
ImageView iconView = getOptionIcon(option);
iconView.setEnabled(active);
getOptionTitle(option).setText(title);
return option;
}
代码示例来源:origin: HotBitmapGG/bilibili-android-client
private void disableUnsupportedButtons() {
if (mPauseButton != null && mTvPlay != null && !mPlayer.canPause()) {
mPauseButton.setEnabled(false);
mTvPlay.setEnabled(false);
}
}
代码示例来源:origin: arimorty/floatingsearchview
@Override
public void onBindViewHolder(RecyclerView.ViewHolder vh, int position) {
SearchSuggestionViewHolder viewHolder = (SearchSuggestionViewHolder) vh;
if (!mShowRightMoveUpBtn) {
viewHolder.rightIcon.setEnabled(false);
viewHolder.rightIcon.setVisibility(View.INVISIBLE);
} else {
viewHolder.rightIcon.setEnabled(true);
viewHolder.rightIcon.setVisibility(View.VISIBLE);
}
SearchSuggestion suggestionItem = mSearchSuggestions.get(position);
viewHolder.body.setText(suggestionItem.getBody());
if(mTextColor != -1){
viewHolder.body.setTextColor(mTextColor);
}
if(mRightIconColor != -1){
Util.setIconColor(viewHolder.rightIcon, mRightIconColor);
}
if (mOnBindSuggestionCallback != null) {
mOnBindSuggestionCallback.onBindSuggestion(viewHolder.itemView, viewHolder.leftIcon, viewHolder.body,
suggestionItem, position);
}
}
代码示例来源:origin: k9mail/k-9
private void setCryptoDisplayStatus(MessageCryptoDisplayStatus displayStatus) {
int color = ThemeUtils.getStyledColor(getContext(), displayStatus.colorAttr);
mCryptoStatusIcon.setEnabled(displayStatus.isEnabled);
mCryptoStatusIcon.setVisibility(View.VISIBLE);
mCryptoStatusIcon.setImageResource(displayStatus.statusIconRes);
mCryptoStatusIcon.setColorFilter(color);
}
代码示例来源:origin: daniulive/SmarterStreaming
@Override
public void surfaceCreated(SurfaceHolder holder) {
Log.i(TAG, "surfaceCreated..");
try {
int CammeraIndex = findBackCamera();
Log.i(TAG, "BackCamera: " + CammeraIndex);
if (CammeraIndex == -1) {
CammeraIndex = findFrontCamera();
currentCameraType = FRONT;
imgSwitchCamera.setEnabled(false);
if (CammeraIndex == -1) {
Log.i(TAG, "NO camera!!");
return;
}
} else {
currentCameraType = BACK;
}
if (mCamera == null) {
mCamera = openCamera(currentCameraType);
}
} catch (Exception e) {
e.printStackTrace();
}
}
代码示例来源:origin: daniulive/SmarterStreaming
CammeraIndex=findFrontCamera();
pushCurrentCameraType = FRONT;
imgPushSwitchCamera.setEnabled(false);
if(CammeraIndex == -1)
代码示例来源:origin: HotBitmapGG/bilibili-android-client
@Override
public void setEnabled(boolean enabled) {
if (mPauseButton != null) {
mPauseButton.setEnabled(enabled);
}
if (mTvPlay != null) {
mTvPlay.setEnabled(enabled);
}
if (mProgress != null) {
mProgress.setEnabled(enabled);
}
disableUnsupportedButtons();
super.setEnabled(enabled);
}
代码示例来源:origin: weexteam/weex-hackernews
@Override
public void onClick(View v) {
imageView.setOnClickListener(null);
imageView.setEnabled(false);
comp.loadContent();
}
});
代码示例来源:origin: Nipuream/LuckPan
protected void setStartBtnEnable(boolean enable){
if(startBtn != null)
startBtn.setEnabled(enable);
else throw new RuntimeException("Have you add start button in LuckPanLayout element ?");
}
代码示例来源:origin: myxh/CoolShopping
@Override
public void afterTextChanged(Editable editable) {
isPhoneNumberNull = TextUtils.isEmpty(mQuickLoginEtPhoneNumber.getText());
mQuickLoginIvClearPhoneNumber.setVisibility(isPhoneNumberNull ? View.GONE : View.VISIBLE);
mQuickLoginIvClearPhoneNumber.setEnabled(!isPhoneNumberNull);
mQuickLoginBtn.setEnabled((isPhoneNumberNull||isCodeNull) ? false : true);
}
});
代码示例来源:origin: myxh/CoolShopping
@Override
public void afterTextChanged(Editable editable) {
isPasswordNull = TextUtils.isEmpty(mEtPassword.getText());
mIvClearPassword.setVisibility(isPasswordNull ? View.GONE : View.VISIBLE);
mIvClearPassword.setEnabled(!isPasswordNull);
mBtnRegister.setEnabled((isPhoneNumberNull||isMsgCodeNull||isPasswordNull||isRepasswordNull
? false : true));
}
});
代码示例来源:origin: myxh/CoolShopping
@Override
public void afterTextChanged(Editable editable) {
isMsgCodeNull = TextUtils.isEmpty(mEtCode.getText());
mIvClearCode.setVisibility(isMsgCodeNull ? View.GONE : View.VISIBLE);
mIvClearCode.setEnabled(!isMsgCodeNull);
mBtnRegister.setEnabled((isPhoneNumberNull||isMsgCodeNull||isPasswordNull||isRepasswordNull
? false : true));
}
});
代码示例来源:origin: myxh/CoolShopping
@Override
public void afterTextChanged(Editable editable) {
isPasswordNull = TextUtils.isEmpty(mAccountLoginEtPassword.getText());
mAccountLoginIvClearPassword.setVisibility(isPasswordNull ? View.GONE : View.VISIBLE);
mAccountLoginIvClearPassword.setEnabled(!isPasswordNull);
mAccountLoginBtn.setEnabled((isUserNameNull||isPasswordNull) ? false : true);
}
});
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
this.setSensorListenerRegistered(enabled, false);
}
代码示例来源: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: ytai/IOIOPlotter
private void done() {
scribbler_.requestResult();
donePressed_ = true;
doneButton_.setEnabled(false);
blurSeekBar_.setEnabled(false);
thresholdSeekBar_.setEnabled(false);
previewCheckbox_.setEnabled(false);
imageView_.setEnabled(false);
resetButton_.setEnabled(false);
}
代码示例来源:origin: yoyiyi/bilisoleil
@Override
public void setEnabled(boolean enabled) {
if (mPauseButton != null)
mPauseButton.setEnabled(enabled);
if (mTvPlay != null)
mTvPlay.setEnabled(enabled);
if (mProgress != null)
mProgress.setEnabled(enabled);
disableUnsupportedButtons();
super.setEnabled(enabled);
}
内容来源于网络,如有侵权,请联系作者删除!