Yes, that's obvious looking at it on another day.
Thanks for the reply.
Fred
On Nov 30, 2:17 pm, Ralf <[EMAIL PROTECTED]> wrote:
> As you indicated, you need to create an activity. The class referenced
> in the <activity> tag must derive from Activity, not from a TextView.
>
> The structure you want is:
> - your own activity. It must do a setContent(name-of-layout).
> - a res/layout XML file that describes the UI, this is where you
> insert your custom text view
> - your own custom text view class.
>
> Look at the sample/HelloWorld and sample/LunarLander in the SDK.
>
> R/
>
> On Sat, Nov 29, 2008 at 9:43 PM, [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]> wrote:
>
> > I have an issue with the basic structure that I can't seem to get
> > past. I am using Eclipse and trying to run through the examples iin
> > Professional Android Application Development. Here is my issue:
>
> > I have a project i setup in Eclipse. Under it have have the usual
> > default setup. I compile and run the default code just fine. When I
> > try to edit the TodoListItemView source file I get an error in the
> > AndroidManifest.xml file in the project root. Here is that file and
> > the <X> in the code below is the issue. The error message is
> > "TDLIV.com.TodoListItemView does not extend android.app.Activity"
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <manifest xmlns:android="(deleted the http)schemas.android.com/apk/res/
> > android"
> > package="TDLIV.com"
> > android:versionCode="1"
> > android:versionName="1.0.0">
> > <application android:icon="@drawable/icon" android:label="@string/
> > app_name">
> > <activity android:name=".TodoListItemView"
> > <X> android:label="@string/app_name">
> > <intent-filter>
> > <action android:name="android.intent.action.MAIN" />
> > <category
> > android:name="android.intent.category.LAUNCHER" />
> > </intent-filter>
> > </activity>
> > </application>
> > </manifest>
>
> > So far, I am trying to do is start an example from the book. That
> > code is as follows and shows no errors.
> > --------------------------
> > package TDLIV.com;
>
> > import android.content.Context;
> > import android.content.res.Resources;
> > import android.graphics.Canvas;
> > import android.graphics.Paint;
> > import android.util.AttributeSet;
> > import android.widget.TextView;
> > import android.app.Activity;
> > import android.os.Bundle;
>
> > public class TodoListItemView extends TextView {
>
> > /** Constructors. Each should call init() */
> > public TodoListItemView (Context context, AttributeSet attrs,
> > int defStyle) {
> > super(context, attrs, defStyle);
> > init();
> > }
>
> > public TodoListItemView (Context context) {
> > super(context);
> > init();
> > }
>
> > public TodoListItemView (Context context, AttributeSet attrs) {
> > super(context, attrs);
> > init();
> > }
>
> > private void init() {
> > }
>
> > }
> > _______________________
>
> > I am obviously a novice and would really appreciate anyones comments
> > greatly. I used to do some java coding for fun but was not using
> > Eclipse.
>
> > Thanks in advance for any help.
>
> > Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---