5
現在我正在使用最新版本的appcompat和設計支持庫。setTabSFromPagerAdapter已棄用
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
現在即時通訊面臨一些棄用
private void setupTabLayout() {
mTabLayout = (TabLayout)findViewById(R.id.tab_layout);
mAdapter = new MyPagerAdapter(getSupportFragmentManager());
mPager = (ViewPager)findViewById(R.id.pager);
mPager.setAdapter(mAdapter);
mTabLayout.setTabsFromPagerAdapter(mAdapter); <!-- deprecated -->
mTabLayout.setupWithViewPager(mPager);
}
誰知道我不得不改用..幫助我..謝謝
'setupWithViewPager'調用就足夠了。沒有必要使用兩者。 –
Dude只是將鼠標懸停在警告上,它會直接告訴你如何解決問題。最糟糕的情況 - 谷歌「棄用」的事情,並在4.5秒內找到答案。 – Vucko
它只能說你的方法已被棄用..多數民衆贊成在..並說,把檢查該方法..這不是解決方案..你知道這是正確的。 –