Why do I get an error while trying to set the content of a tabspec in android?

前端 未结 3 945
暗喜
暗喜 2020-12-18 07:37

I have an android activity in which I\'m using tabs.

public class UnitActivity extends TabActivity {
  @Override
  public void onCreate(Bundle savedInstanceS         


        
3条回答
  •  长情又很酷
    2020-12-18 07:47

    You also have to use LayoutInflater after TabHost

    LayoutInflater.from(this).inflate(R.layout.unit_data, tabHost.getTabContentView(), true);

    I also got stuck with this and finally figure it out.

提交回复
热议问题