本文整理汇总了Java中android.support.v17.leanback.widget.GuidedAction.setChecked方法的典型用法代码示例。如果您正苦于以下问题:Java GuidedAction.setChecked方法的具体用法?Java GuidedAction.setChecked怎么用?Java GuidedAction.setChecked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v17.leanback.widget.GuidedAction
的用法示例。
在下文中一共展示了GuidedAction.setChecked方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addCheckedAction
import android.support.v17.leanback.widget.GuidedAction; //导入方法依赖的package包/类
/**
* Helper function to add checked Action to this fragment
* <p>
* In this fragment, the checked action is customized as checkbox
*/
private static void addCheckedAction(List<GuidedAction> actions,
int iconResId,
Context context,
String title,
String desc,
int id,
boolean isActionChecked) {
GuidedAction guidedAction = new GuidedAction.Builder(context)
.title(title)
.description(desc)
.checkSetId(GuidedAction.CHECKBOX_CHECK_SET_ID)
.icon(context.getResources().getDrawable(iconResId))
.build();
guidedAction.setId(id);
/**
* Set checkbox status to false initially
*/
guidedAction.setChecked(isActionChecked);
actions.add(guidedAction);
}
示例2: addCheckedAction
import android.support.v17.leanback.widget.GuidedAction; //导入方法依赖的package包/类
private static void addCheckedAction(List<GuidedAction> actions, int iconResId, Context context,
String title, String desc, boolean checked) {
GuidedAction guidedAction = new GuidedAction.Builder()
.title(title)
.description(desc)
.checkSetId(OPTION_CHECK_SET_ID)
.iconResourceId(iconResId, context)
.build();
guidedAction.setChecked(checked);
actions.add(guidedAction);
}
示例3: updateActions
import android.support.v17.leanback.widget.GuidedAction; //导入方法依赖的package包/类
private void updateActions() {
boolean shouldAutoLoop = mPreferencesHelper.getShouldAutoLoop();
List<GuidedAction> actions = getActions();
for (int i = 0; i < actions.size(); i++) {
GuidedAction action = actions.get(i);
action.setChecked((action.getId() == ENABLED) == shouldAutoLoop);
}
}
示例4: addCheckedAction
import android.support.v17.leanback.widget.GuidedAction; //导入方法依赖的package包/类
private static void addCheckedAction(List<GuidedAction> actions, long id,
String title, String desc, boolean checked) {
GuidedAction guidedAction = new GuidedAction.Builder()
.id(id)
.title(title)
.description(desc)
.checkSetId(OPTION_CHECK_SET_ID)
.build();
guidedAction.setChecked(checked);
actions.add(guidedAction);
}
示例5: addCheckedAction
import android.support.v17.leanback.widget.GuidedAction; //导入方法依赖的package包/类
private static void addCheckedAction(List<GuidedAction> actions, int iconResId, Context context,
String title, String desc, boolean checked) {
GuidedAction guidedAction = new GuidedAction.Builder()
.title(title)
.description(desc)
.checkSetId(OPTION_CHECK_SET_ID)
.iconResourceId(iconResId, context)
.build();
guidedAction.setChecked(checked);
actions.add(guidedAction);
}