yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Shadomastr:
Hey guys,

I'm new to android development and have been working through the Android Development guides on Google's site. I'm using what I've learned so far to create a simple app that enables the user to press a button and enter a second screen. I'm incredibly confused at this point and any help would be much appreciated. I have a class Project001.java with a button and would like class Project002.java to be launched when Button 1 is pressed. I have main.xml providing the layout for Project001 and main2.xml providing the layout for Project002. Here is what I have so far in Project001 (which I know is wrong).

package com.smith.Project001;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener;

import android.widget.Button;

import com.smith.Project002;

public abstract class Project001 extends Activity implements OnClickListener {

Button button = (Button)findViewById(R.id.Button01);

abstract void setOnClickListener(View v);

// Implement the OnClickListener callback

public void onClick(View v) {

//do something when the button is clicked

}

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

Intent myIntent = new Intent();

myIntent.setClassName("com.smith.Project001", "com.smith.Project002");

startActivity(myIntent);

}}

I've been searching through the Google archives and can't seem to put all the pieces together. Thanks in advance for your help!
[Android Software Development] rigman:
Try the tutorial here. The second one, called menus and intents, I think, shows starting one activity from another.

http://www.vogella.de/articles/Android/article.html

________________________________

Unrevoked forever

SkyRaider Sense 3.5

Radio 2.15.00.09.01
[Android Software Development] Rootstonian:
Try something like this in your main activity:

You really don't need abstract or implements. And there is no reason to import "Project2" into "Project1". Project2 should handle all that goes on in the new window. If you need to pass data to Project2 you can do that too :)
[Android Software Development] Shadomastr:
Thanks for the help so far guys,

I'm still having troubles with this code (new to development and very much appreciative of your help). I've done a lot of reading and I don't think I need to use intents because I have to data to pass from Project001 to Project002. All I need is to click the button and to move from Project001 to Project 002. My problem right now is that as soon as I run the app in the emulator, I get a force close. I've been trying to find a solution but haven't been able to. I've tried to implement the method you gave me and took the entire tutorial two posts up. Here is the new code. Again, any help is much appreciated. :D

package com.smith.Project001;

import android.app.Activity;

import android.os.Bundle;

import android.view.View;

import android.view.View.OnClickListener;

import android.widget.Button;

public class Project001 extends Activity implements OnClickListener {

Button button = (Button)findViewById(R.id.Button01);

void setOnClickListener(View v) {

}

// Implement the OnClickListener callback

public void onClick(View v) {

setContentView(R.layout.main2);

//do something when the button is clicked

}

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

Button startNewActivityBtn = (Button) findViewById(R.id.Button01);

startNewActivityBtn.setOnClickListener(new Button.OnClickListener() {

public void onClick (View v) {

// put your intent and start activity here; should work fine

}

});

}
[Android Software Development] martino2k6:
Always look into logcat, it's REALLY helpful. Anyway, here's a couple of things I see wrong;

1) I'm not sure why you're having two layouts for one activity, just put them into one layout file

2) setContentView() needs to be in onCreate()

3) You can't call findViewById() before the layout file has been processed by setContentView()
[Android Software Development] rigman:
Try this example. I think it does exactly what you want. It has two xml files (screen 1 and screen 2). When you press the button on the first screen, it displays the second screen.

http://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-between-activities/

________________________________

Unrevoked forever

SkyRaider Sense 3.5

Radio 2.15.00.09.01
[Android Software Development] Rootstonian:
Yep, that should work.

Please note that on the second Activity, a "Previous" or "Return" type button is not required; the hard Back Key on Android phones does the exact same thing as the code.
[EVO 4G General] tracerit:
i'm on my second refurb in two weeks and this one also has a problem. it's a HW004 so i thought i would'nt have any problems since it's the newest build but three days after i got it, my camera would produce grainy purple, blue, violet lines after it achieves focus. turning off auto focus would fix the problem but then i wouldn't be able to take up close pictures, the type i use the camera for.

so i'm going to bring the phone in but i'm just curious if this si something that can be fixed without replacing the whole phone. i looked on ifixit.com and it shows that the camera sensor can be taken out and placed back in so maybe they can do just that? i'd like to hold onto this actual HW004 instead of having them give me another refurb with an older build.
[EVO 4G General] tndank:
If you brought it my store, I'd certainly try swapping the camera before ordering another replacement. It's pretty much just one piece that pops out. Easy to replace. Only problem would be if they had one on hand. If not, you could try another store or do another swap.
[EVO 4G General] tracerit:
do you work for a Sprint repair store?

my phone's hardware is 004, i think i read this hardware version uses a diffrent camera?
[EVO 4G General] live2ride96:
Not 100% sure, but I believe camera is a piece they'll replace rather than swap the entire phone. That's what they did when my speaker blew. They repaired it with a new speaker in about 45 minutes. Head into the store and find out.
[EVO 4G General] tracerit:
just an update. all they did was replace the camera sensor and not the whole phone. just took about 15-20 minutes. not too bad.
[Droid Incredible Q&A, Help & Troubleshooting] tric3ur:
Hey, I'm thinking about getting a Droid Incredible. I know it's gonna be a lot of work but how should I go about unlocking it to work on sprint. That's assuming sprint will accept the phone and let me activate it..
[Droid Incredible Q&A, Help & Troubleshooting] Keyboards:
I've heard of it being used on Cricket, never Sprint. Not sure man, good luck though.
[Droid Incredible Q&A, Help & Troubleshooting] tric3ur:
thanks, I'm probably going to need it. Better start looking into cricket lol
[Droid Incredible Q&A, Help & Troubleshooting] Cryous:
Or metro pcs, the only way to get sprint to work is if you have someone on the inside that can activate phones
[Droid Incredible Q&A, Help & Troubleshooting] tric3ur:
hmm. Too bad I'm too young to work for them, maybe I can go there on an internship and make some friends ;)
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
Can you just change the esn to a sprint esn? And then change 68992737495 settings and yay?
[HD2 General] TXK:
Hey guys my phone had low battery & died. Right when I got home I plug it in to the wall charger and now it boots up then restarts when it load android from nand & it keeps restarting & restarting... Can someone help me out. Because right now I have phone whos restarting every 3 seconds.. :(
[Streak 5 General] BrockFerens:
Hello,

So i was play fighting with the gf, and **** whipped me with a belt, hit my.phone in my pocket now theres a few black lines across the screen, top left corner in landscape is solid black. Super choked about it the glass is fine, but the lcd is screwed. Im not thinking dell will replace this under warranty, im wondering if it somehow manage to stop turning on... dell would probably replace it then?

1887 ~ 1.152 / Streakdroid 1.5.3
[Streak 5 General] thestreaker:
Um, sorry about your gf.

There are many tales about dell replacing one and not another. I wont duplicate it here. The theme seems to be how you go about the matter and describe how it happened. Very common problem. Almost enough to be called a defect.

Another solution is to buy an lcd. If you are up to it, diy. If not, pay the extra to get someone else.
[Streak 5 General] BrockFerens:
Yeah looks that way... im a diy kind of person this waybto therez no down time

1887 ~ 1.152 / Streakdroid 1.5.3
[Streak 5 General] pmcnano:
Mine dropped from the height of my knee and broke :(....Ordered one from china, 110 dls. I fixed it already
[Streak 5 General] alperin1:
Hey folks,

I broke my recently and had this shop order it for me. He is in the Philly area. I think it will be around $125 US if he has then in stock.

harrytelecom.blogspot.com

Alperin1
[Vibrant Q&A, Help & Troubleshooting] guruchimi:
I am unable to see a particular free app listed in the Market on my rooted Vibrant running stock KB1. App name is "IBNLive" (com.divum.ibn). However, my friends are able access the app from their Captivates.

I tried to to use the Web Market, but it shows up "App is not compatible with your device" message and does not even give me an option to install it.

Is there a way to get this app on my phone? It is a simple news app - so if it can show up on the Captivate, why is incompatible with the Vibrant?
[Vibrant Q&A, Help & Troubleshooting] jmcghee1973:
I just looked and I can see it there...
[Vibrant Q&A, Help & Troubleshooting] guruchimi:
Hmmm... I am not sure what is missing on my phone! Can't think of anything that I might have done wrong.
[Vibrant Q&A, Help & Troubleshooting] jmcghee1973:
go to settings>applications>manage applications>ALL Tab>market and clear cache and data and try that.
[Vibrant Q&A, Help & Troubleshooting] xriderx66:
i can see it too.

if your not on 2.2 you may not be able to see it. are you on 2.2?
[Vibrant Q&A, Help & Troubleshooting] blizzard1017:
This usually does the trick but I also suggest downloading appbrain. I can always search appbrain for an app I don't see and it will link me to the market link. I actually had to do it with the XDA app.
[Vibrant Q&A, Help & Troubleshooting] villainous_scum:
I have experienced similar issues I cant see Music Junk and when I search for IBNlive it shows There are no matches in Android Market.

I noticed it when I went from Axura 2.2.9 to Flagship v3.

Possible user error on my part.
[Vibrant Q&A, Help & Troubleshooting] xriderx66:
na Music Junk doesn't show for me on flaghship, and bionix.

I have the .apk saved so i'm good.

the app still works though lol
[Vibrant Q&A, Help & Troubleshooting] guruchimi:
Tried that, but I am still not able to see it. Guess I have to grab the APK from somewhere. Thanks for the suggestion.
[Vibrant Q&A, Help & Troubleshooting] guruchimi:
Yes I am on 2.2, running stock KB1.
[Droid Eris Q&A, Help & Troubleshooting] haganme:
Has anyone been able to get Jetcarstunts to install and run on the Eris? I have not. I suspect it is because our CPU is outdated, but i don't know.

Also, I've run eris market fix, but it still seems that not all apps are listed. Like jetcarstunts for example. I DL it from a link on androidgod.net and had no luck installing it.

I'm on FroShedYo V10. Thanks!:D
[Droid Eris Q&A, Help & Troubleshooting] McFluffnStuff:
Someone can correct me if I'm wrong, but can't devs choose which devices can see the app or not?

Odds are the dev made it so that only high end devices can download it.
[Droid Eris Q&A, Help & Troubleshooting] CCCP4ever:
odds are even if you are able to install it it will not be playable =) its eris, cmon=)
[Droid Incredible Q&A, Help & Troubleshooting] Fotisto:
Where can I get a stock gingerbread build for Droid Incredible? I looked at this thread but there are no links.
[Droid Incredible Q&A, Help & Troubleshooting] WillisD:
www.t3hh4xx0r.com , try here
[Droid Incredible Q&A, Help & Troubleshooting] WillisD:
You can also stop by the irc #R2gb on freenode
[Droid Incredible Q&A, Help & Troubleshooting] g00s3y:
CM7 is the best gingerbread rom out there right now IMO. Very stable, loads of options.

http://xdaforums.com/showthread.php?t=916881
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
And not in any way stock.
[Droid Incredible Q&A, Help & Troubleshooting] ahkenatan:
What do you mean it's not stock? It's wholly stock, except for the part in Settings > CyanogenMod Settings, which a lot of people hold near and dear to their hearts. Otherwise, it's the fastest and most stable Gingerbread build -- nay, ROM -- that I've ever used on my Droid Incredible, even in it's Nightly Build state.
[Droid Incredible Q&A, Help & Troubleshooting] Smokeey:
CM7 is 'stock'. I'd say the only thing making it not stock is ADW which can be removed with some basic stuff.

Sent from God, who uses CM7.
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
I dont get why cm7 would use adw and not just the stock launcher. That bugs me. But ive always hated adw.
[Droid Incredible Q&A, Help & Troubleshooting] cam30era:
I agree. I just download the stock Gingerbread launcher from the market and delete ADW. Works great with CM7.
[Droid Incredible Q&A, Help & Troubleshooting] Smokeey:
Or learn how to compile source.

Sent from God, who uses CM7.
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
Why does everyone automatically say well learn to do it yourself? I asked a simple question about the launcher. I figured maybe I'd be told its customizable or something.
[Droid Incredible Q&A, Help & Troubleshooting] Smokeey:
Why wouldn't you want to improve upon your self?

Sent from God, who uses CM7.
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
I don't even understand source much less can I build from it. I was just saying I don't understand why they use adw. I was looking for someone with a reason like well you can change setting by going to _____ menu. Or something like that.
[Droid Incredible Q&A, Help & Troubleshooting] Smokeey:
I honestly wish for a stock gb launcher too but CM7 doesn't have that by default. Your only choice is OMGB which is you know...

Sent from God, who uses CM7.
[Droid Incredible Q&A, Help & Troubleshooting] PvilleComp:
I've been running the C7 nightlies for a while and love them - What's different in the "stock launcher" rather then ADW? I'm not trolling just curious.
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
Yea I run OMFGB.

You could always do what i do and just download the roms you want pieces of and pull the pieces and put them into yours. Like download cm7 and omgb and put the omgb launcher into cm7
[Droid Incredible Q&A, Help & Troubleshooting] PvilleComp:
I ran an early build of OMBG and liked it but it was not stable enough to use as a daily driver at that point - I just don't remember what the differences were between it's launcher and ADW.
[Droid Incredible Q&A, Help & Troubleshooting] donnyp1:
I installed omfgb today and then installed adw as i prefer 5 icons in my bar. I will install cm7 #28 asap tonite as omfgb just doesnt "feel" as stable.
[Droid Incredible Q&A, Help & Troubleshooting] Smokeey:
Learn how to setup a ROM kitchen and you should be fine. Easy as pie too as everything needed is provided. Let me look for the tutorial link.

Sent from God, who uses CM7.
[Droid Incredible Q&A, Help & Troubleshooting] Gahh Its Lee:
I'd love that link.
[Droid Incredible Q&A, Help & Troubleshooting] Smokeey:
Here ya are: http://xdaforums.com/showthread.php?t=633246
[Droid Incredible Q&A, Help & Troubleshooting] RobertMaurizio:
There's a lot you can do with that. Follow the instructions. Learn and have fun!
[iPAQ rw6828, XDA Atom Accessories] jpoption:
Any recommend where can i get 1530mah or 2400mah battery for my o2 atom, in malaysia only because i dont want to pay extra postage and tax, postage within malaysia is ok for me.

I found some brand from lowyat.net and lelong.com,

capacity 2400mah,

japod 1500mah,

and others no brand

Anyone use these batteries？
[iPAQ rw6828, XDA Atom Accessories] Hakim Rahman:
search in http://shop.ebay.com/?_from=R40&_tr...battery+for+o2+atom&_sacat=See-All-Categories
[iPAQ rw6828, XDA Atom Accessories] :
same problem from mer India,p-mobile.E71 pro is same rating and it is alsol ithium polymer.but it has 3 terminals.reply me ,asdfz8055@hotmail.com
[Upgrading, Modifying and Unlocking] marculous:
Okay I am new to this. Managed to brick my streak at xmas time attempting to froyo it. several forums, including this one helped me out, final pieces were irc. Recently got into custom roms and my question is, is it as easy to root and mod a droid x as it now is with the streak? I can download update zips, edit txt file and update all without the computer. Just on the streak, after getting clockwork on it. I have read about cyanogen and efuse. And the double layer of apps on the x. I want to root and rom, it will arrive in a few days. Will it be as easy with the droid x?

Streak Droid v1.6.1 using xda app
[Optimus One, P500, V General] sarfaraz1989:
Is anyone using honeycomb components on O1??? Like Keyboard, Music player etc..

check this link...

http://xdaforums.com/showthread.php?t=885535
[General Questions and Answers] Phateless:
So I'm just now installing the SDK on my gf's computer and it puts ADB in /tools and Fastboot in /platform-tools. Fastboot refuses to run.

This application has failed to start because AdbWinApi.dll was not found. Re-installing the application may fix this problem.

What's this about?? I downloaded the sdk.zip (the installer exe wanted me to install the java jdk, which I definitely don't need) and extracted it to C:\android-sdk-windows. Then I ran the SDK manager and installed the platform tools. Should I copy the platform-tools contents into tools or the other way around?

I haven't set the environment variable in system properties yet because I'm not sure which directory to use. The computer has the drivers for my phone and adb works fine. I booted into fastboot mode and it installed drivers.

Why would they give me an SDK with a non-working fastboot? Kind of irritated... :confused:
[General Questions and Answers] Phateless:
Copied contents of \platform-tools into \tools (DID NOT REPLACE ANY FILES!) and now everything works.

I would still like to know what was going on with this, and is there any advantage to adding the environment variable? I'd like to be able to run commands from any directory if possible, instead of having to cd all over the place.
[G2 and Desire Z General] jtadak:
http://www.youtube.com/watch?v=-UcFYoG6Du4&feature=youtube_gdata_player

Took this video with my G2. Not posting to brag but just mainly to show the quality. The sound isn't that great though.
[G2 and Desire Z General] wayde187:
Good quality. I think the nicest thing that caught my eye in the video was that badass aftermarket cup holder that hangs out of the window slot.

Sent from my word hole to your ocular cavities via my CM7 G2 1.5ghz
[G2 and Desire Z General] david279:
NIce car. Throw some all black wheels on it. That would be sick.
[G2 and Desire Z General] jtadak:
Yeah, I want to get a second set.
[G2 and Desire Z General] jtadak:
Hahaha. That's funny bro.
[G2 and Desire Z General] moSess:
That's one of the most beautiful videos I have ever seen!:p
[G2 and Desire Z General] Powers88:
All black wheels would be a mistake. He already has black tint and blacked out tail lights. If you want it to look like the bat mobile then go ahead but otherwise it would just look goofy. I have a 76 myself, you got a pretty clean ride there.
[G2 and Desire Z General] jtadak:
Thanks much you guys. Preciate ya.
[G2 and Desire Z General] PoisonWolf:
Until today, HTC hasn't fixed the pink-hue problem in the center. Ah well. That's what happens when you use cheap lenses. Lawl.
[G2 and Desire Z General] theratdude64:
Very nice video... But 85 IROC? lol Thats a Sport Coupe nose. Nice car though. I've had 7 camaros, and 3rd gens are my favorite. I know just about every year indicator of em :)
[G2 and Desire Z General] jtadak:
First of all thank you, and I'm glad you have respect for the third gen Camaro. Yeah someone called me out on that on youtube too, your right it looks like it is a sport coupe. But don't judge a book by its cover and the deal is the front clip has been replaced as well as the ground effects removed. Like I told him it wouldn't hurt my feelings if it weren't (: I have also run the vin # and does say its an Iroc-Z. You won't see any '85 Iroc that looks like this one.
[G2 and Desire Z General] dietotherhythm:
Gotta say I love the quality of the video and the ride (bow tie exhaust is a nice touch too) but I lol'd at the auto trans.

+1 for Chevy enthusiast
[G2 and Desire Z General] Kaczman:
your camaro sucks.
[G2 and Desire Z General] jtadak:
Haha, thanks. It is auto but its a stage 2 shift kit. Eventually it will go stick. A lot of drag racers use autos but its usually the turbo 350.
[G2 and Desire Z General] wluther:
Sweet ride!! Not trying to steal any thunder here... but here is a 720p video test of my Camaro I did a while back when I got my new G2.

[YOUTUBE]yx37nUsfGvY&hd=1[/YOUTUBE]

Gen 2's are my favorite... then 1, 3, 5, 4... just for the record though... you seem to have a great deal for a first car... my first car was a 1985 virgin maker... lol... you get a 1985 panty dampener (at least as far as first cars go)...
[G2 and Desire Z General] jtadak:
Hahaha, thanks my friend, no problem with the video man. That thing is so clean, I'm getting one in a bout a year since I'm almost done pouring my paychecks into this thing!
[G2 and Desire Z General] iVisionX01:
Ignore the hater your ride is hella clean. This guy probably drives his moms minivan.
[G2 and Desire Z General] jtadak:
Haha thanks homie, but I saw his channel on Youtube after he hated all over my car on there too. He has a clean caddy but he's obviously got some issues of his own to work out. I'm not hating that's why I can say that.
[G2 and Desire Z General] theratdude64:
Very nice car :) I had an 87 IROC 350 that I rebuilt. I had other 3rd gens but not IROC's. I did help put an entire 4th gen into an 89 IROC *89 is the absolute best IMO, best options compared to older, and newer took features away* check out that build:

LS1 T56 Swap http://s133.photobucket.com/albums/q53/KhaotikRaje/LS1 Project 2007/03-19-2007 LS1 Install/

We also put the interior in

Anywho.... not to post car stuff on a phone forum :cool:

I am quite impressed with my G2's video quality, I hear people complain about it.... but in decent lighting it's good. I have a video my friend shot in mexico of the beach that looks AMAZING... but it's with a vibrant.
[G2 and Desire Z General] jtadak:
That is so sick man, haha. I'm in a third gen forum but don't ever go to it really for some reason. But I'm doing a swap to a built to snot new 406. I'm going to do a lil frame by frame of the swap too. Even though it's not probably as extensive as your swap (: And yes the G2 has a great camara and I have even filmed skating which you have to have a good camara and it did pretty good for moving video to, which I think is a true test.

Anyway always great to talk to a fellow Camaro enthusiest and hope to hear more from ya!
[G2 and Desire Z General] theratdude64:
I love finding camaro enthusiasts elsewhere lol. I found a camaroz28.com member here on XDA as well, his camaro was one of my favorites on there and his same screen name is over here so we were PMing for a bit haha.

haha you typo'd camaro in place of camera lol

That is my friend's swap but I helped with 100% of it lol. That car was nuts, I miss it :( I did a full interior swap in my 95 camaro too. I'm currently not in a camaro, and it makes me very sad.

What I wish is the g2 had panoramic. My wife's vibrant took a pretty awesome panoramic pic and as much as I love my camera, her software grew on me.