当前位置: 首页>>代码示例>>Java>>正文


Java ImageView.clearColorFilter方法代码示例

本文整理汇总了Java中android.widget.ImageView.clearColorFilter方法的典型用法代码示例。如果您正苦于以下问题:Java ImageView.clearColorFilter方法的具体用法?Java ImageView.clearColorFilter怎么用?Java ImageView.clearColorFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.ImageView的用法示例。


在下文中一共展示了ImageView.clearColorFilter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onTouch

import android.widget.ImageView; //导入方法依赖的package包/类
@Override
public boolean onTouch(View view, MotionEvent event) {
    if (view instanceof ImageView) {
        ImageView imageView = (ImageView) view;

        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN: {
                rect = new Rect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
                imageView.setColorFilter(FILTERED_GREY, PorterDuff.Mode.SRC_ATOP);
                view.invalidate();
                break;
            }
            case MotionEvent.ACTION_MOVE:
                // if move inside button do nothing, otherwise clear filter
                if(rect.contains(view.getLeft() + (int) event.getX(), view.getTop() + (int) event.getY()))
                    break;
            case MotionEvent.ACTION_UP:
            case MotionEvent.ACTION_CANCEL: // Action call when button is inside scrollable view
                imageView.clearColorFilter();
                view.invalidate();
        }
    }
    return false;
}
 
开发者ID:thanhbinh84,项目名称:clickable-image-view,代码行数:25,代码来源:EffectTouchListener.java

示例2: onVoiceMuteClicked

import android.widget.ImageView; //导入方法依赖的package包/类
public void onVoiceMuteClicked(View view) {
    log.info("onVoiceMuteClicked " + view + " " + mUidsList.size() + " video_status: " + mVideoMuted + " audio_status: " + mAudioMuted);
    if (mUidsList.size() == 0) {
        return;
    }

    RtcEngine rtcEngine = rtcEngine();
    rtcEngine.muteLocalAudioStream(mAudioMuted = !mAudioMuted);

    ImageView iv = (ImageView) view;

    if (mAudioMuted) {
        iv.setColorFilter(getResources().getColor(R.color.agora_blue), PorterDuff.Mode.MULTIPLY);
    } else {
        iv.clearColorFilter();
    }
}
 
开发者ID:huangjingqiang,项目名称:SWDemo,代码行数:18,代码来源:ChatActivity.java

示例3: onBtnNClicked

import android.widget.ImageView; //导入方法依赖的package包/类
public void onBtnNClicked(View view) {
    if (mVideoPreProcessing == null) {
        mVideoPreProcessing = new VideoPreProcessing();
    }

    ImageView iv = (ImageView) view;
    Object showing = view.getTag();
    if (showing != null && (Boolean) showing) {
        mVideoPreProcessing.enablePreProcessing(false);
        iv.setTag(null);
        iv.clearColorFilter();
    } else {
        mVideoPreProcessing.enablePreProcessing(true);
        iv.setTag(true);
        iv.setColorFilter(getResources().getColor(R.color.agora_blue), PorterDuff.Mode.MULTIPLY);
    }
}
 
开发者ID:AgoraIO,项目名称:OpenVideoCall-Android,代码行数:18,代码来源:ChatActivity.java

示例4: updateSettingsButton

import android.widget.ImageView; //导入方法依赖的package包/类
private static void updateSettingsButton() {
    if (mPhoneStatusBar == null || SysUiManagers.IconManager == null) return;
    try {
        Object header = XposedHelpers.getObjectField(mPhoneStatusBar, "mHeader");
        ImageView settingsButton = (ImageView) XposedHelpers.getObjectField(
                header, Utils.isSamsungRom() ? "mSettingButton" : "mSettingsButton");
        if (SysUiManagers.IconManager.isColoringEnabled()) {
            settingsButton.setColorFilter(SysUiManagers.IconManager.getIconColor(),
                    PorterDuff.Mode.SRC_IN);
        } else {
            settingsButton.clearColorFilter();
        }
    } catch (Throwable t) {
        XposedBridge.log(t);
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:17,代码来源:ModStatusbarColor.java

示例5: onVoiceMuteClicked

import android.widget.ImageView; //导入方法依赖的package包/类
public void onVoiceMuteClicked(View view) {
    log.info("onVoiceMuteClicked " + view + " audio_status: " + mAudioMuted);

    RtcEngine rtcEngine = rtcEngine();
    rtcEngine.muteLocalAudioStream(mAudioMuted = !mAudioMuted);

    ImageView iv = (ImageView) view;

    if (mAudioMuted) {
        iv.setColorFilter(getResources().getColor(R.color.agora_blue), PorterDuff.Mode.MULTIPLY);
    } else {
        iv.clearColorFilter();
    }
}
 
开发者ID:AgoraIO,项目名称:OpenVoiceCall-Android,代码行数:15,代码来源:ChatActivity.java

示例6: notifyHeadsetPlugged

import android.widget.ImageView; //导入方法依赖的package包/类
public void notifyHeadsetPlugged(final int routing) {
    log.info("notifyHeadsetPlugged " + routing);

    mAudioRouting = routing;

    ImageView iv = (ImageView) findViewById(R.id.switch_speaker_id);
    if (mAudioRouting == 3) { // Speakerphone
        iv.setColorFilter(getResources().getColor(R.color.agora_blue), PorterDuff.Mode.MULTIPLY);
    } else {
        iv.clearColorFilter();
    }
}
 
开发者ID:AgoraIO,项目名称:OpenVoiceCall-Android,代码行数:13,代码来源:ChatActivity.java

示例7: onLocalAudioMuteClicked

import android.widget.ImageView; //导入方法依赖的package包/类
public void onLocalAudioMuteClicked(View view) {
    ImageView iv = (ImageView) view;
    if (iv.isSelected()) {
        iv.setSelected(false);
        iv.clearColorFilter();
    } else {
        iv.setSelected(true);
        iv.setColorFilter(getResources().getColor(R.color.colorPrimary), PorterDuff.Mode.MULTIPLY);
    }

    mRtcEngine.muteLocalAudioStream(iv.isSelected());
}
 
开发者ID:AgoraIO,项目名称:Agora-Video-Source-Android,代码行数:13,代码来源:VideoChatViewActivity.java

示例8: resetToVideoEnabledUI

import android.widget.ImageView; //导入方法依赖的package包/类
private void resetToVideoEnabledUI() {
    ImageView iv = (ImageView) findViewById(R.id.customized_function_id);
    iv.setImageResource(R.drawable.btn_switch_camera);
    iv.clearColorFilter();

    notifyHeadsetPlugged(mAudioRouting);
}
 
开发者ID:AgoraIO,项目名称:OpenVideoCall-Android,代码行数:8,代码来源:ChatActivity.java

示例9: resetToVideoDisabledUI

import android.widget.ImageView; //导入方法依赖的package包/类
private void resetToVideoDisabledUI() {
    ImageView iv = (ImageView) findViewById(R.id.customized_function_id);
    iv.setImageResource(R.drawable.btn_speaker);
    iv.clearColorFilter();

    notifyHeadsetPlugged(mAudioRouting);
}
 
开发者ID:AgoraIO,项目名称:OpenVideoCall-Android,代码行数:8,代码来源:ChatActivity.java

示例10: setImageViewColor

import android.widget.ImageView; //导入方法依赖的package包/类
private void setImageViewColor(ImageView view, int color) {
    if (color == ORIGIN_COLOR) {
        view.clearColorFilter();
    } else {
        view.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
    }
}
 
开发者ID:wzx54321,项目名称:XinFramework,代码行数:8,代码来源:CommonTitleBar.java

示例11: setKeyColorRecursive

import android.widget.ImageView; //导入方法依赖的package包/类
private static void setKeyColorRecursive(ViewGroup vg) {
    if (vg == null) return;
    final int childCount = vg.getChildCount();
    for (int i = 0; i < childCount; i++) {
        View child = vg.getChildAt(i);
        if (child instanceof ViewGroup) {
            setKeyColorRecursive((ViewGroup) child);
        } else if (child instanceof ImageView) {
            ImageView imgv = (ImageView) vg.getChildAt(i);
            if (mNavbarColorsEnabled) {
                imgv.setColorFilter(mKeyColor, PorterDuff.Mode.SRC_ATOP);
            } else {
                imgv.clearColorFilter();
            }
            if (imgv.getClass().getName().equals(CLASS_KEY_BUTTON_VIEW) &&
                    !mNavbarColorsEnabled) {
                Drawable ripple = imgv.getBackground();
                if (ripple != null &&
                        ripple.getClass().getName().equals(CLASS_KEY_BUTTON_RIPPLE)) {
                    Paint paint = (Paint) XposedHelpers.getObjectField(ripple, "mRipplePaint");
                    if (paint != null) {
                        paint.setColor(0xffffffff);
                    }
                }
            } else if (imgv instanceof KeyButtonView) {
                ((KeyButtonView) imgv).setGlowColor(mNavbarColorsEnabled ?
                        mKeyGlowColor : mKeyDefaultGlowColor);
            }
        }
    }
}
 
开发者ID:WrBug,项目名称:GravityBox,代码行数:32,代码来源:ModNavigationBar.java

示例12: onSwitchSpeakerphoneClicked

import android.widget.ImageView; //导入方法依赖的package包/类
public void onSwitchSpeakerphoneClicked(View view) {
    ImageView iv = (ImageView) view;
    if (iv.isSelected()) {
        iv.setSelected(false);
        iv.clearColorFilter();
    } else {
        iv.setSelected(true);
        iv.setColorFilter(getResources().getColor(R.color.colorPrimary), PorterDuff.Mode.MULTIPLY);
    }

    mRtcEngine.setEnableSpeakerphone(view.isSelected());
}
 
开发者ID:AgoraIO,项目名称:Agora-Android-Voice-Tutorial-1to1,代码行数:13,代码来源:VoiceChatViewActivity.java

示例13: setImage

import android.widget.ImageView; //导入方法依赖的package包/类
public void setImage(final ImageView image, int res, int color)
{
    image.setVisibility(View.VISIBLE);
    image.setImageResource(res);
    image.clearColorFilter();
    image.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
}
 
开发者ID:mkulesh,项目名称:microMathematics,代码行数:8,代码来源:SimpleDialog.java

示例14: setResult

import android.widget.ImageView; //导入方法依赖的package包/类
@Override
public void setResult(ImageView imageView, LoadTaskItem taskItem) {
    if (DBG) Log.d(TAG, "setResult : " + taskItem.result.bitmap);
    imageView.setImageBitmap(taskItem.result.bitmap);
    imageView.clearColorFilter();
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:7,代码来源:PosterProcessor.java

示例15: setResult

import android.widget.ImageView; //导入方法依赖的package包/类
@Override
public void setResult(ImageView imageView, LoadTaskItem taskItem) {
    imageView.setImageBitmap(taskItem.result.bitmap);
    imageView.clearColorFilter();
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:6,代码来源:VideoThumbProcessor.java


注:本文中的android.widget.ImageView.clearColorFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。