Re: [android-developers] extending view class not working but not throwing errors or force close

2011-10-26 Thread Chris Cullington-Johnson
Thanks TreKing the tutorial is cornboyz I believe it is fairly recent .  But
no worries I have some books but was getting very confused.  Thanks mate.
On Oct 27, 2011 1:34 PM, "TreKing"  wrote:

> On Wed, Oct 26, 2011 at 3:40 AM, Chris Cullington-Johnson <
> chriscj...@gmail.com> wrote:
>
>> I should clarify, I have a button in XML, however java setContentView
>> points to another created java class.  It is this class that is meant to be
>> able to create a canvas colored blue with an image of a cloud 'floating'
>> across it, (if understand the tutorial).  This is the first time I have
>> tried to create using this type of setContentView set up, and am obviously
>> missing something.
>
>
> Well, I don't know what to tell you. What tutorial is this and how old is
> it? A big problem with most tutorials you find online is that they become
> dated, are missing information, or simply don't work as advertised.
>
> I'd suggest you try the documentation tutorials or get a good book.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Fwd: [android-developers] extending view class not working but not throwing errors or force close

2011-10-26 Thread Chris Cullington-Johnson
TreKing

I should clarify, I have a button in XML, however java setContentView points
to another created java class.  It is this class that is meant to be able to
create a canvas colored blue with an image of a cloud 'floating' across it,
(if understand the tutorial).  This is the first time I have tried to create
using this type of setContentView set up, and am obviously missing
something.

-- Forwarded message ------
From: Chris Cullington-Johnson 
Date: Wed, Oct 26, 2011 at 1:50 PM
Subject: Re: [android-developers] extending view class not working but not
throwing errors or force close
To: android-developers@googlegroups.com


There lies the problem, I am lost.  I followed tutorial however no other
mention of adding button to Java via view class.  however does mention
adding intent to manifest. Do you need more code to check?  What else can I
try.
On Oct 26, 2011 1:02 PM, "TreKing"  wrote:

> On Tue, Oct 25, 2011 at 7:18 AM, Chris Cullington-Johnson <
> chriscj...@gmail.com> wrote:
>
>> I am doing a tutorial through you tube I have my java correct but still my
>> button wont enable the view class, it's like button is not linked.
>
>
> There is no Button in the code you posted.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] extending view class not working but not throwing errors or force close

2011-10-25 Thread Chris Cullington-Johnson
There lies the problem, I am lost.  I followed tutorial however no other
mention of adding button to Java via view class.  however does mention
adding intent to manifest. Do you need more code to check?  What else can I
try.
On Oct 26, 2011 1:02 PM, "TreKing"  wrote:

> On Tue, Oct 25, 2011 at 7:18 AM, Chris Cullington-Johnson <
> chriscj...@gmail.com> wrote:
>
>> I am doing a tutorial through you tube I have my java correct but still my
>> button wont enable the view class, it's like button is not linked.
>
>
> There is no Button in the code you posted.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] extending view class not working but not throwing errors or force close

2011-10-25 Thread Chris Cullington-Johnson
Hello all

I am doing a tutorial through you tube I have my java correct but still my
button wont enable the view class, it's like button is not linked.  I think
my manifest might be lacking something, I have listed that below java stuff.
 My code is


This is the first java class that references java view class

package com.cornboyz.thebasics;

import android.app.Activity;
import android.os.Bundle;

public class tutorialFive extends Activity {

Cornboyz sweetBK;
 @Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
sweetBK = new Cornboyz(tutorialFive.this);
setContentView(sweetBK);
}

}


This is the java meant to create rectangle (without using XML if I
understand this all correctly)

package com.cornboyz.thebasics;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.View;

public class Cornboyz extends View{
 Bitmap cloud;
int x = 0;
int y = 0;
Paint paint = new Paint();

public Cornboyz(Context context) {
super(context);
// TODO Auto-generated constructor stub
cloud = BitmapFactory.decodeResource(getResources(), R.drawable.cloud1);
  }

@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
super.onDraw(canvas);
 //set background
Rect cBK = new Rect();
cBK.set(0, 0, canvas.getWidth(), canvas.getHeight());
 Paint pBlue = new Paint();
pBlue.setColor(Color.BLUE);
pBlue.setStyle(Paint.Style.FILL);
 canvas.drawRect(cBK, pBlue);
 drawCloud(x, y, canvas);
 if(x < canvas.getWidth()){
x = x+10;
}else{
y = y+10;
x = 0;
 }
 invalidate();
 }

 private void drawCloud(int x2, int y2, Canvas canvas) {
// TODO Auto-generated method stub
canvas.drawBitmap(cloud, x2, y2, paint);
 }


}


This is the Manifest


http://schemas.android.com/apk/res/android";
  package="com.cornboyz.thebasics"
  android:versionCode="1"
  android:versionName="1.0">
































































-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] NEWBIE needs help with Android Tab Widget tutorial

2011-10-04 Thread Chris Cullington-Johnson
thanks TreKing

I ended up figuring this one out, finally.  Now stuck on HelloGoogleMapView
tutorial.  I am refusing to give in this time and am doing a lot of reading
about how to put the code together cause I am obviously missing something.

On Sat, Oct 1, 2011 at 10:05 AM, TreKing  wrote:

> On Wed, Sep 28, 2011 at 11:30 PM, Chris Cullington-Johnson <
> chriscj...@gmail.com> wrote:
>
>> My app now doen't display errors but will not run it shows the following
>> error
>>
>>  " The appication HelloTabWidget (process Tab.Widget) has stopped
>> unexpectedly.."
>>
>
> You need to use the debugger and LogCat to determine what is throwing the
> exception causing the app to crash.
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] NEWBIE needs help with Android Tab Widget tutorial

2011-09-30 Thread Chris Cullington-Johnson
 I have just joined the Android World and am lovn it, however having a bit
of trouble with some of the tutorials, in particular the Hello Tab Widget
one.  Particular part states
"Notice that this doesn't use a layout file. Just create a TextView, give it
some text and set that as the content. Duplicate this for each of the three
activities, and add the corresponding  tags to the Android
Manifest file."  I think this is where I am going wrong, I don't fully
understand how to add "the corresponding  tags in manifest
file".  see below for my code what have I done (or not done).

My app now doen't display errors but will not run it shows the following
error

 " The appication HelloTabWidget (process Tab.Widget) has stopped
unexpectedly.."








http://schemas.android.com/apk/res/android";
*

package=*"Tab.Widget"
*

android:versionCode=*"1"
*

android:versionName=*"1.0"*>





















































 



-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en