When an app is chosen in All Apps, tapping a workspace screen adds it to that screen.

This commit is contained in:
Patrick Dubroy
2010-09-07 17:49:27 -07:00
parent b1254a6bdb
commit 2b9ff37edb
4 changed files with 64 additions and 11 deletions
+9 -1
View File
@@ -1009,7 +1009,7 @@ public abstract class PagedView extends ViewGroup {
mChoiceMode = mode;
}
protected void endChoiceMode() {
public void endChoiceMode() {
if (!isChoiceMode(CHOICE_MODE_NONE)) {
mChoiceMode = CHOICE_MODE_NONE;
resetCheckedGrandchildren();
@@ -1059,6 +1059,14 @@ public abstract class PagedView extends ViewGroup {
return null;
}
public Object getChosenItem() {
View checkedView = (View) getSingleCheckedGrandchild();
if (checkedView != null) {
return checkedView.getTag();
}
return null;
}
protected void resetCheckedGrandchildren() {
// loop through children, and set all of their children to _not_ be checked
final ArrayList<Checkable> checked = getCheckedGrandchildren();