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.app.Activity;
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. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);

        title = (TextView)this.findViewById(R.id.title);
        minsattitle = (TextView)this.findViewById(R.id.minsattitle);
        minustitle = (TextView)this.findViewById(R.id.minustitle);
        gmtinput = (TextView)this.findViewById(R.id.gmtinput);
        gmtbutton = (Button)this.findViewById(R.id.gmtbutton);
        gmtbutton.setOnClickListener(this);
    }

        public void onClick(View v) {
                calculateGmt();
        }

        @SuppressWarnings("null")
        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. RSS feeds

ok i just started with some android application development !!!
and want to get data from RSS feeds of a few websites... how do i do
that ?
I've looked in quite a few books and online but cudnt really find
anything substantial...
can any1 help me out ?

-- 

2. Can I get design doc on Audio Flinger

Hi

I Want to understand the audioflinger and the audio HAL in android 25E.
16. Is there any document on this. Any suggestion is appreciated.

Thanks in advance

-- 

3. how to pause and stop a changing ImageView

4. Repeating alarm in Calendar app

5. need guidance for project searchable dictionary

6. error: Error: No resource found that matches the given name (at 'entries' with value '@arrays/items').

7. error: Error: No resource found that matches the given name (at 'entries' with value '@arrays/items').