Java errors

Put your problem here if it does not fit any of the other categories.

Java errors

Postby nin2246 » Mon Jan 30, 2012 8:55 pm

I am horrible at coding java and I am getting really confused and kinda annoyed at the 2d graphic drawing/ paint. Are there any good tutorials online that are idiot friendly and provide sources code/ pictures for what it should look like? Thanks!
nin2246
Developer
Developer
 
Posts: 42
Joined: Wed Jan 18, 2012 8:08 pm

Top

Re: Java errors

Postby Phyll » Mon Jan 30, 2012 9:02 pm

Hi nin,

Here's a to the point, concise one:

http://p-xr.com/android-tutorial-2d-canvas-graphics/

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Java errors

Postby nin2246 » Tue Jan 31, 2012 9:01 pm

Phyll wrote:Hi nin,

Here's a to the point, concise one:

http://p-xr.com/android-tutorial-2d-canvas-graphics/

Phyll

I liked it nice and simple and pretty much got the gist of it. But... I don't know why but it won't run the activity/ java of the color. I named the android:name".Draw2d" just like I would normally do. No errors either.
nin2246
Developer
Developer
 
Posts: 42
Joined: Wed Jan 18, 2012 8:08 pm

Re: Java errors

Postby Phyll » Tue Jan 31, 2012 9:16 pm

Hi nin,

How do you mean, doesn't run? No errors?

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Re: Java errors

Postby nin2246 » Tue Jan 31, 2012 9:17 pm

I run it in Eclipse and it just has a black background and no shapes and just says the Hello world string with file name. So I guess one could say the Draw2d.java file won't load onCreate?
nin2246
Developer
Developer
 
Posts: 42
Joined: Wed Jan 18, 2012 8:08 pm

Re: Java errors

Postby Phyll » Tue Jan 31, 2012 9:47 pm

Hi landy,

Guess you forgot something because I just loaded most of that into Eclipse and ran it and it looked like this:

Image

If you did everything in the class ok, then you probably forgot to take out what Eclipse does for you so that your onCreate() looks like this:

Code: Select all
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        Draw2d d = new Draw2d(App2.this);
        setContentView(d);

        }


Hope this helps.

Phyll
Phyll
Master Developer
Master Developer
 
Posts: 648
Joined: Fri Oct 14, 2011 11:19 am

Top

Re: Java errors

Postby nin2246 » Wed Feb 01, 2012 7:06 pm

I got it now!! I didn't know you would have to take out the setContentView(R.layout.main); but now I know for future refrence thanks again Phyll.
nin2246
Developer
Developer
 
Posts: 42
Joined: Wed Jan 18, 2012 8:08 pm

Re: Java errors

Postby hgft » Wed Feb 29, 2012 9:20 am

Coach Outlet Online Sale is with imperfections which consist of cuts, scars, and scratches will exist, the grain in its organically grown problem has between one of the most considerable dietary fibers strength, and getting a last end result between one of the most considerable durability. The grain also has organically grown breathability, resulting in increased comfort using the path from the wearer.

Louis Vuitton Outlet could possibly be one of the most well-known is not necessarily one of the most ideal for you! possibly the most current quarter round shoulder bag with fluorescent color provides you a shine in the moment, desire to possess the urge to it immediately; But possibly your pores and skin color could possibly be the earth beside the handbag could possibly be one of the most make you fondle admiringly joker choice.

Louis Vuitton Outlet supply reduce, the weakening from the role, tiny haystack in slender whole body once more and again. the right way to purchase Louis Vuitton bags That's between the powerful cohesion when Cunningham lancelet find yourself isolated point, allow wind and bad weather insulation, yr pursuing year, pile of grass system earlier short increased grass blanketed with it or bi erosion.

Jennifer Garner and Ben Affleck are the proud parents of a newborn son! The 39-year-old actress gave birth to the couple's third child in Santa Monica, Calif., a source tells Us Weekly. The family's newest addition joins older sisters Violet, 6, and Seraphina, 3. “I would have thought [Ben] wanted a boy]. At first … I really thought so,” Jen, who kept the baby's gender under wraps, told Jay Leno last month.
hgft
Experienced Developer
Experienced Developer
 
Posts: 66
Joined: Tue Feb 28, 2012 9:11 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 15 guests