why was PageTurner removed?

by rukiman » Thu, 01 May 2008 09:13:44 GMT

Sponsored Links
 I see that in M3 of the SDK, the PageTurner existed which created the
page turning effect, however it is removed from M5. Why was it
removed? Is there an alternative to get this page turning effect or
will it be reintroduced in the future?

why was PageTurner removed?

by Romain Guy » Thu, 01 May 2008 09:18:34 GMT


There is no alternative to PageTurner in the current SDK and it will
not be reintroduced.

Romain Guy


Sponsored Links

why was PageTurner removed?

by rukiman » Thu, 01 May 2008 13:09:27 GMT

 Anyone know the reason behind why it was removed?


why was PageTurner removed?

by Romain Guy » Thu, 01 May 2008 15:40:53 GMT

 We removed it because this widget is not generic enough to justify the
cost of maintaining it in the Android UI framework.

Romain Guy


why was PageTurner removed?

by rukiman » Fri, 02 May 2008 00:22:54 GMT

 Thanks for the reply. Is it possible to get the source code to the
PageTurner.java ?

Also where does the source code for Android live?


why was PageTurner removed?

by rukiman » Fri, 02 May 2008 01:28:06 GMT

 Also is there an alternative way of getting the page turning effect in
Android using existing implementation?

If not, I would like your opinion on which is the best way to
implement the page turning effect. Thanks for your help.


why was PageTurner removed?

by rukiman » Fri, 02 May 2008 05:29:29 GMT

 OK I managed to get the source code by decompiling the
PageTurner.class file from the M3 SDK. But I would still like to know
if there is a correct way of doing this in the correct implementation?
Or what would be the right way of implementing this feature?


why was PageTurner removed?

by rukiman » Wed, 14 May 2008 00:37:08 GMT

 k I have managed to get a PageTurner working. Here is the code I got
to get it running. YES yes yes I know it doesnt exist in M5 SDK. But
someone who is familiar, can they look through this code and tell me
if I am using the class as it was intended. I have a few questions
with this.

1) How do I get the second view page turned, at the moment I am using
a bitmap background using setPageBackground().
2) Do I really need to addview the second page into PageTurner class.
3) Am I flipping over to the second view correctly, I am doing it in

Here is the source code, due to the PageTurner and Page parameters no
longer being recognized by the XML schema, I have had to create them

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/widget27"

<Button android:id="@+id/widget28"
android:layout_height="wrap_content" android:text="Hit me!">



package com.ruki.pageturnerdemo;

import android.app.Activity;
import android.os.Bundle;
import android.widget.*;
import android.graphics.*;
import android.view.View.OnClickListener;
import android.view.View;
import android.util.Log;

public class PageTurnerDemo extends Activity {
/** Called when the activity is first created. */

private PageTurner binder;
private Page page2;
private Page page1;
private RelativeLayout.LayoutParams linear5layout;
private static final String TAG = "RUKIDEMO";

public void onCreate(Bundle icicle) {

Log.v(TAG, "start demo");

// display the xml gui

// get reference to layout defined in xml
LinearLayout layout = (LinearLayout)

// set up click listener on button
Button b = (Button) findViewById(R.id.widget28);

// create pageturner
binder = new PageTurner(this);

// set up page1 and content
page1 = new Page(this);


TextView text1 = new TextView(this);
text1.setText("This is the content for page 1 \nblah \nblah
some content here...here is a text widget but there can be any bunch
of widgets here...blah blah");
RelativeLayout.LayoutParams linear1layout = new

Other Threads

1. Spaces in strings.xml strings

So, we're supposed to be using our strings.xml to construct most or
all of our strings, right? I had a situation where I wanted to display
to the user "Some string blah blah " + some value. So I put two views
in a horizontal LinearLayout, with my "Some string blah blah " (with
that space on the end, no quotes) in the strings.xml. I reference the
string in my first view, then set the value in the second view.
However, if I set it up like this, the space at the end of my string
gets trimmed off, which doesn't look pretty. My workaround was not to
use the strings.xml and place the "Some string blah blah " (no quotes)
directly in the android:text parameter of the TextView.

Any idea if there is a better way to do this? Or should I submit a bug
to Android about this?


2. How to create a view with a background that wraps up all the content of the view?

nvm.. I've figured it out. Instead of setting a background using an
ImageView/Button, I can just set a background to RelativeLayout and it
will fix nicely


3. Where can I find a app for my gps test?

4. video viewing problem

5. Problem with a contacts viewer

6. network redirection problem

7. RIM app store details