diff options
author | Adam Cohen <adamcohen@google.com> | 2015-09-19 00:56:56 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-19 00:56:56 +0000 |
commit | 0d6211ce8f9a08f8865aa8b005553cee3f4ecb0c (patch) | |
tree | 32a1c917de89b967b092742b68b9f8bb2c2f544d /src/com | |
parent | 12d282736fae91cc147bc8120ac781d2acf854d3 (diff) | |
parent | ed10c013bd6f6775cd6bb834283303deed55daa7 (diff) | |
download | android_packages_apps_Trebuchet-0d6211ce8f9a08f8865aa8b005553cee3f4ecb0c.tar.gz android_packages_apps_Trebuchet-0d6211ce8f9a08f8865aa8b005553cee3f4ecb0c.tar.bz2 android_packages_apps_Trebuchet-0d6211ce8f9a08f8865aa8b005553cee3f4ecb0c.zip |
am ed10c013: am 36bde9a9: Merge "Add fake CustomContent screen for testing Launcher interface" into ub-launcher3-burnaby
* commit 'ed10c013bd6f6775cd6bb834283303deed55daa7':
Add fake CustomContent screen for testing Launcher interface
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/launcher3/testing/LauncherExtension.java | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/com/android/launcher3/testing/LauncherExtension.java b/src/com/android/launcher3/testing/LauncherExtension.java index b4d745948..c6d5ad18b 100644 --- a/src/com/android/launcher3/testing/LauncherExtension.java +++ b/src/com/android/launcher3/testing/LauncherExtension.java @@ -5,11 +5,13 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.content.ComponentName; import android.content.Intent; +import android.graphics.Color; import android.graphics.Rect; import android.os.Bundle; import android.view.Menu; import android.view.View; import android.view.ViewGroup; +import android.widget.FrameLayout; import com.android.launcher3.AppInfo; import com.android.launcher3.InsettableFrameLayout; @@ -210,13 +212,39 @@ public class LauncherExtension extends Launcher { public void startVoice() { } + CustomContentCallbacks mCustomContentCallbacks = new CustomContentCallbacks() { + + // Custom content is completely shown. {@code fromResume} indicates whether this was caused + // by a onResume or by scrolling otherwise. + public void onShow(boolean fromResume) { + } + + // Custom content is completely hidden + public void onHide() { + } + + // Custom content scroll progress changed. From 0 (not showing) to 1 (fully showing). + public void onScrollProgressChanged(float progress) { + + } + + // Indicates whether the user is allowed to scroll away from the custom content. + public boolean isScrollingAllowed() { + return true; + } + + }; + @Override public boolean hasCustomContentToLeft() { - return false; + return true; } @Override public void populateCustomContentContainer() { + FrameLayout customContent = new FrameLayout(LauncherExtension.this); + customContent.setBackgroundColor(Color.GRAY); + addToCustomContentPage(customContent, mCustomContentCallbacks, ""); } @Override @@ -281,7 +309,7 @@ public class LauncherExtension extends Launcher { @Override public boolean hasLauncherOverlay() { - return true; + return false; } @Override |