FAQs
Search
Recent Topics
Flagged Topics
Hot Topics
Best Topics
Register / Login
Win a copy of
Securing DevOps
this week in the
Security
forum!
Chung Siu
Greenhorn
+ Follow
1
Posts
1
Threads
0
Cows
since Feb 14, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (1/100)
Number Threads Started (1/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (1/10)
Number Threads Started (1/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by Chung Siu
Eclipse Android Programming/Buttons
package mypackagename; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class name extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.xmlfile); Button name = (Button) findViewById(R.id.buttonname); name.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub Intent b3 = new Intent(); b3.setClassName("packagename", "packagename.javaclass"); startActivity(b3); } });
**Android Manifest**
<activity android:name="packagename.javaclass" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.JAVACLASS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>
That up there is my code. When ever I click the button that code is linked to. my app just crashes. I am very new to android programming so if someone could help me out in simple terms, that would be great
Thanks!
show more
4 years ago
Android