WEB开发网
开发学院手机开发Android 开发 Android CheckBox ?算器开发(源码) 阅读

Android CheckBox ?算器开发(源码)

 2010-05-28 14:57:00 来源:WEB开发网   
核心提示:全部代瘁如下:代码1 package cn.terry;23 import android.app.Activity;4 import android.app.AlertDialog;5 import android.content.DialogInterface;6 import android.os.Bundle;

全部代瘁如下:

代码

1 package cn.terry;

2

3 import android.app.Activity;

4 import android.app.AlertDialog;

5 import android.content.DialogInterface;

6 import android.os.Bundle;

7 import android.view.KeyEvent;

8 import android.view.View;

9 import android.view.View.OnKeyListener;

10 import android.widget.*;

11 import android.widget.CompoundButton.OnCheckedChangeListener;

12 public class CheckBoxCalc extends Activity {

13 private TextView mTextView;

14 private TextView mTextView2;

15 private TextView mTextView3;

16 private TextView mTextView4;

17 private CheckBox mBox1;

18 private CheckBox mBox2;

19 private CheckBox mBox3;

20 private CheckBox mBox4;

21 private EditText mEditText;

22 private EditText mEditText1;

23 private boolean isbool=true;

24 private OnCheckedChangeListener listner;

25 private Float Temp;

26 private String Experssion;

27 private OnKeyListener list;

28 /** Called when the activity is first created. */

29 @Override

30 public void onCreate(Bundle savedInstanceState) {

31 super.onCreate(savedInstanceState);

32 setContentView(R.layout.main);

33 mTextView=(TextView)findViewById(R.id.result1);

34 mTextView2=(TextView)findViewById(R.id.result2);

35 mTextView3=(TextView)findViewById(R.id.result3);

36 mTextView4=(TextView)findViewById(R.id.result4);

37 mBox1=(CheckBox)findViewById(R.id.Plus); //加?乘除

38 mBox2=(CheckBox)findViewById(R.id.Cut);

39 mBox3=(CheckBox)findViewById(R.id.Ride);

40 mBox4=(CheckBox)findViewById(R.id.Except);

41 mEditText=(EditText)findViewById(R.id.first);

上一页  1 2 3 4 5 6  下一页

Tags:Android CheckBox 开发

编辑录入:coldstar [复制链接] [打 印]
赞助商链接