POONAMKASHYAP / android-page-curl

Automatically exported from code.google.com/p/android-page-curl
0 stars 0 forks source link

Errors on last version #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
On AndroidPageCurlActivity I got the PageAdapter missing class error, and 
cannot be resolved R.styleable in PageCurlView. Thx.

Original issue reported on code.google.com by AlvaroFa...@gmail.com on 19 Apr 2011 at 4:55

GoogleCodeExporter commented 8 years ago
Yes you're right. R.styleable you should build attrs.xml by yourself and i dont 
understand PageAdapter class in AndroidPageCurlActivity too.....

Original comment by likesuns...@gmail.com on 22 Apr 2011 at 3:04

GoogleCodeExporter commented 8 years ago
error caused to the PageAdapter missing class.

Original comment by khouja.a...@gmail.com on 23 Apr 2011 at 12:29

GoogleCodeExporter commented 8 years ago
i want  to test this project but i need the PageAdapter class i have already 
set the styleable in attrs.xml,

Original comment by khouja.a...@gmail.com on 23 Apr 2011 at 1:14

GoogleCodeExporter commented 8 years ago
Where is the PAGEADAPTER class ???

Original comment by timvangi...@gmail.com on 27 Apr 2011 at 12:50

GoogleCodeExporter commented 8 years ago
Hi all. this project is not complete and the PageAdapter object is not 
available. So you should take PageCurlView object replace it...
this code about....setContentView(new PageCurlView(this)); 
enjoy!

Original comment by likesuns...@gmail.com on 27 Apr 2011 at 1:55

GoogleCodeExporter commented 8 years ago
Please can someone explain how it should be the code to work?

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        /*
        // Run as full-screen
        requestWindowFeature(Window.FEATURE_NO_TITLE);  
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,   
                                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        /**/
        //this.setContentView(R.layout.main);

        // Set the test adapter
        //setListAdapter(new PageAdapter(this));
        setContentView(new PageCurlView(this));
    }

Original comment by kfo...@gmail.com on 27 Apr 2011 at 6:39

GoogleCodeExporter commented 8 years ago
This code can play this project..  Do you get some errors?

Original comment by likesuns...@gmail.com on 28 Apr 2011 at 1:08

GoogleCodeExporter commented 8 years ago
Hi, I´ve made the changes to the code but the app stoped unexpectedly. This is 
what the logcat says: 

04-28 09:40:49.895: ERROR/AndroidRuntime(13493): Uncaught handler: thread main 
exiting due to uncaught exception
04-28 09:40:49.925: ERROR/AndroidRuntime(13493): java.lang.RuntimeException: 
Unable to start activity 
ComponentInfo{com.example.cardflip/com.example.cardflip.CardFlip}: 
java.lang.RuntimeException: Your content must have a ListView whose id 
attribute is 'android.R.id.list'
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.app.ActivityThread.access$2200(ActivityThread.java:119)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.os.Looper.loop(Looper.java:123)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.app.ActivityThread.main(ActivityThread.java:4363)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
java.lang.reflect.Method.invokeNative(Native Method)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
java.lang.reflect.Method.invoke(Method.java:521)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
dalvik.system.NativeStart.main(Native Method)
04-28 09:40:49.925: ERROR/AndroidRuntime(13493): Caused by: 
java.lang.RuntimeException: Your content must have a ListView whose id 
attribute is 'android.R.id.list'
04-28 09:40:49.925: ERROR/AndroidRuntime(13493):     at 
android.app.ListActivity.onContentChanged(ListActivity.java:236)

Where can I fix the erro: Your content must have a ListView whose id attribute 
is 'android.R.id.list' 

Thx for your help. 

Original comment by AlvaroFa...@gmail.com on 28 Apr 2011 at 2:49

GoogleCodeExporter commented 8 years ago
Thanks 8.. I got your error info. Now i know what happen about your demo.

if your change code like "Comment 6", you should modify the begin of code too

"AndroidPageCurlActivity extends ListActivity" TO  "AndroidPageCurlActivity 
extends Activity"

try and enjoy

Original comment by likesuns...@gmail.com on 29 Apr 2011 at 12:46

GoogleCodeExporter commented 8 years ago
Now it works perfect. Thank you very much.

Original comment by jmgmadri...@gmail.com on 29 Apr 2011 at 12:00

GoogleCodeExporter commented 8 years ago
Still have an issue with missing R.styleable. How can I build R.styleable by 
myself? Where I can find attrs.xml?

I am using Eclipse.

Thank you!

Original comment by sophiadm...@gmail.com on 30 Apr 2011 at 2:59

GoogleCodeExporter commented 8 years ago
Thax to all for your help. Now is working. administ...@sophie.si you have to 
create a xml file named atrrs.xml in values folder. 

Original comment by AlvaroFa...@gmail.com on 30 Apr 2011 at 10:19

GoogleCodeExporter commented 8 years ago
Could anybody please provide the attrs.xml file? I still don't know how to 
create it. I know that I have to put it inside the "values" folder, as you guys 
said, but what am I supposed to put inside the file?

Please, I am new to Android.

Thank you in advance!

Original comment by bruno.so...@gmail.com on 4 May 2011 at 2:47

GoogleCodeExporter commented 8 years ago
in the values folder you have to create the xml attrs.xml with this code:

<?xml version="1.0" encoding="UTF-8"?>
<resources>

    <declare-styleable name="PageCurlView">

        <attr name="enableDebugMode" format="boolean" />
        <attr name="curlSpeed" format="integer" />
        <attr name="updateRate" format="integer" />
        <attr name="initialEdgeOffset" format="integer" />
        <attr name="curlMode" format="integer" />

    </declare-styleable>

</resources>

Original comment by AlvaroFa...@gmail.com on 4 May 2011 at 3:13

GoogleCodeExporter commented 8 years ago
Thanks for replying Alvaro, but it still didn't work =(

I am attaching the project here. Could you please take a quick look at it?

I have just made these 3 changes:

1) Added that attrs.xml into the "/res/values" folder.
2) setContentView(new PageCurlView(this));
3) "AndroidPageCurlActivity extends ListActivity" to  "AndroidPageCurlActivity 
extends Activity"

When I run the project, it crashes imediatly (it doesn't even show any image).

Once again, thank you very much in advance!

Original comment by bruno.so...@gmail.com on 4 May 2011 at 5:45

Attachments:

GoogleCodeExporter commented 8 years ago
Is this still an issue? Sorry for the long time I was out :D

Original comment by B.Thax....@gmail.com on 23 Aug 2011 at 10:21