1

I want to make a viewpager which is just like latest facebook application.

facebook latest application snap

and the problem is with tabs.

however i tried to make it, but i need icons with text in tabs and multiple fragments and layouts associated with it.

two issue occurred when i tried to develop. 1. I compromised with my UI, and tried putting static icons in it, but they don't change on selection and they don't even have badge like in facebook application. 2. when i put that code in my application which i have developed in demo app, it shows error and after researching i found that my application don't have an actionbar. so it was giving error after calling getActionBar.

please someone can provide any example or link to that which can help me.

Shivansh
  • 906
  • 12
  • 25

1 Answers1

0

You can refer to the official solution: http://developer.android.com/training/implementing-navigation/lateral.html

Or try this awsome lib: https://github.com/astuetz/PagerSlidingTabStrip

Race
  • 384
  • 1
  • 11
  • 27
  • 1
    1. http://developer.android.com/training/implementing-navigation/lateral.html | imported project and project have errors, even after adding support library 2.https://github.com/astuetz/PagerSlidingTabStrip | Does it provide to have an icon in tab? and does the icon changes when it is selected? like in facebook application. i have tried both of them. – Shivansh Jul 15 '14 at 09:19
  • 1. You just add the latest android-support-v4.jar lib, that will clean all errors. 2. PagerSlidingTabStrip provide TEXT and ICON tab, but no icon-with-text tab by default, but you can modify a few code to implement this. – Race Jul 15 '14 at 13:10