此代码在Android级4.0的手机设备中运行良好..但与Android 3.0崩溃....
粗体代码是错误日志指向的位置...错误日志的屏幕截图已给出
public class Main扩展Activity { ImageView别墅,公寓,地块,gaButton;
@Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
<b>setContentView(R.layout.main);</b>
//getActionBar().hide();
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.titlebar);
villas=(ImageView)findViewById(R.id.villas);
apartments=(ImageView)findViewById(R.id.apartments);
plots=(ImageView)findViewById(R.id.plots);
}
});
initializeActionBar();
}