• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tab Layout crashes on startup

First of all I would like to greet everybody. I am new in Android development and it seems like I am having an issue with tabs. I tried to create very simple tabs but the program crashes. I used Intent. But interestingly, when I just refer to TextView ID that was created in the xml file saying, setContent(R.id.tab1) for example, it does work. But when I change it to new Intent().setClass(this,FirstTab.class) which has the same TextView it does not work and crashes on startup. Any ideas?
 
Back
Top Bottom