-4

i want to design the ActionBar as it is in below figure , can any one help me out.

enter image description here

enter image description here

Uday
  • 1,619
  • 3
  • 23
  • 48

2 Answers2

1

There are so many ways to implement this. you can use Holoeverywhere library to achieve this based on your screenshot.

https://github.com/Prototik/HoloEverywhere

Shadow
  • 6,864
  • 6
  • 44
  • 93
0

everything we need to implement our slide transitions (created from the previous post), will happen in the onTabSelected() callback

create a public member in calling activity which is instantiated to -1.

public void onTabSelected(Tab tab, FragmentTransaction ft) {              
      ...                
      //if moving to tab on the left, slide in from left  
      if(tab.getPosition() > mActivity.lastSelectedTab)  
      {  
           ft.setCustomAnimations(R.animator.tabsliderin, R.animator.tabsliderout);  
      }  
      // else slide in from right  
      else  
      {  
           ft.setCustomAnimations(R.animator.tabslidein_right, R.animator.tabslideout_right);  
      }              

      mActivity.lastSelectedTab = tab.getPosition();    
      ...  
 }  
Ankur
  • 5,086
  • 19
  • 37
  • 62