出现的错误:
XML文件中
<ImageButton
android:id="@+id/cximg_btn"
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="fitStart"
android:src="@drawable/dsd"
/>
JAVA文件
private Button cximg_btn;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.chaxun);
czlistview=(ListView) findViewById(R.id.czlistview);
cximg_btn=(Button) findViewById(R.id.cximg_btn);
cz_et=(EditText) findViewById(R.id.cz_et);
cximg_btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
cz();//调用的方法
}
});
XML文件中
<ImageButton
android:id="@+id/cximg_btn"
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="fitStart"
android:src="@drawable/dsd"
/>
JAVA文件
private Button cximg_btn;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.chaxun);
czlistview=(ListView) findViewById(R.id.czlistview);
cximg_btn=(Button) findViewById(R.id.cximg_btn);
cz_et=(EditText) findViewById(R.id.cz_et);
cximg_btn.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
cz();//调用的方法
}
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货