diff --git a/astrid/res/values/keys.xml b/astrid/res/values/keys.xml index c29987055..7ad0a63d2 100644 --- a/astrid/res/values/keys.xml +++ b/astrid/res/values/keys.xml @@ -328,6 +328,7 @@ showed_collaborators_help showed_when_shortcut showed_when_row + tutorial diff --git a/astrid/res/values/strings-welcome.xml b/astrid/res/values/strings-welcome.xml index 5fb8476d2..38c36c9eb 100644 --- a/astrid/res/values/strings-welcome.xml +++ b/astrid/res/values/strings-welcome.xml @@ -3,6 +3,8 @@ Accept EULA to get started! + Show Tutorial + Welcome to Astrid! Make lists Share lists @@ -11,6 +13,8 @@ Discover Connect now\nto get started! + That\'s it! + 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! @@ -19,4 +23,6 @@ Additional features,\nproductivity tips, and\nsuggestions from friends Login + Tap Astrid to return. + \ No newline at end of file diff --git a/astrid/res/xml/preferences.xml b/astrid/res/xml/preferences.xml index 656fc2d26..03ff2e753 100644 --- a/astrid/res/xml/preferences.xml +++ b/astrid/res/xml/preferences.xml @@ -3,8 +3,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/EPr_title"> - - + + + = V3_9_2 && from < V3_9_2_2) { - newVersionString(changeLog, "3.9.2.2", new String[] { - "Reduced APK size", - "Fixed bugs with Google Task sync", - }); - } - - if (from < V3_9_2) { - newVersionString(changeLog, "3.9.2 (01/13/12)", new String[] { - "Made selecting dates and times easier:", - "New tutorial walkthrough for new users", - "Stomped on a few bugs", + newVersionString(changeLog, "3.9.2.2 (1/19/12)", new String[] { + "Astrid now recognizes words like 'tomorrow', 'monday', '!!!' and '2 pm' to set date and importance", + "New tutorial walkthrough for new users. Access it from the settings menu!", + "Reduced APK size", + "Minor UI tweaks, bug fixes", "Feedback welcomed!" }); } @@ -192,7 +186,7 @@ public final class UpgradeService { if (from >= V3_9_1 && from < V3_9_1_1) { newVersionString(changeLog, "3.9.1.1 (01/06/12)", new String[] { "Fixed a few bugs:", - " Crash when selecting certain lists", + " Crash when selecting certain lists", " Some lists not displayed", " Wrong text color when assigning tasks in Night theme" }); diff --git a/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java b/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java index 2089ea5ab..6d6139543 100644 --- a/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java +++ b/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java @@ -13,6 +13,9 @@ import android.widget.ImageView; import android.widget.TextView; import com.timsu.astrid.R; +import com.todoroo.andlib.service.Autowired; +import com.todoroo.andlib.service.DependencyInjectionService; +import com.todoroo.astrid.actfm.sync.ActFmPreferenceService; import com.viewpagerindicator.TitleProvider; public class ViewPagerAdapter extends PagerAdapter implements TitleProvider @@ -60,10 +63,20 @@ public class ViewPagerAdapter extends PagerAdapter implements TitleProvider }; private final Context context; public WelcomeWalkthrough parent; + @Autowired ActFmPreferenceService actFmPreferenceService; - public ViewPagerAdapter( Context context ) + public ViewPagerAdapter( Context context, boolean manual) { this.context = context; + DependencyInjectionService.getInstance().inject(this); + + if(manual) { + layouts[layouts.length - 1] = R.layout.welcome_walkthrough_page; + title[title.length - 1] = R.string.welcome_title_7_return; + images[images.length - 1] = R.drawable.welcome_walkthrough_1; + body[body.length - 1] = R.string.welcome_body_7_return; + } + } @@ -81,14 +94,15 @@ public class ViewPagerAdapter extends PagerAdapter implements TitleProvider View pageView = inflater.inflate(layouts[position], null, true); pageView.setLayoutParams( new ViewGroup.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT)); - if (position != getCount()-1){ - ImageView imageView = (ImageView) pageView.findViewById(R.id.welcome_walkthrough_image); - imageView.setImageResource(images[position]); + if (pageView.findViewById(R.id.welcome_walkthrough_image) != null) { + ImageView imageView = (ImageView) pageView.findViewById(R.id.welcome_walkthrough_image); + imageView.setImageResource(images[position]); + + TextView titleView = (TextView) pageView.findViewById(R.id.welcome_walkthrough_title); + titleView.setText(title[position]); - TextView titleView = (TextView) pageView.findViewById(R.id.welcome_walkthrough_title); - titleView.setText(title[position]); - TextView bodyView = (TextView) pageView.findViewById(R.id.welcome_walkthrough_body); - bodyView.setText(body[position]); + TextView bodyView = (TextView) pageView.findViewById(R.id.welcome_walkthrough_body); + bodyView.setText(body[position]); } ((ViewPager)pager).addView( pageView, 0 ); diff --git a/astrid/src/com/todoroo/astrid/welcome/tutorial/WelcomeWalkthrough.java b/astrid/src/com/todoroo/astrid/welcome/tutorial/WelcomeWalkthrough.java index 169423aef..31737a1d8 100644 --- a/astrid/src/com/todoroo/astrid/welcome/tutorial/WelcomeWalkthrough.java +++ b/astrid/src/com/todoroo/astrid/welcome/tutorial/WelcomeWalkthrough.java @@ -31,12 +31,14 @@ public class WelcomeWalkthrough extends ActFmLoginActivity { public static final String KEY_SHOWED_WELCOME_LOGIN = "key_showed_welcome_login"; //$NON-NLS-1$ + public static final String TOKEN_MANUAL_SHOW = "manual"; //$NON-NLS-1$ + @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); super.onCreate(savedInstanceState); - mAdapter = new ViewPagerAdapter(this); + mAdapter = new ViewPagerAdapter(this, getIntent().hasExtra(TOKEN_MANUAL_SHOW)); mAdapter.parent = this; mPager = (ViewPager)findViewById(R.id.pager); @@ -44,6 +46,7 @@ public class WelcomeWalkthrough extends ActFmLoginActivity { mIndicator = (CirclePageIndicator)findViewById(R.id.indicator); mIndicator.setViewPager(mPager); + } @Override protected int getContentViewResource() { @@ -68,10 +71,22 @@ public class WelcomeWalkthrough extends ActFmLoginActivity { protected void initializeUI() { if(mAdapter == null) return; - if(currentPage == mAdapter.getCount()-1){ - super.initializeUI(); - setupTermsOfService(); - setupLoginLater(); + if(currentPage == mAdapter.getCount()-1) { + if(findViewById(R.id.fb_login) != null) { + super.initializeUI(); + setupTermsOfService(); + setupLoginLater(); + } else { + OnClickListener done = new OnClickListener() { + @Override + public void onClick(View arg0) { + finish(); + } + }; + currentView.findViewById(R.id.welcome_walkthrough_title).setOnClickListener(done); + currentView.findViewById(R.id.welcome_walkthrough_image).setOnClickListener(done); + } + } } @@ -106,12 +121,6 @@ public class WelcomeWalkthrough extends ActFmLoginActivity { Button pwLogin = (Button) findViewById(R.id.pw_login); pwLogin.setOnClickListener(signUpListener); } - /* - protected void setupWalkthroughLogin() { - Button loginButton = (Button)currentView.findViewById(R.id.walkthrough_login); - loginButton.setOnClickListener(showWalkthroughLoginListener); - }*/ - protected void setupLoginLater() { TextView loginLater = (TextView)currentView.findViewById(R.id.login_later);