package com.chicagoandroid.w150;
import com.chicagoandroid.com.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
import android.widget.TextView;
public class Main extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
FrameLayout layout = (FrameLayout) findViewById(R.id.myLayout);
int fillParent = LayoutParams.FILL_PARENT;
int wrapContent = LayoutParams.WRAP_CONTENT;
layout.addView(new CameraView(this), new LayoutParams(fillParent, fillParent));
layout.addView(new CrosslineView(this), new LayoutParams(fillParent, fillParent));
View view = View.inflate(this, R.layout.text_view, null);
TextView editText = (TextView) view.findViewById(R.id.textView);
double speed = 4; // get GPS speed from previous class
editText.setText("speed: " + speed + "km/h");
layout.addView(editText, new LayoutParams(wrapContent, wrapContent));
}
}