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. upgrade wiigo Firmware 1.6 to Android 2.1 Eclaire

Apa sudah ada yg melakukannya....soalnya pengen upgrade cuma blum tau
caranya gimana Hanphone WIIGO besutan Indosat bisa di upgrade ke android yg
terbaru.


Tel : +6288268011535 Email : syarifuddin.mu...@gmail.com
Signature powered by
<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign=footer>
WiseStamp<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign=footer>

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

2. install samdroidkitchn gmn ya???

install samdroidkitchn gmn ya???

-- 
===============
"Indonesian Android Community [id-android]"

PING'S mobile
Email: sa...@pings-mobile.com  Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com  Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com  Ph. (031) 91555898
--------------------

Aturan Jual/Kloteran ID-Android  http://goo.gl/azW7

3. SPICA sh

4. Indeterminate ProgressDialog Spinner Stops

5. help... android market dissapear

6. (WTA) Running Process 100%

7. Minta testimoni bp rudi