应用程序适用于> apk 17,但在apk 11设备自定义操作栏中崩溃无法正常工作

时间:2013-10-14 09:32:50

标签: android-actionbar custom-titlebar

此代码在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();
}

0 个答案:

没有答案