ActionBarActivity and ActionBar.TabListener is deprecated inside Android Tab Fragment ( Eclipse ApI 22 )

假如想象 提交于 2019-12-04 06:48:28

问题


I am implementing the ActionBar.TabListener in My Tab Fragment .

I updated the API 22, After updating it showing ActionBar.TabListener and ActionBarActivity is deprecated.

Like this i have used in my code

public class Tabview_Landing extends ActionBarActivity  implements ActionBar.TabListener 
{
}

Link help me to solve this.


回答1:


ActionBarActivity was replaced by AppCompatActivity.

Action bar tabs can be replaced by:

  • TabLayout from the Android Design Support Library, with or without a ViewPager; or

  • a ViewPager and your favorite other tab solution for it, whether that be PagerTabStrip or any number of third-party tab implementations; or

  • FragmentTabHost



来源:https://stackoverflow.com/questions/31268916/actionbaractivity-and-actionbar-tablistener-is-deprecated-inside-android-tab-fra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!