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


Java Advanceable类代码示例

本文整理汇总了Java中android.widget.Advanceable的典型用法代码示例。如果您正苦于以下问题:Java Advanceable类的具体用法?Java Advanceable怎么用?Java Advanceable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: checkIfAutoAdvance

import android.widget.Advanceable; //导入依赖的package包/类
private void checkIfAutoAdvance() {
    boolean isAutoAdvance = false;
    Advanceable target = getAdvanceable();
    if (target != null) {
        isAutoAdvance = true;
        target.fyiWillBeAdvancedByHostKThx();
    }

    boolean wasAutoAdvance = sAutoAdvanceWidgetIds.indexOfKey(getAppWidgetId()) >= 0;
    if (isAutoAdvance != wasAutoAdvance) {
        if (isAutoAdvance) {
            sAutoAdvanceWidgetIds.put(getAppWidgetId(), true);
        } else {
            sAutoAdvanceWidgetIds.delete(getAppWidgetId());
        }
        maybeRegisterAutoAdvance();
    }
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:19,代码来源:LauncherAppWidgetHostView.java

示例2: getAdvanceable

import android.widget.Advanceable; //导入依赖的package包/类
private Advanceable getAdvanceable() {
    AppWidgetProviderInfo info = getAppWidgetInfo();
    if (info == null || info.autoAdvanceViewId == NO_ID || !mIsAttachedToWindow) {
        return null;
    }
    View v = findViewById(info.autoAdvanceViewId);
    return (v instanceof Advanceable) ? (Advanceable) v : null;
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:9,代码来源:LauncherAppWidgetHostView.java

示例3: runAutoAdvance

import android.widget.Advanceable; //导入依赖的package包/类
private void runAutoAdvance() {
    Advanceable target = getAdvanceable();
    if (target != null) {
        target.advance();
    }
    scheduleNextAdvance();
}
 
开发者ID:enricocid,项目名称:LaunchEnr,代码行数:8,代码来源:LauncherAppWidgetHostView.java

示例4: addWidgetToAutoAdvanceIfNeeded

import android.widget.Advanceable; //导入依赖的package包/类
private void addWidgetToAutoAdvanceIfNeeded(View hostView, AppWidgetProviderInfo appWidgetInfo) {
    if (appWidgetInfo == null || appWidgetInfo.autoAdvanceViewId == -1) return;
    View v = hostView.findViewById(appWidgetInfo.autoAdvanceViewId);
    if (v instanceof Advanceable) {
        mWidgetsToAdvance.put(hostView, appWidgetInfo);
        ((Advanceable) v).fyiWillBeAdvancedByHostKThx();
        updateAutoAdvanceState();
    }
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:10,代码来源:Launcher.java

示例5: addWidgetToAutoAdvanceIfNeeded

import android.widget.Advanceable; //导入依赖的package包/类
void addWidgetToAutoAdvanceIfNeeded(View hostView, AppWidgetProviderInfo appWidgetInfo) {
    if (appWidgetInfo == null || appWidgetInfo.autoAdvanceViewId == -1) return;
    View v = hostView.findViewById(appWidgetInfo.autoAdvanceViewId);
    if (v instanceof Advanceable) {
        mWidgetsToAdvance.put(hostView, appWidgetInfo);
        ((Advanceable) v).fyiWillBeAdvancedByHostKThx();
        updateAutoAdvanceState();
    }
}
 
开发者ID:Mr-lin930819,项目名称:SimplOS,代码行数:10,代码来源:Launcher.java

示例6: addWidgetToAutoAdvanceIfNeeded

import android.widget.Advanceable; //导入依赖的package包/类
void addWidgetToAutoAdvanceIfNeeded(View hostView,
		AppWidgetProviderInfo appWidgetInfo) {
	if (appWidgetInfo == null || appWidgetInfo.autoAdvanceViewId == -1)
		return;
	View v = hostView.findViewById(appWidgetInfo.autoAdvanceViewId);
	if (v instanceof Advanceable) {
		mWidgetsToAdvance.put(hostView, appWidgetInfo);
		((Advanceable) v).fyiWillBeAdvancedByHostKThx();
		updateRunning();
	}
}
 
开发者ID:Phonemetra,项目名称:TurboLauncher,代码行数:12,代码来源:Launcher.java

示例7: addWidgetToAutoAdvanceIfNeeded

import android.widget.Advanceable; //导入依赖的package包/类
void addWidgetToAutoAdvanceIfNeeded(View hostView, AppWidgetProviderInfo appWidgetInfo) {
    if (appWidgetInfo == null || appWidgetInfo.autoAdvanceViewId == -1) return;
    View v = hostView.findViewById(appWidgetInfo.autoAdvanceViewId);
    if (v instanceof Advanceable) {
        mWidgetsToAdvance.put(hostView, appWidgetInfo);
        ((Advanceable) v).fyiWillBeAdvancedByHostKThx();
        updateRunning();
    }
}
 
开发者ID:AndroidDeveloperLB,项目名称:LB-Launcher,代码行数:10,代码来源:Launcher.java


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