I'm trying to write an app that has just a big giant button in the
center of the screen that turns on the camera flash, and turns off the
camera flash. I'm pretty new at java development and android
development, so what should I do? This is where I'm starting:

package com.ertemplin.flashlight;

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

public class Flashlight extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTheme(android.R.style.Theme_Light);
        setContentView(R.layout.main);


        class TurnOn extends Activity {
                protected void onCreate(Bundle icicle) {
                        super.onCreate(icicle);

                        final Button button = (Button) 
findViewById(R.id.Button01);
                button.setOnClickListener(new View.OnClickListener() {
                   public void onClick(View v) {
                                        // do the action when the button's 
clicked
                           turnonthelight(light);
                    }
                });
                }
        }
    }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to