FileDocCategorySizeDatePackage
SoundTest.javaAPI DocAndroid 1.5 API4709Wed May 06 22:41:02 BST 2009com.android.tests.soundtest

SoundTest

public class SoundTest extends android.app.Activity implements android.os.HandlerInterface

Fields Summary
public android.content.Context
mContext
private android.widget.LinearLayout
mLinearLayout
public android.view.ViewGroup.LayoutParams
mParams
android.widget.Button
button
android.widget.Button
button2
private android.view.View.OnClickListener
buttonListener
private android.view.View.OnClickListener
buttonListener2
Constructors Summary
Methods Summary
public voidhandleMessage(android.os.Message arg0)

    
        
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        Window wp = getWindow();
        mContext = wp.getContext();
        mParams = wp.getAttributes();

        mLinearLayout = new LinearLayout(this);
        mLinearLayout.setOrientation(LinearLayout.VERTICAL);
        setContentView(mLinearLayout);

        button = new Button(mContext);
        button.setMinimumWidth(300);
        button.setMinimumHeight(70);
        button.setTextSize(14);
        button.setText("Play sample");
        button.setOnClickListener(buttonListener);

        mLinearLayout.addView(button, new LinearLayout.LayoutParams(
            ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT));
        
        button2 = new Button(mContext);
        button2.setMinimumWidth(300);
        button2.setMinimumHeight(70);
        button2.setTextSize(14);
        button2.setText("Play MIDI");
        button2.setOnClickListener(buttonListener2);

        mLinearLayout.addView(button2, new LinearLayout.LayoutParams(
            ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT));