Layout adjustments to work with new arrow images

pull/14/head
Sam Bosley 12 years ago
parent 87d6f4fea2
commit 79acc329b7

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,41 @@
<?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="wrap_content"
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="-18dip"
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="-19dip"
android:src="@drawable/popover_arrow_down" />
</RelativeLayout>

@ -23,7 +23,7 @@
<ImageView
android:id="@+id/gdi_arrow_up"
android:layout_marginBottom="-18dip"
android:layout_marginBottom="-15dip"
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="-18dip"
android:layout_marginTop="-16dip"
android:src="@drawable/popover_arrow_down" />
</RelativeLayout>

@ -19,10 +19,10 @@
<string name="help_popover_list_settings">Tap to edit or share this list</string>
<!-- slide 26c: Shown the first time a user sees the list settings tab -->
<string name="help_popover_collaborators">People you share with can help you build your list or finish tasks</string>
<string name="help_popover_collaborators">People you share with can help\nyou build your list or finish tasks</string>
<!-- Shown after user adds a task on tablet-->
<string name="help_popover_add_lists">Tap add a list</string>
<string name="help_popover_add_lists">Tap to add a list</string>
<!-- Shown after a user adds a task on phones -->
<string name="help_popover_switch_lists">Tap to add a list or switch between lists</string>

@ -19,6 +19,7 @@ import android.widget.FrameLayout;
import android.widget.TextView;
import com.timsu.astrid.R;
import com.todoroo.astrid.utility.AstridPreferences;
/**
* Displays a popover with some help text for first time users.
@ -47,6 +48,8 @@ public class HelpInfoPopover extends QuickActionWidget {
return toShow;
}
private final boolean tablet;
private HelpInfoPopover(Context context, int textId) {
super(context);
setContentView(R.layout.help_popover);
@ -54,6 +57,7 @@ public class HelpInfoPopover extends QuickActionWidget {
message.setText(textId);
setFocusable(false);
setTouchable(true);
tablet = AstridPreferences.useTabletLayout(context);
}
@Override
@ -63,6 +67,8 @@ public class HelpInfoPopover extends QuickActionWidget {
@Override
protected int getArrowLeftMargin(View arrow) {
if (tablet)
return mRect.width() / 4;
return mRect.width() / 2;
}

Loading…
Cancel
Save