Fixing issue where landscape delete button is not centered. (Bug 6493651)

Change-Id: I782351da2daf511a79e5c9f1d3cef90bec2ca6d1
This commit is contained in:
Winson Chung committed 2012-05-15 16:38:05 -07:00
1 parent f26493f5a1
commit 947245ba8a
7 files changed
+97 -30

No files matched your search

@@ -20,6 +20,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.TextView;
@@ -68,6 +69,16 @@ public class ButtonDropTarget extends TextView implements DropTarget, DragContro
mSearchDropTargetBar = searchDropTargetBar;
}
protected Drawable getCurrentDrawable() {
Drawable[] drawables = getCompoundDrawables();
for (int i = 0; i < drawables.length; ++i) {
if (drawables[i] != null) {
return drawables[i];
}
}
return null;
}
public void onDrop(DragObject d) {
}