Prep for new popover images and layout improvements

pull/14/head
Sam Bosley 13 years ago
parent fbbe9bd9d5
commit ba8749c911

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
** Copyright (c) 2012 Todoroo Inc
**
** See the file "LICENSE" for the full license governing this code.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:id="@+id/gdi_message"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/gdi_arrow_up"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="18sp"
android:textStyle="bold"
android:background="@drawable/popover_bg"
android:fadingEdgeLength="0dp"/>
<ImageView
android:id="@+id/gdi_arrow_up"
android:layout_marginBottom="-13dip"
android:layout_width="27dip"
android:layout_height="27dip"
android:scaleType="fitCenter"
android:src="@drawable/popover_arrow_up" />
<ImageView
android:id="@+id/gdi_arrow_down"
android:layout_width="27dip"
android:layout_height="27dip"
android:scaleType="fitCenter"
android:layout_below="@id/gdi_message"
android:layout_marginTop="-13dip"
android:src="@drawable/popover_arrow_down" />
</RelativeLayout>

@ -11,7 +11,7 @@
<TextView
android:id="@+id/gdi_message"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/gdi_arrow_up"
android:gravity="center"
@ -23,7 +23,7 @@
<ImageView
android:id="@+id/gdi_arrow_up"
android:layout_marginBottom="-17dip"
android:layout_marginBottom="-18dip"
android:layout_width="27dip"
android:layout_height="27dip"
android:scaleType="fitCenter"
@ -35,7 +35,7 @@
android:layout_height="27dip"
android:scaleType="fitCenter"
android:layout_below="@id/gdi_message"
android:layout_marginTop="-17dip"
android:layout_marginTop="-18dip"
android:src="@drawable/popover_arrow_down" />
</RelativeLayout>

@ -14,7 +14,6 @@ import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;
@ -35,7 +34,7 @@ public class HelpInfoPopover extends QuickActionWidget {
if (dismissListener != null) {
toShow.setOnDismissListener(dismissListener);
}
parent.post(new Runnable() {
parent.postDelayed(new Runnable() {
@Override
public void run() {
try {
@ -44,7 +43,7 @@ public class HelpInfoPopover extends QuickActionWidget {
//Activity wasn't running or something like that
}
}
});
}, 250);
return toShow;
}
@ -67,6 +66,7 @@ public class HelpInfoPopover extends QuickActionWidget {
return mRect.width() / 2;
}
@Override
protected int getShowAtX() {
return mRect.left;
}
@ -74,8 +74,7 @@ public class HelpInfoPopover extends QuickActionWidget {
@Override
protected void onMeasureAndLayout(Rect anchorRect, View contentView) {
contentView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
contentView.measure(MeasureSpec.makeMeasureSpec(getScreenWidth(), MeasureSpec.EXACTLY),
ViewGroup.LayoutParams.WRAP_CONTENT);
contentView.measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
int rootHeight = contentView.getMeasuredHeight();

Loading…
Cancel
Save