Re: [android-developers] Re: Button for dynamic text

2012-02-22 Thread TreKing
On Wed, Feb 22, 2012 at 2:13 PM, Pram goodp...@gmail.com wrote:

 when I try to use return in my if statement that does not work the tv
 statements do not show anything on the screen when it is executed.


The code in your original post is extremely hard to read. Try a smaller
snippet that illustrates what you're talking about.

Have you put in logging and used your debugger to step through and see what
the code is doing?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

RE: [android-developers] Re: Button for dynamic text

2012-02-22 Thread Tommy Hartz
Why not connect the button click event to a function EX

 

public void onClick(View v) {

Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();

}

 

Public string stringFunction(){

If(whatever){

Return = Hello;

}

 

 

}

 

 

From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of TreKing
Sent: Wednesday, February 22, 2012 3:22 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Re: Button for dynamic text

 

On Wed, Feb 22, 2012 at 2:13 PM, Pram goodp...@gmail.com wrote:

when I try to use return in my if statement that does not work the tv
statements do not show anything on the screen when it is executed.


The code in your original post is extremely hard to read. Try a smaller
snippet that illustrates what you're talking about.

 

Have you put in logging and used your debugger to step through and see what
the code is doing?


-
TreKing http://sites.google.com/site/rezmobileapps/treking  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: Button for dynamic text

2012-02-22 Thread TreKing
On Wed, Feb 22, 2012 at 2:39 PM, Tommy Hartz droi...@gmail.com wrote:

 Why not connect the button click event to a function EX

 public void onClick(View v) {

 Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();

 }

 Public string stringFunction(){

 If(whatever){

 Return = “Hello”;

 }

 }

On Wed, Feb 22, 2012 at 4:46 PM, Pram goodp...@gmail.com wrote:

 At publicstring stringFunction(){
 I am getting syntax error need ; to complete Field Decleration.


I'm sorry, but you both need to learn Java.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

RE: [android-developers] Re: Button for dynamic text

2012-02-22 Thread Tommy Hartz
Copy and paste the code so I can see exactly what you have.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of Pram
Sent: Wednesday, February 22, 2012 5:47 PM
To: Android Developers
Subject: [android-developers] Re: Button for dynamic text

At publicstring stringFunction(){
I am getting syntax error need ; to complete Field Decleration.

On Feb 22, 3:39 pm, Tommy Hartz droi...@gmail.com wrote:
 Why not connect the button click event to a function EX

 public void onClick(View v) {

 Toast.makeText(Num.this, stringFunction(),Toast.LENGTH_SHORT).show();

 }

 Public string stringFunction(){

 If(whatever){

 Return = Hello;

 }
 }

 From: android-developers@googlegroups.com
 [mailto:android-developers@googlegroups.com] On Behalf Of TreKing
 Sent: Wednesday, February 22, 2012 3:22 PM
 To: android-developers@googlegroups.com
 Subject: Re: [android-developers] Re: Button for dynamic text

 On Wed, Feb 22, 2012 at 2:13 PM, Pram goodp...@gmail.com wrote:

 when I try to use return in my if statement that does not work the tv 
 statements do not show anything on the screen when it is executed.

 The code in your original post is extremely hard to read. Try a 
 smaller snippet that illustrates what you're talking about.

 Have you put in logging and used your debugger to step through and see 
 what the code is doing?

 --
 --
 -
 TreKing http://sites.google.com/site/rezmobileapps/treking  - 
 Chicago transit tracking app for Android-powered devices

 --
 You received this message because you are subscribed to the Google 
 Groups Android Developers group.
 To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google Groups
Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en