diff options
author | Winson Chung <winsonc@google.com> | 2011-07-27 10:53:39 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-07-27 14:34:03 -0700 |
commit | a6427b15c18d5b8f3078f553d78f8432de9f46e9 (patch) | |
tree | ed68bedc3480ecd3212242bcba61f6af9e7a533e /src/com/android/launcher2/InfoDropTarget.java | |
parent | 2f84ef259314b0bef20f6e7e503377212fadc88c (diff) | |
download | android_packages_apps_Trebuchet-a6427b15c18d5b8f3078f553d78f8432de9f46e9.tar.gz android_packages_apps_Trebuchet-a6427b15c18d5b8f3078f553d78f8432de9f46e9.tar.bz2 android_packages_apps_Trebuchet-a6427b15c18d5b8f3078f553d78f8432de9f46e9.zip |
Fixing minor bugs (5085316, 5082963, 5042828)
- Adding separator between qsb and workspace content
- Adding a bit of spacing between drawables and text in all apps
- Making the drop target area smaller...
Change-Id: I1bebe7dff20fc30e4896de1dcf23d23b62a31a07
Diffstat (limited to 'src/com/android/launcher2/InfoDropTarget.java')
-rw-r--r-- | src/com/android/launcher2/InfoDropTarget.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/com/android/launcher2/InfoDropTarget.java b/src/com/android/launcher2/InfoDropTarget.java index 3507181e2..dba845b04 100644 --- a/src/com/android/launcher2/InfoDropTarget.java +++ b/src/com/android/launcher2/InfoDropTarget.java @@ -26,7 +26,7 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.TransitionDrawable; import android.util.AttributeSet; import android.view.View; -import android.widget.TextView; +import android.view.ViewGroup; import com.android.launcher.R; @@ -48,22 +48,21 @@ public class InfoDropTarget extends ButtonDropTarget { protected void onFinishInflate() { super.onFinishInflate(); - mText = (TextView) findViewById(R.id.info_target_text); - mOriginalTextColor = mText.getTextColors(); + mOriginalTextColor = getTextColors(); // Get the hover color Resources r = getResources(); mHoverColor = r.getColor(R.color.info_target_hover_tint); mHoverPaint.setColorFilter(new PorterDuffColorFilter( mHoverColor, PorterDuff.Mode.SRC_ATOP)); - mDrawable = (TransitionDrawable) mText.getCompoundDrawables()[0]; + mDrawable = (TransitionDrawable) getCompoundDrawables()[0]; mDrawable.setCrossFadeEnabled(true); // Remove the text in the Phone UI in landscape int orientation = getResources().getConfiguration().orientation; if (orientation == Configuration.ORIENTATION_LANDSCAPE) { if (!LauncherApplication.isScreenLarge()) { - mText.setText(""); + setText(""); } } } @@ -100,8 +99,8 @@ public class InfoDropTarget extends ButtonDropTarget { mActive = isVisible; mDrawable.resetTransition(); - mText.setTextColor(mOriginalTextColor); - setVisibility(isVisible ? View.VISIBLE : View.GONE); + setTextColor(mOriginalTextColor); + ((ViewGroup) getParent()).setVisibility(isVisible ? View.VISIBLE : View.GONE); } @Override @@ -114,7 +113,7 @@ public class InfoDropTarget extends ButtonDropTarget { super.onDragEnter(d); mDrawable.startTransition(mTransitionDuration); - mText.setTextColor(mHoverColor); + setTextColor(mHoverColor); } public void onDragExit(DragObject d) { @@ -122,7 +121,7 @@ public class InfoDropTarget extends ButtonDropTarget { if (!d.dragComplete) { mDrawable.resetTransition(); - mText.setTextColor(mOriginalTextColor); + setTextColor(mOriginalTextColor); } } } |