Help Badly Needed

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Help Badly Needed

Postby newbieandroid » Mon Aug 02, 2010 3:28 pm

Hi all I am new to android programming and I cant get any progress from what I am doing, my problem is that i created a textview and a button on main.xml(layout view). the problem is. How can the text in the textview change when i click the button? Its like if the text is HelloWorld when i click the button it should change to Hello Welcome? How can i do that? your help is greatly needed. Thanks
newbieandroid
Freshman
Freshman
 
Posts: 3
Joined: Sun Aug 01, 2010 9:07 am

Top

Re: Help Badly Needed

Postby pskink » Mon Aug 02, 2010 4:04 pm

pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Re: Help Badly Needed

Postby limteckchai » Tue Aug 03, 2010 8:17 am

Code for your first page :
Code: Select all
public class FirstPage extends Activity {
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.FirstPage);


menu_btn.setOnClickListener(new View.OnClickListener() {
         public void onClick(View v) {
Intent Menu = new Intent().setClass(FirstPage.this, NextPage.class);
         startActivity(Menu);
         }

Code for your second page :
Code: Select all
public class NextPage extends Activity {
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.FirstPage);


menu_btn2.setOnClickListener(new View.OnClickListener() {
         public void onClick(View v) {
Intent Menu = new Intent().setClass(NextPage.this, FirstPage.class);
         startActivity(Menu);
         }

[list=]
[apple]
[orange][/list]
And there u go !!!

can anyone teach me how to code the list in this forum??? (do in in code view so i can see how to do it :( )
limteckchai
Experienced Developer
Experienced Developer
 
Posts: 92
Joined: Mon Jun 28, 2010 3:33 am

Re: Help Badly Needed

Postby newbieandroid » Wed Aug 11, 2010 12:58 pm

thanks for the help guys, are there tools to make a game in android via drag and drop? so that you will not code it all?
newbieandroid
Freshman
Freshman
 
Posts: 3
Joined: Sun Aug 01, 2010 9:07 am

Re: Help Badly Needed

Postby pskink » Wed Aug 11, 2010 1:08 pm

newbieandroid wrote:thanks for the help guys, are there tools to make a game in android via drag and drop? so that you will not code it all?


no, and i hope google developers will never make such awful thing
pskink
pskink
Master Developer
Master Developer
 
Posts: 719
Joined: Mon Nov 24, 2008 3:49 pm

Re: Help Badly Needed

Postby newbieandroid » Mon Aug 23, 2010 3:31 pm

i am again having problems and this time i am trying to import pictures(background pics which are moving or it can also be a video) to the game i am developing, how can i place it in code? where should i put them?
newbieandroid
Freshman
Freshman
 
Posts: 3
Joined: Sun Aug 01, 2010 9:07 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests