Well I know some java, but this seems to be the problem
public void onClick(View v) {
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.
A suggestion I got was to use the code below, but I am not sure where
to put the first private void, or what to take out of my code.
You can define your own method at Activity level, such as:
private void onTextEdited(String content) {
// deal with the String
}
In the onClick method of your OnClickListener, you can call it such
as:
public void onClick(View v) {
EditText myEditText = (EditText) findViewById(R.id.PleaseEnter);
onTextEdited(myEditText.getText().toString());
}
On Feb 22, 2:54 pm, TreKing <[email protected]> wrote:
> On Wed, Feb 22, 2012 at 1:45 PM, Pram <[email protected]> wrote:
> > My problem is that the button line has public void ... after this I am
> > trying to use if statements and return methods, but because of the public
> > void, the return method can not return anything. I tried to close the
> > public void, but I am getting errors.
>
> How well do you know Java? It sounds like you're getting hung up over
> language syntax and semantics. If that's the case, you need to brush up on
> Java, which is off-topic for this list.
>
> -------------------------------------------------------------------------------------------------
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en