本文整理汇总了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();
}
}
示例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;
}
示例3: runAutoAdvance
import android.widget.Advanceable; //导入依赖的package包/类
private void runAutoAdvance() {
Advanceable target = getAdvanceable();
if (target != null) {
target.advance();
}
scheduleNextAdvance();
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}