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. Don't understand how to use SurfaceView for my game, have it working with nomrla View.

*     **visit my site and earn more money**  *

*  http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

* ** http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/*

*  **http://latesttechnologyinfo.com/**  *

* http://latesttechnologyinfo.com/*

--~--~---------~--~----~------------~-------~--~----~

2. How to add Google Maps library, Maps to the Android 1.5 version device?

Try adb remount

XC He
2009/6/2 Subba <raochoud...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~

3. no way to scroll through AutoCompleteTextView in landscape with onscreen keyboard

4. no way to scroll through AutoCompleteTextView in landscape with onscreen keyboard

5. Don't understand how to use SurfaceView for my game, have it working with nomrla View.

6. how to install android market and video player

7. SoftHashMap implementation - For use as a Cache of thumbnails