TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
raghad abdulah
NA
10
2.3k
how can multi buttons open navigate pages for android app?
Mar 28 2018 3:32 AM
i craete an android application with four buttons in the first interface and i need each button to open another screen when clicked i did it correctly with the first button using this code
using
Android.App;
using
Android.Widget;
using
Android.OS;
namespace
fitness_ghadi
{
[Activity(Label =
"fitness_ghadi"
, MainLauncher =
true
, Icon =
"@drawable/icon"
)]
public
class
MainActivity : Activity
{
protected
override
void
OnCreate (Bundle bundle)
{
base
.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.Main);
Button button = FindViewById<Button>(Resource.Id.second);
button.Click +=
delegate
{
StartActivity(
typeof
(second));
};
}
}
}
and this
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
Android.App;
using
Android.Content;
using
Android.OS;
using
Android.Runtime;
using
Android.Views;
using
Android.Widget;
namespace
fitness_ghadi
{
[Activity(Label =
"second"
)]
public
class
second : Activity
{
protected
override
void
OnCreate(Bundle savedInstanceState)
{
base
.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.Second);
Button button = FindViewById<Button>(Resource.Id.First);
button.Click +=
delegate
{
StartActivity(
typeof
(MainActivity));
};
// Create your application here
}
}
}
but when i try to make the same code for the rest buttons it did't work i found errors , how can i do it please?
Reply
Answers (
5
)
Generating Grid Cell Values based on other values.
i got this problem please any solve this problem