Localize welcome walkthrough strings, simplify layout

pull/14/head
Sam Bosley 14 years ago
parent 7d2a392e95
commit cf24441363

@ -2,59 +2,43 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:orientation="vertical"
android:background="@drawable/welcome_walkthrough_fabric">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<TextView
android:id="@+id/welcome_walkthrough_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="27dp"
android:gravity="center_horizontal"
android:text="Hello"
android:textColor="#444444"
android:textSize="40dip"
android:textStyle="bold"
android:shadowRadius="2"
android:shadowDy="1"
android:shadowColor="@android:color/white" />
<ImageView
android:id="@+id/welcome_walkthrough_image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/welcome_walkthrough_fabric"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/welcome_walkthrough_fabric" />
android:layout_weight="1"
android:src="@drawable/welcome_walkthrough_1"
android:scaleType="fitCenter"/>
<TextView
android:id="@+id/welcome_walkthrough_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="27dp"
android:gravity="center_horizontal"
android:text="Hello"
android:textColor="#444444"
android:textSize="40dip"
android:textStyle="bold"
android:shadowRadius="2"
android:shadowDy="1"
android:shadowColor="@android:color/white" />
<ImageView
android:id="@+id/welcome_walkthrough_image"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:src="@drawable/welcome_walkthrough_1" />
<TextView
android:id="@+id/welcome_walkthrough_body"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="75dp"
android:gravity="center_horizontal"
android:text="Hello"
android:textColor="#444444"
android:textSize="20dip"
android:textStyle="bold"
android:shadowRadius="2"
android:shadowDy="1"
android:shadowColor="@android:color/white" />
<TextView
android:id="@+id/welcome_walkthrough_body"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="75dp"
android:gravity="center_horizontal"
android:text="Hello"
android:textColor="#444444"
android:textSize="20dip"
android:textStyle="bold"
android:shadowRadius="2"
android:shadowDy="1"
android:shadowColor="@android:color/white" />
</RelativeLayout>
</LinearLayout>

@ -72,12 +72,7 @@
<string name="WID_dateButtonLabel">$D $T</string>
<!-- String formatter for Disable button -->
<string name="WID_disableButton">Disable</string>
<!-- =================================================== Welcome screen == -->
<!-- Label for DateButtons with no value -->
<string name="welcome_show_eula">Accept EULA to get started!</string>
<string name="WID_disableButton">Disable</string>
<!-- ============================================================= notes -->

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="welcome_show_eula">Accept EULA to get started!</string>
<string name="welcome_title_1">Welcome to Astrid!</string>
<string name="welcome_title_2">Make lists</string>
<string name="welcome_title_3">Share lists</string>
<string name="welcome_title_4">Divvy up tasks</string>
<string name="welcome_title_5">Provide details</string>
<string name="welcome_title_6">Discover</string>
<string name="welcome_title_7">Login</string>
<string name="welcome_body_1">The perfect personal\nto-do list that works great\nwith friends</string>
<string name="welcome_body_2">Perfect for any list:\nto read, to watch, to buy,\nto visit, to do!</string>
<string name="welcome_body_3">Share lists\nwith friends, housemates,\nor your sweetheart!</string>
<string name="welcome_body_4">Never wonder who\'s\nbringing dessert!</string>
<string name="welcome_body_5">Tap to add notes,\nset reminders,\nand much more!</string>
<string name="welcome_body_6">Additional features,\nproductivity tips, and\nsuggestions from friends</string>
<string name="welcome_body_7">Login</string>
</resources>

@ -26,25 +26,25 @@ public class ViewPagerAdapter extends PagerAdapter
R.drawable.welcome_walkthrough_6,
R.drawable.welcome_screen
};
private static String[] title = new String[]
private static int[] title = new int[]
{
"Welcome to Astrid!",
"Make lists",
"Share lists",
"Divvy up tasks",
"Provide details",
"Discover",
"Login"
R.string.welcome_title_1,
R.string.welcome_title_2,
R.string.welcome_title_3,
R.string.welcome_title_4,
R.string.welcome_title_5,
R.string.welcome_title_6,
R.string.welcome_title_7,
};
private static String[] body = new String[]
private static int[] body = new int[]
{
"The perfect personal\nto-do list that works great\nwith friends",
"Perfect for any list:\nto read, to watch, to buy,\nto visit, to do!",
"Share lists\nwith friends, housemates,\nor your sweetheart!",
"Never wonder who's\nbringing dessert!",
"Tap to add notes,\nset reminders,\nand much more!",
"Additional features,\nproductivity tips, and\nsuggestions from friends",
"Login"
R.string.welcome_body_1,
R.string.welcome_body_2,
R.string.welcome_body_3,
R.string.welcome_body_4,
R.string.welcome_body_5,
R.string.welcome_body_6,
R.string.welcome_body_7,
};
private static int[] layouts = new int[]
{
@ -83,8 +83,6 @@ public class ViewPagerAdapter extends PagerAdapter
if (position != getCount()-1){
ImageView imageView = (ImageView) pageView.findViewById(R.id.welcome_walkthrough_image);
imageView.setImageResource(images[position]);
ImageView fabricImage = (ImageView) pageView.findViewById(R.id.welcome_walkthrough_fabric);
fabricImage.setScaleType(ImageView.ScaleType.FIT_XY);
TextView titleView = (TextView) pageView.findViewById(R.id.welcome_walkthrough_title);
titleView.setText(title[position]);

Loading…
Cancel
Save