13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Monday, March 21, 2011

Java Programming for Google's Android OS

package org.example.calc;

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

public class ActionOne extends Activity  {

TextView textOutTilesNeeded, newWidth, newHeight, newArea;
EditText getInputW, getInputH, getInputArea;
float width, height, area, tilesNeeded;
String tilesNeededString, intWidth, intHeight, intArea;


@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.tile);

textOutTilesNeeded = (TextView) findViewById(R.id.lblTilesNeeded);
newWidth = (EditText) findViewById(R.id.txtTileWidth);
newHeight = (EditText) findViewById(R.id.txtTileHeight);
newArea = (EditText) findViewById(R.id.txtArea2cover);
getInputW = (EditText) findViewById(R.id.txtTileWidth);
getInputH = (EditText) findViewById(R.id.txtTileHeight);
getInputArea = (EditText) findViewById(R.id.txtArea2cover);
Button enter = (Button) findViewById(R.id.btnEnterTile);
enter.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
      // String string_to_float="1234.89";
      // float flt=Float.parseFloat(string_to_float);
  //    EditText et = (EditText) findViewById(R.id.entry1);
  //String hello = et.getText().toString();

intWidth = getInputW.getText().toString();
intHeight = getInputH.getText().toString();
intArea = getInputArea.getText().toString();

// TODO Auto-generated method stub
width = Float.parseFloat(intWidth);
height = Float.parseFloat(intHeight);
area = Float.parseFloat(intArea);

tilesNeeded = ((area)/(width*height));
tilesNeededString = String.valueOf(tilesNeeded);


textOutTilesNeeded.setText(tilesNeededString);


}

private float StringToFloat(String intWidth) {
// TODO Auto-generated method stub
return 0;
}
});
}
// so we can use: onPause, onCreate, etc

}