package mars.activity;import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;public class Activity02 extends Activity {
/** Called when the activity is first created. */
private Button myButton = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myButton = (Button)findViewById(R.id.myButton);
}
class MyButtonLisener implements OnClickListener{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent =new Intent();
intent.setClass(Activity02.class, OtherActivity.class);
}
}
}请各位高手帮我看下,我照着视频一步一步来的,为什么intent.setClass下面总有红色的波浪线
解决方案 »
- android seekbar 有没有从右到左的
- 我的Android手机连接不上我的电脑
- 进来给分了。Android中setCompoundDrawablesWithIntrinsicBounds问题。
- 使用XMPP协议连接服务器时,总是报错,错误代码如下:
- 读取联系人信息问题
- 求教,怎么获得ListView中第n行中CheckBox控件的check状态?或者说,怎样用CheckBox实现多选?
- 求wap和net连网的例子
- 各位老大们,S3C2440的开发板能移植android系统吗?
- adb经常offline
- Object cannot be converted to JSONArray
- android 相关
- eclipse运行出错
public Intent setClass (Context packageContext, Class<?> cls)Since: API Level 1
Convenience for calling setComponent(ComponentName) with the name returned by a Class object.
ParameterspackageContext A Context of the application package implementing this class.
cls The class name to set, equivalent to setClassName(context, cls.getName()).
ReturnsReturns the same Intent object, for chaining multiple calls into a single statement.