Hello,
I try to implement one simple program: When I click the button, it will popup full size window rather than showalert(…). Referred the tutorial of “Generalized File Manager”, I have written following code. But there is no response when I click the button. Please help to check and your suggestion are highly appreciated.
massmoss
1.
package com.wirelessculture.MainActivity;
import android.app.Activity;
import android.os.Bundle;
import java.text.NumberFormat;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
Button calc1 = (Button)this.findViewById(R.id.calc1);
calc1.setOnClickListener(calc1OnClick); //Popup new Window by click
}
OnClickListener calc1OnClick = new OnClickListener()
{
public void onClick(View v) {
//Popup one full size window
PopWindow myPop=new PopWindow();
}
};
}
2.
package com.wirelessculture.MainActivity;
import android.app.Activity;
import android.os.Bundle;
import java.text.NumberFormat;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
public class PopWindow extends Activity{
@Override
protected void onCreate(Bundle icicle) {
// TODO Auto-generated method stub
super.onCreate(icicle);
setContentView(R.layout.main);
this.setTheme(1);
}
}

