Any idea why the following code crashes the app? It happens in calculateGmt()

by Traveler » Wed, 21 Apr 2010 11:35:31 GMT

Sponsored Links
 package Adkins.GMTpackage;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.EditText;

public class GMTactivity extends Activity implements OnClickListener {
        TextView title;
        TextView minsattitle;
        TextView minustitle;
        TextView minsatoutput;
        TextView minusoutput;
        TextView gmtinput;
    Button gmtbutton;

        /** Called when the activity is first created. */
    public void onCreate(Bundle icicle) {

        title = (TextView)this.findViewById(;
        minsattitle = (TextView)this.findViewById(;
        minustitle = (TextView)this.findViewById(;
        gmtinput = (TextView)this.findViewById(;
        gmtbutton = (Button)this.findViewById(;

        public void onClick(View v) {

        protected void calculateGmt() {

                double val = Double.parseDouble(gmtinput.getText().toString());
                // in a real app, we'd get this off the 'net
                minsatoutput.setText(Double.toString(val * 2));


Other Threads

1. video basic sample

Sorry GoneFishing for private message, let me turn it public...

I started in my current machine an intance of Tomcat and published a
folder with severals MP4 and 3GP files... so, my URL String was
something like that: "http://localhost:8080/videos/fileOne.mp4"...
But, when I try to use this file.. or any other with 3GP extensions,
nothing happens! I receive the same black screen in my emulator.
Does any body here have another tip?

Thanks in advance for this healthy discussion about this issue...


2. The Code One


3. Convert Android application in android web application

4. selecting text

5. referring to res-id across packages

6. How to use a WindowAnimation?

7. Android Reviews