Home | History | Annotate | Download | only in widget

Lines Matching defs:action

82  * {@link #getItemViewType(GuidedAction)} method to change the layout used to display each action.
86 * provides a layout id for the action.
90 * <li> Override {@link #onUpdateActivatorView(ViewHolder, GuidedAction)} to update action.
145 * Default viewType that associated with default layout Id for the action item.
171 * ViewHolder caches information about the action item layouts' subviews. Subclasses of {@link
213 * Constructs an ViewHolder for sub action and caches the relevant subviews.
345 * @return True if bound action is inside {@link GuidedAction#getSubActions()}, false
353 * @return Currently bound action.
558 * Returns the VerticalGridView that displays the sub actions list of an expanded action.
559 * @return The VerticalGridView that displays the sub actions list of an expanded action.
582 * Return view type of action, each different type can have differently associated layout Id.
584 * @param action The action object.
587 public int getItemViewType(GuidedAction action) {
588 if (action instanceof GuidedDatePickerAction) {
676 * @param vh The view holder to be associated with the given action.
677 * @param action The guided action to be displayed by the view holder's view.
680 public void onBindViewHolder(ViewHolder vh, GuidedAction action) {
681 vh.mAction = action;
683 vh.mTitleView.setInputType(action.getInputType());
684 vh.mTitleView.setText(action.getTitle());
685 vh.mTitleView.setAlpha(action.isEnabled() ? mEnabledTextAlpha : mDisabledTextAlpha);
690 if (action.isEditable()) {
691 vh.mTitleView.setAutofillHints(action.getAutofillHints());
701 vh.mDescriptionView.setInputType(action.getDescriptionInputType());
702 vh.mDescriptionView.setText(action.getDescription());
703 vh.mDescriptionView.setVisibility(TextUtils.isEmpty(action.getDescription())
705 vh.mDescriptionView.setAlpha(action.isEnabled() ? mEnabledDescriptionAlpha :
711 if (action.isDescriptionEditable()) {
712 vh.mDescriptionView.setAutofillHints(action.getAutofillHints());
723 onBindCheckMarkView(vh, action);
725 setIcon(vh.mIconView, action);
727 if (action.hasMultilineDescription()) {
748 onBindActivatorView(vh, action);
751 if (action.isFocusable()) {
758 setupImeOptions(vh, action);
764 * Switches action to edit mode and pops up the keyboard.
766 public void openInEditMode(GuidedAction action) {
769 int actionIndex = guidedActionAdapter.getActions().indexOf(action);
770 if (actionIndex < 0 || !action.isEditable()) {
797 * @param vh The view holder to be associated with the given action.
798 * @param action The guided action to be displayed by the view holder's view.
800 protected void setupImeOptions(ViewHolder vh, GuidedAction action) {
816 public void setEditingMode(ViewHolder vh, GuidedAction action, boolean editing) {
818 onEditingModeChange(vh, action, editing);
836 protected void onEditingModeChange(ViewHolder vh, GuidedAction action, boolean editing) {
849 GuidedAction action = vh.getAction();
853 CharSequence editTitle = action.getEditTitle();
857 CharSequence editDescription = action.getEditDescription();
861 if (action.isDescriptionEditable()) {
864 descriptionView.setInputType(action.getDescriptionEditInputType());
867 } else if (action.isEditable()){
869 titleView.setInputType(action.getEditInputType());
878 titleView.setText(action.getTitle());
881 descriptionView.setText(action.getDescription());
885 descriptionView.setVisibility(TextUtils.isEmpty(action.getDescription())
887 descriptionView.setInputType(action.getDescriptionInputType());
891 titleView.setInputType(action.getInputType());
901 onEditingModeChange(vh, action, editing);
905 * Animates the view holder's view (or subviews thereof) when the action has had its focus
907 * @param vh The view holder associated with the relevant action.
908 * @param focused True if the action has become focused, false if it has lost focus.
916 * Animates the view holder's view (or subviews thereof) when the action has had its press
918 * @param vh The view holder associated with the relevant action.
919 * @param pressed True if the action has been pressed, false if it has been unpressed.
927 * @param vh The view holder associated with the relevant action.
934 * Animates the view holder's view (or subviews thereof) when the action has had its check state
938 * @param vh The view holder associated with the relevant action.
939 * @param checked True if the action has become checked, false if it has become unchecked.
950 * when action's checkset Id is other than {@link GuidedAction#NO_CHECK_SET}. Default
959 * @param vh The view holder associated with the relevant action.
960 * @param action The GuidedAction object to bind to.
963 public void onBindCheckMarkView(ViewHolder vh, GuidedAction action) {
964 if (action.getCheckSetId() != GuidedAction.NO_CHECK_SET) {
966 int attrId = action.getCheckSetId() == GuidedAction.CHECKBOX_CHECK_SET_ID
977 ((Checkable) vh.mCheckmarkView).setChecked(action.isChecked());
985 * Performs binding activator view value to action. Default implementation supports
988 * @param action GuidedAction to bind.
990 public void onBindActivatorView(ViewHolder vh, GuidedAction action) {
991 if (action instanceof GuidedDatePickerAction) {
992 GuidedDatePickerAction dateAction = (GuidedDatePickerAction) action;
1012 * @param action GuidedAction to update.
1015 public boolean onUpdateActivatorView(ViewHolder vh, GuidedAction action) {
1016 if (action instanceof GuidedDatePickerAction) {
1017 GuidedDatePickerAction dateAction = (GuidedDatePickerAction) action;
1068 * @param vh The view holder associated with the relevant action.
1069 * @param action The GuidedAction object to bind to.
1071 public void onBindChevronView(ViewHolder vh, GuidedAction action) {
1072 final boolean hasNext = action.hasNext();
1073 final boolean hasSubActions = action.hasSubActions();
1076 vh.mChevronView.setAlpha(action.isEnabled() ? mEnabledChevronAlpha :
1082 } else if (action == mExpandedAction) {
1181 * Expand an action. Do nothing if it is in animation or there is action expanded.
1183 * @param action Action to expand.
1186 public void expandAction(GuidedAction action, final boolean withTransition) {
1191 ((GuidedActionAdapter) getActionsGridView().getAdapter()).indexOf(action);
1210 if (action.hasSubActions()) {
1211 onUpdateSubActionsGridView(action, true);
1232 * Collapse expanded action. Do nothing if it is in animation or there is no action expanded.
1396 // an action is expanded, it takes more space which in turn kicks out some other actions
1397 // off of the screen. Once, this action is collapsed (after the second click) and the
1419 void onUpdateSubActionsGridView(GuidedAction action, boolean expand) {
1433 adapter.setActions(action.getSubActions());
1438 .indexOf(action);
1519 private boolean setIcon(final ImageView iconView, GuidedAction action) {
1522 icon = action.getIcon();
1537 * action nicely takes up the entire screen.