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

@ -74,11 +74,6 @@
<!-- String formatter for Disable button --> <!-- String formatter for Disable button -->
<string name="WID_disableButton">Disable</string> <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>
<!-- ============================================================= notes --> <!-- ============================================================= notes -->
<!-- Note Exposer --> <!-- Note Exposer -->

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

Loading…
Cancel
Save