Home | History | Annotate | Download | only in launcher3

Lines Matching full:cling

59     /** Initializes a cling */
60 private Cling initCling(int clingId, int scrimId, boolean animate,
62 Cling cling = (Cling) mLauncher.findViewById(clingId);
67 if (cling != null) {
68 cling.init(mLauncher, scrim);
69 cling.show(animate, SHOW_CLING_DURATION);
72 cling.setSystemUiVisibility(cling.getSystemUiVisibility() |
76 return cling;
110 /** Returns whether the folder cling is visible. */
112 Cling cling = (Cling) mLauncher.findViewById(R.id.folder_cling);
113 if (cling != null) {
114 return cling.getVisibility() == View.VISIBLE;
120 Cling cling = (Cling) mLauncher.findViewById(R.id.workspace_cling);
121 boolean customCling = cling.getDrawIdentifier().equals("workspace_custom");
131 /** Updates the first run cling custom content hint */
132 private void setCustomContentHintVisibility(Cling cling, String ccHintStr, boolean visible,
134 final TextView ccHint = (TextView) cling.findViewById(R.id.custom_content_hint);
166 /** Updates the first run cling custom content hint */
168 Cling cling = (Cling) mLauncher.findViewById(R.id.first_run_cling);
173 if (cling != null) {
174 setCustomContentHintVisibility(cling, ccHintStr, true, true);
178 if (cling != null) {
179 setCustomContentHintVisibility(cling, ccHintStr, false, true);
184 /** Updates the first run cling search bar hint. */
186 Cling cling = (Cling) mLauncher.findViewById(R.id.first_run_cling);
187 if (cling != null && cling.getVisibility() == View.VISIBLE && !hint.isEmpty()) {
188 TextView sbHint = (TextView) cling.findViewById(R.id.search_bar_hint);
207 * Shows the first run cling.
214 Cling cling = (Cling) mLauncher.findViewById(R.id.first_run_cling);
215 if (cling != null) {
219 TextView sbHint = (TextView) cling.findViewById(R.id.search_bar_hint);
223 setCustomContentHintVisibility(cling, ccHintStr, true, false);
232 * Shows the migration cling.
240 Cling c = initCling(R.id.migration_cling, 0, false, true);
249 Cling c = initCling(R.id.migration_workspace_cling, 0, false, true);
262 Cling c = initCling(R.id.workspace_cling, 0, false, true);
276 public Cling showFoldersCling() {
282 Cling cling = initCling(R.id.folder_cling, R.id.cling_scrim,
288 cling.setOpenFolderRect(openFolderRect);
291 return cling;
312 /** Removes the cling outright from the DragLayer */
314 final View cling = mLauncher.findViewById(id);
315 if (cling != null) {
316 final ViewGroup parent = (ViewGroup) cling.getParent();
320 parent.removeView(cling);
327 /** Hides the specified Cling */
328 private void dismissCling(final Cling cling, final Runnable postAnimationCb,
331 // the cling is directly set to GONE before dismissing it.
332 if (cling != null && cling.getVisibility() != View.GONE) {
335 cling.cleanup();
347 cling.hide(duration, cleanUpClingCb);
352 cling.setSystemUiVisibility(cling.getSystemUiVisibility() &
359 Cling cling = (Cling) mLauncher.findViewById(R.id.first_run_cling);
362 // Show the workspace cling next
366 dismissCling(cling, cb, FIRST_RUN_CLING_DISMISSED_KEY,
369 // Fade out the search bar for the workspace cling coming up
377 Cling cling = (Cling) mLauncher.findViewById(R.id.migration_cling);
380 // Show the migration workspace cling next
384 dismissCling(cling, cb, MIGRATION_CLING_DISMISSED_KEY,
391 private void dismissAnyWorkspaceCling(Cling cling, String key, View v) {
400 dismissCling(cling, cb, key, DISMISS_CLING_DURATION, true);
414 // Set the flag to skip the folder cling
421 // Disable the migration cling
432 // Disable the migration cling
437 Cling cling = (Cling) mLauncher.findViewById(R.id.migration_workspace_cling);
438 dismissAnyWorkspaceCling(cling, MIGRATION_WORKSPACE_CLING_DISMISSED_KEY, v);
442 Cling cling = (Cling) mLauncher.findViewById(R.id.workspace_cling);
443 dismissAnyWorkspaceCling(cling, WORKSPACE_CLING_DISMISSED_KEY, v);
447 Cling cling = (Cling) mLauncher.findViewById(R.id.folder_cling);
448 dismissCling(cling, null, FOLDER_CLING_DISMISSED_KEY,