本文整理汇总了Java中android.support.wearable.watchface.WatchFaceService.INTERRUPTION_FILTER_NONE属性的典型用法代码示例。如果您正苦于以下问题:Java WatchFaceService.INTERRUPTION_FILTER_NONE属性的具体用法?Java WatchFaceService.INTERRUPTION_FILTER_NONE怎么用?Java WatchFaceService.INTERRUPTION_FILTER_NONE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.support.wearable.watchface.WatchFaceService
的用法示例。
在下文中一共展示了WatchFaceService.INTERRUPTION_FILTER_NONE属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "onInterruptionFilterChanged: " + interruptionFilter);
}
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE;
// We only need to update once a minute in mute mode.
setInteractiveUpdateRateMs(inMuteMode ? MUTE_UPDATE_RATE_MS : NORMAL_UPDATE_RATE_MS);
if (mMute != inMuteMode) {
mMute = inMuteMode;
int alpha = inMuteMode ? MUTE_ALPHA : NORMAL_ALPHA;
mDatePaint.setAlpha(alpha);
mHourPaint.setAlpha(alpha);
mMinutePaint.setAlpha(alpha);
mColonPaint.setAlpha(alpha);
mAmPmPaint.setAlpha(alpha);
invalidate();
}
}
示例2: onCreate
@Override
public void onCreate(SurfaceHolder holder) {
LOGD(TAG, "onCreate");
super.onCreate(holder);
updateDateStr();
mMute = getInterruptionFilter() == WatchFaceService.INTERRUPTION_FILTER_NONE;
handleConfigUpdated();
mDateTypeface = Typeface.createFromAsset(getAssets(), "VT323-Regular.ttf");
initClockRenderers();
registerSystemSettingsListener();
registerSharedPrefsListener();
registerTimeZoneReceiver();
initMuzei();
}
示例3: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "onInterruptionFilterChanged: " + interruptionFilter);
}
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE;
// We only need to update once a minute in mute mode.
setInteractiveUpdateRateMs(inMuteMode ? MUTE_UPDATE_RATE_MS : NORMAL_UPDATE_RATE_MS);
if (mMute != inMuteMode) {
mMute = inMuteMode;
int alpha = inMuteMode ? MUTE_ALPHA : NORMAL_ALPHA;
mHourPaint.setAlpha(alpha);
mMinutePaint.setAlpha(alpha);
mColonPaint.setAlpha(alpha);
mAmPmPaint.setAlpha(alpha);
invalidate();
}
}
示例4: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "onInterruptionFilterChanged: " + interruptionFilter);
}
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE;
// We only need to update once a minute in mute mode.
setInteractiveUpdateRateMs(inMuteMode ? MUTE_UPDATE_RATE_MS : NORMAL_UPDATE_RATE_MS);
if (mMute != inMuteMode) {
mMute = inMuteMode;
updateWatchFaceStyle();
invalidate();
}
}
示例5: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
if (mMute != inMuteMode) {
mMute = inMuteMode;
mHourPaint.setAlpha(inMuteMode ? 100 : 255);
mMinutePaint.setAlpha(inMuteMode ? 100 : 255);
mSecondPaint.setAlpha(inMuteMode ? 80 : 255);
invalidate();
}
}
示例6: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
if (mMute != inMuteMode) {
mMute = inMuteMode;
invalidate();
}
}
示例7: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
LOGD(TAG, "onInterruptionFilterChanged: " + interruptionFilter);
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE;
if (mMute != inMuteMode) {
mMute = inMuteMode;
updateWatchFaceStyle();
postInvalidate();
}
}
示例8: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged( int interruptionFilter ) {
super.onInterruptionFilterChanged( interruptionFilter );
boolean inMuteMode = ( interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE );
if ( mMute != inMuteMode ) {
mMute = inMuteMode;
mHourPaint.setAlpha(inMuteMode ? 100 : 255);
mMinutePaint.setAlpha(inMuteMode ? 100 : 255);
mSecondPaint.setAlpha(inMuteMode ? 80 : 255);
invalidate();
}
}
示例9: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
if (mute != inMuteMode) {
mute = inMuteMode;
allFill.setAlpha(inMuteMode ? 100 : 255);
secondFill.setAlpha(inMuteMode ? 80 : 255);
invalidate();
}
}
示例10: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
if (mute == inMuteMode)
return;
mute = inMuteMode;
invalidate();
}
示例11: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
if (mMute != inMuteMode) {
mMute = inMuteMode;
mHourPaint.setAlpha(inMuteMode ? 100 : 255);
mMinutePaint.setAlpha(inMuteMode ? 100 : 255);
mSecondPaint.setAlpha(inMuteMode ? 80 : 255);
invalidate();
}
}
示例12: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
if (mMute != inMuteMode) {
mMute = inMuteMode;
mHourPaint.setAlpha(inMuteMode ? 100 : 255);
mHandPaint.setAlpha(inMuteMode ? 100 : 255);
mCurrentHourPaint.setAlpha(inMuteMode ? 80 : 255);
mUTCLabelPaint.setAlpha(inMuteMode ? 80 : 180);
invalidate();
}
}
示例13: onInterruptionFilterChanged
@Override
public void onInterruptionFilterChanged(int interruptionFilter) {
super.onInterruptionFilterChanged(interruptionFilter);
boolean inMuteMode = (interruptionFilter == WatchFaceService.INTERRUPTION_FILTER_NONE);
/* Dim display in mute mode. */
if (mMuteMode != inMuteMode) {
mMuteMode = inMuteMode;
mHourPaint.setAlpha(inMuteMode ? 100 : 255);
mMinutePaint.setAlpha(inMuteMode ? 100 : 255);
mSecondAndHighlightPaint.setAlpha(inMuteMode ? 80 : 255);
invalidate();
}
}
示例14: onCreate
@Override
public void onCreate(SurfaceHolder holder) {
super.onCreate(holder);
FirebaseAnalytics.getInstance(MuzeiWatchFace.this).logEvent("watchface_created", null);
mMute = getInterruptionFilter() == WatchFaceService.INTERRUPTION_FILTER_NONE;
SharedPreferences preferences =
PreferenceManager.getDefaultSharedPreferences(MuzeiWatchFace.this);
mBlurred = preferences.getBoolean(BLURRED_PREF_KEY, false);
updateWatchFaceStyle();
mCalendar = Calendar.getInstance();
mClockMargin = getResources().getDimension(R.dimen.clock_margin);
mDateMinAvailableMargin = getResources().getDimension(R.dimen.date_min_available_margin);
mBackgroundPaint = new Paint();
mBackgroundPaint.setColor(Color.BLACK);
mHeavyTypeface = ResourcesCompat.getFont(MuzeiWatchFace.this, R.font.nunito_clock_bold);
mLightTypeface = ResourcesCompat.getFont(MuzeiWatchFace.this, R.font.nunito_clock_regular);
float densityMultiplier = getResources().getDisplayMetrics().density;
mClockPaint = new Paint();
mClockPaint.setColor(Color.WHITE);
mClockPaint.setShadowLayer(
1f * densityMultiplier, 0, 0.5f * densityMultiplier, 0xcc000000);
mClockPaint.setAntiAlias(true);
mClockPaint.setTypeface(mHeavyTypeface);
// Square watch face as defaults, will be changed in onApplyWindowInsets() if needed
mClockPaint.setTextAlign(Paint.Align.RIGHT);
mClockPaint.setTextSize(getResources().getDimension(R.dimen.clock_text_size));
recomputeClockTextHeight();
mClockAmbientShadowPaint = new Paint(mClockPaint);
mClockAmbientShadowPaint.setColor(Color.TRANSPARENT);
mClockAmbientShadowPaint.setShadowLayer(
6f * densityMultiplier, 0, 2f * densityMultiplier,
0x66000000);
mDatePaint = new Paint();
mDatePaint.setColor(Color.WHITE);
mDatePaint.setShadowLayer(
1f * densityMultiplier, 0, 0.5f * densityMultiplier, 0xcc000000);
mDatePaint.setAntiAlias(true);
mDatePaint.setTypeface(mLightTypeface);
// Square watch face as defaults, will be changed in onApplyWindowInsets() if needed
mDatePaint.setTextAlign(Paint.Align.RIGHT);
mDatePaint.setTextSize(getResources().getDimension(R.dimen.date_text_size));
recomputeDateTextHeight();
mDateAmbientShadowPaint = new Paint(mDatePaint);
mDateAmbientShadowPaint.setColor(Color.TRANSPARENT);
mDateAmbientShadowPaint.setShadowLayer(
4f * densityMultiplier, 0, 2f * densityMultiplier,
0x66000000);
recomputeDateFormat();
}