Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Slay Sk
Greenhorn
+ Follow
2
Posts
1
Threads
0
Cows
since Feb 04, 2013
Merit badge:
grant badges
For More
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 (2/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 (0/3)
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 (2/10)
Number Threads Started (1/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
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 Slay Sk
Create a new Intent error crash?
Wait, is the problem maybe becouse I didn't add the new activity to the manifest?
show more
11 years ago
Android
Create a new Intent error crash?
Hi
I'm trying to create a new Intent and for some reason it crashes all the time - I'm going to post my code - please tell me what I'm doing wrong.
package com.projects.digi; import com.projects.createuser.CreateUser; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends Activity { public Button _btn; /* --------------------------------------------------- */ /* --------------------------------------------------- */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); _btn = (Button)findViewById(R.id.btnRegister); _btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { run(); } }); } public void run() { //Create an Intent object for this activity, including it's destination class Intent intent = new Intent(MainActivity.this, CreateUser.class); //Start the activity startActivity(intent); } /* --------------------------------------------------- */ /* --------------------------------------------------- */ @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_digitalcocoon, menu); return true; } }
Thanks
show more
11 years ago
Android