From 5f43eda03a78b95e1eb7239eb6dbab22b94f3f5c Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 10 Feb 2012 17:33:08 -0800 Subject: [PATCH] Restyled the next button in welcome walkthrough --- astrid/res/layout/welcome_walkthrough.xml | 67 +++++++++++-------- .../layout/welcome_walkthrough_login_page.xml | 2 +- .../res/layout/welcome_walkthrough_page.xml | 55 ++++----------- .../welcome/tutorial/ViewPagerAdapter.java | 36 ---------- 4 files changed, 53 insertions(+), 107 deletions(-) diff --git a/astrid/res/layout/welcome_walkthrough.xml b/astrid/res/layout/welcome_walkthrough.xml index 48265dd26..77db7f47b 100755 --- a/astrid/res/layout/welcome_walkthrough.xml +++ b/astrid/res/layout/welcome_walkthrough.xml @@ -1,37 +1,50 @@ - - + android:layout_height="fill_parent"> - - - - + android:layout_height="fill_parent"> + + + + + + + \ No newline at end of file diff --git a/astrid/res/layout/welcome_walkthrough_login_page.xml b/astrid/res/layout/welcome_walkthrough_login_page.xml index f5d7da4d5..5eee9e866 100644 --- a/astrid/res/layout/welcome_walkthrough_login_page.xml +++ b/astrid/res/layout/welcome_walkthrough_login_page.xml @@ -5,7 +5,7 @@ android:layout_height="fill_parent" android:paddingLeft="4dip" android:paddingRight="4dip" - android:background="@drawable/welcome_walkthrough_fabric" + android:background="#d0d0d0" android:orientation="vertical"> + android:background="#d0d0d0"> - - - - - - - - - - - + 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" /> \ No newline at end of file diff --git a/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java b/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java index af517936e..cd632f27c 100644 --- a/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java +++ b/astrid/src/com/todoroo/astrid/welcome/tutorial/ViewPagerAdapter.java @@ -7,7 +7,6 @@ import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; -import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.ImageView; @@ -86,41 +85,6 @@ public class ViewPagerAdapter extends PagerAdapter implements TitleProvider WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT)); - View back = pageView.findViewById(R.id.back); - View next = pageView.findViewById(R.id.next); - - if (back != null) { - back.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - if (v.getVisibility() == View.VISIBLE) { - ((ViewPager) pager).setCurrentItem(position -1, true); - } - } - }); - - if (position == 0) { - back.setVisibility(View.INVISIBLE); - } - } - - if (next != null) { - next.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - if (v.getVisibility() == View.VISIBLE) { - ((ViewPager) pager).setCurrentItem(position + 1, true); - } - } - }); - - if (position == layouts.length - 1) { - next.setVisibility(View.INVISIBLE); - } - } - - - if (pageView.findViewById(R.id.welcome_walkthrough_image) != null) { ImageView imageView = (ImageView) pageView.findViewById(R.id.welcome_walkthrough_image); imageView.setImageResource(images[position]);