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. Progress Bar without a dialog box


In my application, I am fetching data from server. During fetching
response and parsing it, I want to display a progress bar(Like
spinner) but without a dialog box.

If I am using ProgressDialog then it is also displaying Dialog box. I
had also tried Progress Bar but I have to include it in the XML. My
problem is this that I need to display progress bar in almost every
screen of my application and only at the time when I am fetching data
from the server. So I think, I shouldn't include it in XML of every

Please help me.


2. switch between activity issue

hi all,

I have a application,
main activity called A,
function 1 called B, function 2 called C, function 3 called D,
every function are activitys,
then A will use StartActivityForResult call B then return to A,
and used same method to call C and D,
A->B->A->C->A->D->A->B->A->C.....and so on,
the loop will execute 10000 times,
but system will shutdown when looping the process,

I just confused about *switch activitys*,
does my method have problems for looping it?
may switching activity so many times to cause shutdown issue?



3. Data Warehousing courses,sap,Microsoft Technologies @

4. Leave crashed app

5. accesing a sys/class

6. OOT: Video Penampakan iPad 2

7. Looking for a theme developer