Пример #1
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /*getSupportActionBar().setTitle("Event Details");
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);*/
    setContentView(R.layout.event_detail_view);

    ButterKnife.bind(this);

    Bundle b = this.getIntent().getExtras();
    Event event = (Event) b.getSerializable("curItem");

    lblTitle.setText(event.getTitle());
    lblEventDetail.setText(
        "From " + event.getStartdate() + " till " + event.getEnddate() + " at " + event.getCity());
    U.LoadImage(this, iv, event.getImgName());

    ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
    viewPager.setAdapter(new SampleFragmentPagerAdapter(getSupportFragmentManager(), event));

    PagerSlidingTabStrip tabsStrip = (PagerSlidingTabStrip) findViewById(R.id.tabs);
    tabsStrip.setShouldExpand(true);
    tabsStrip.setViewPager(viewPager);
    tabsStrip.setShouldExpand(false);

    final Toolbar advToolbar = (Toolbar) findViewById(R.id.my_awesome_toolbar);
    advToolbar.setTitle("Event Detail");
    advToolbar.setTitleTextColor(R.color.colorPrimaryDark);
    advToolbar.inflateMenu(R.menu.advance_search);
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final SharedPreferences sp =
        this.getActivity().getSharedPreferences("linefriend", Context.MODE_APPEND);

    View rootView = inflater.inflate(R.layout.fragment_category_all, container, false);

    tabs = (PagerSlidingTabStrip) rootView.findViewById(R.id.tabs);
    pager = (ViewPager) rootView.findViewById(R.id.pager);
    adapter = new MyPagerAdapter(this.getChildFragmentManager());

    pager.setAdapter(adapter);

    final int pageMargin =
        (int)
            TypedValue.applyDimension(
                TypedValue.COMPLEX_UNIT_DIP, 4, getResources().getDisplayMetrics());
    pager.setPageMargin(pageMargin);

    tabs.setTextSize(DisplayUtil.sp2px(this.getActivity(), 15));
    //		tabs.setTextColor(Color.parseColor("#828181"));
    tabs.setViewPager(pager);

    return rootView;
  }
Пример #3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    //        fab.setOnClickListener(new View.OnClickListener() {
    //            @Override
    //            public void onClick(View view) {
    //                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
    //                        .setAction("Action", null).show();
    //            }
    //        });
    pagerTab = (PagerSlidingTabStrip) findViewById(R.id.pager_tabs);
    viewPager = (ViewPager) findViewById(R.id.view_pager);
    viewPager.setOffscreenPageLimit(3);
    viewPager.setAdapter(new PagerAdapter(getSupportFragmentManager()));
    pagerTab.setViewPager(viewPager);
    pagerTab.setOnPageChangeListener(
        new ViewPager.OnPageChangeListener() {
          @Override
          public void onPageScrolled(
              int position, float positionOffset, int positionOffsetPixels) {}

          @Override
          public void onPageSelected(int position) {
            if (position == 0) {}
          }

          @Override
          public void onPageScrollStateChanged(int state) {}
        });
  }
Пример #4
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    if (id == R.id.action_settings) {
      return true;
    }

    if (id == R.id.action_search) {
      Intent intent = new Intent(this, SearchActivity.class);
      startActivity(intent);

      tabs.animate().translationY(-tabs.getHeight());
      viewPager.animate().translationY(-tabs.getHeight());
      isPageViewWithOffset = Boolean.TRUE;

      // this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
      // View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);

      View contactFragmentRootView = ((ContactsFragment) viewPagerAdapter.getItem(1)).getRootView();
      contactFragmentRootView.invalidate();

      return true;
    }

    return super.onOptionsItemSelected(item);
  }
Пример #5
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_child_layout, null);
    mViewPager = (ViewPager) view.findViewById(R.id.content_pager);
    mMyPagerAdapter = new BbsPageAdapter(context, getFragmentManager());
    mFragment = mMyPagerAdapter.getItem(0);
    mViewPager.setAdapter(mMyPagerAdapter);
    mViewPager.setPageTransformer(true, new ZoomOutPageTransformer());
    mPagerSlidingTabStrip = (PagerSlidingTabStrip) view.findViewById(R.id.tabs);

    mViewPager.setOnPageChangeListener(
        new OnPageChangeListener() {

          @Override
          public void onPageSelected(int arg0) {
            mFragment = mMyPagerAdapter.getItem(arg0);
          }

          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {}

          @Override
          public void onPageScrollStateChanged(int arg0) {}
        });
    mPagerSlidingTabStrip.setViewPager(mViewPager);
    // mPagerSlidingTabStrip.setTextColor(Color.parseColor("#fe4200"));
    mPagerSlidingTabStrip.setTextSize(26);
    mPagerSlidingTabStrip.setSelectTabTextSize(28);
    return view;
  }
Пример #6
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager);
    viewPager.setAdapter(new TabsAdapter(getSupportFragmentManager()));
    PagerSlidingTabStrip pagerSlidingTabStrip = (PagerSlidingTabStrip) findViewById(R.id.tabs);
    pagerSlidingTabStrip.setViewPager(viewPager);
  }
  // region Lifecycle Methods
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_quick_return_twitter);
    ButterKnife.inject(this);

    mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());

    // Set up the ViewPager with the sections adapter.
    mViewPager.setAdapter(mSectionsPagerAdapter);

    mTabs.setAllCaps(false);
    mTabs.setShouldExpand(true);
    mTabs.setTextSize(QuickReturnUtils.dp2px(this, 16));
    mTabs.setTabBackground(R.drawable.selector_bg_tab);
    mTabs.setIndicatorColorResource(R.color.steel_blue);
    mTabs.setIndicatorHeight(QuickReturnUtils.dp2px(this, 5));
    mTabs.setOnPageChangeListener(mTabsOnPageChangeListener);
    mTabs.setViewPager(mViewPager);

    // Set first tab selected
    mTabsLinearLayout = ((LinearLayout) mTabs.getChildAt(0));

    for (int i = 0; i < mTabsLinearLayout.getChildCount(); i++) {
      TextView tv = (TextView) mTabsLinearLayout.getChildAt(i);

      if (i == 0) {
        tv.setTextColor(getResources().getColor(R.color.steel_blue));
        tv.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/Roboto-Medium.ttf"));
      } else {
        tv.setTextColor(getResources().getColor(R.color.steel_blue));
        tv.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/Roboto-Light.ttf"));
      }
    }
  }
Пример #8
0
 @Override
 public View onCreateView(
     LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
   View rootView = inflater.inflate(R.layout.blog_fragment_main, container, false);
   ButterKnife.inject(this, rootView);
   vpDate.setAdapter(new BlogFragmentListAdapter(getChildFragmentManager()));
   tabs.setViewPager(vpDate);
   tabs.setTextColor(Color.WHITE);
   tabs.setBackgroundColor(getResources().getColor(R.color.blue));
   write.setOnClickListener(v -> startActivity(new Intent(getActivity(), WriteActivity.class)));
   return rootView;
 }
 private void changeTabTitleColors(int position) {
   ((TextView) ((ViewGroup) tabCategories.getChildAt(0)).getChildAt(0))
       .setTextColor(getResources().getColor(R.color.secondary_text));
   ((TextView) ((ViewGroup) tabCategories.getChildAt(0)).getChildAt(1))
       .setTextColor(getResources().getColor(R.color.secondary_text));
   if (tabCount == 3) {
     ((TextView) ((ViewGroup) tabCategories.getChildAt(0)).getChildAt(2))
         .setTextColor(getResources().getColor(R.color.secondary_text));
   }
   ((TextView) ((ViewGroup) tabCategories.getChildAt(0)).getChildAt(position))
       .setTextColor(getResources().getColor(R.color.primary_text));
 }
Пример #10
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View rootView = inflater.inflate(R.layout.fragment_chart, container, false);
    tabs = (PagerSlidingTabStrip) rootView.findViewById(R.id.tabs);
    pager = (ViewPager) rootView.findViewById(R.id.pager);
    adapter =
        new MyPagerAdapter(getActivity().getSupportFragmentManager(), arrayTabs, arrayChartUrl);
    pager.setAdapter(adapter);
    tabs.setShouldExpand(true);
    tabs.setViewPager(pager);
    return rootView;
  }
  // region Lifecycle Methods
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_quick_return_facebook);
    ButterKnife.inject(this);

    mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());

    // Set up the ViewPager with the sections adapter.
    mViewPager.setAdapter(mSectionsPagerAdapter);

    mTabs.setAllCaps(false);
    mTabs.setShouldExpand(true);
    //        mTabs.setTextSize(QuickReturnUtils.dp2px(this, 16));
    //        mTabs.setTabBackground(R.drawable.selector_bg_tab);
    mTabs.setIndicatorColorResource(R.color.steel_blue);
    mTabs.setIndicatorHeight(QuickReturnUtils.dp2px(this, 5));
    mTabs.setDividerColor(getResources().getColor(android.R.color.transparent));
    //        mTabs.setBackgroundColor(getResources().getColor(R.color.indigo));

    mTabs.setOnPageChangeListener(mTabsOnPageChangeListener);

    mTabs.setViewPager(mViewPager);

    // Set first tab selected
    mTabsLinearLayout = ((LinearLayout) mTabs.getChildAt(0));
    ImageButton ib = (ImageButton) mTabsLinearLayout.getChildAt(0);
    ib.setImageResource(R.drawable.ic_action_event_highlighted);
  }
Пример #12
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_friends);

    This = this;
    Log.d(TAG, "Info oncreate");
    ButterKnife.bind(this);
    parseUser = ParseUser.getCurrentUser();

    alertD = new Alert(this);

    isLoadData = false;

    final ViewPager vpPager = (ViewPager) findViewById(R.id.vpPager);
    adapterViewPager = new MyPagerAdapter(getSupportFragmentManager());
    vpPager.setAdapter(adapterViewPager);

    // Check data extra
    Intent intent = getIntent();
    Bundle extras = intent.getExtras();
    if (extras != null) {
      String jsonData = extras.getString("com.parse.Data");
      JSONObject json = null;
      try {
        json = new JSONObject(jsonData);
        String action = json.getString("action");

        switch (action) {
          case "friends_invite":
            vpPager.setCurrentItem(2);
            break;
          case "friends_search":
            vpPager.setCurrentItem(1);
            break;
          default:
            vpPager.setCurrentItem(0);
        }

      } catch (JSONException e) {
        e.printStackTrace();
      }
    }

    PagerSlidingTabStrip tabsStrip = (PagerSlidingTabStrip) findViewById(R.id.tabs);
    LinearLayout view = (LinearLayout) tabsStrip.getChildAt(0);
    tabsStrip.setViewPager(vpPager);

    loadData();
  }
Пример #13
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ViewGroup root =
        (ViewGroup) inflater.inflate(R.layout.fragment_default_view_pager, container, false);
    ButterKnife.inject(this, root);

    Bundle tvArgs = new Bundle(), radioArgs = new Bundle();
    if (getArguments() != null) {
      tvArgs.putAll(getArguments());
      radioArgs.putAll(getArguments());
    }
    tvArgs.putInt(PVR_LIST_TYPE_KEY, LIST_TV_CHANNELS);
    radioArgs.putInt(PVR_LIST_TYPE_KEY, LIST_RADIO_CHANNELS);

    tabsAdapter =
        new TabsAdapter(getActivity(), getChildFragmentManager())
            .addTab(PVRChannelsListFragment.class, tvArgs, R.string.tv_channels, 1)
            .addTab(PVRChannelsListFragment.class, radioArgs, R.string.radio_channels, 2)
            .addTab(PVRRecordingsListFragment.class, getArguments(), R.string.recordings, 3);

    viewPager.setAdapter(tabsAdapter);
    pagerTabStrip.setViewPager(viewPager);

    return root;
  }
Пример #14
0
 @Override
 public void onListsChanged() {
   // refresh list adapter
   mListsAdapter.onListsChanged();
   // update indicator and view pager
   mTabs.notifyDataSetChanged();
 }
Пример #15
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
    // 头部图片集
    ViewPager vpImage = (ViewPager) findViewById(R.id.imagepager);
    vpImage.setAdapter(new MyHeadPicAdapter(this));

    // ScrollableLayout
    mScrollLayout = (ScrollableLayout) findViewById(R.id.scrollableLayout);
    // 扩展点击头部滑动范围
    //        int headHeight = getResources().getDimensionPixelSize(R.dimen.head_height);
    //        int tabHeight = getResources().getDimensionPixelSize(R.dimen.tab_height);
    //        mScrollLayout.setClickHeadExpand(headHeight + tabHeight);
    mFragmentList = new ArrayList<>();
    mFragmentList.add(ListFragment.newInstance(0));
    mFragmentList.add(ScrollViewFragment.newInstance(1));
    mFragmentList.add(ListFragment.newInstance(2));

    List<String> titleList = new ArrayList<>();
    titleList.add("tab0");
    titleList.add("tab1");
    titleList.add("tab2");
    viewPager.setAdapter(
        new MyFragmentPagerAdapter(getSupportFragmentManager(), mFragmentList, titleList));
    mScrollLayout.getHelper().setCurrentScrollableContainer(mFragmentList.get(0));
    PagerSlidingTabStrip pagerSlidingTabStrip =
        (PagerSlidingTabStrip) findViewById(R.id.pagerStrip);
    pagerSlidingTabStrip.setViewPager(viewPager);
    pagerSlidingTabStrip.setOnPageChangeListener(
        new ViewPager.OnPageChangeListener() {
          @Override
          public void onPageScrolled(int i, float v, int i2) {}

          @Override
          public void onPageSelected(int i) {
            Log.e("onPageSelected", "page:" + i);
            mScrollLayout.getHelper().setCurrentScrollableContainer(mFragmentList.get(i));
          }

          @Override
          public void onPageScrollStateChanged(int i) {}
        });
    viewPager.setCurrentItem(0);
  }
 public void onPageSelected(int i)
 {
     PagerSlidingTabStrip.access$1300(PagerSlidingTabStrip.this, i);
     if (delegatePageListener != null)
     {
         delegatePageListener.ageSelected(i);
     }
 }
Пример #17
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View x = inflater.inflate(R.layout.viewpager, container, false);
    tabs = (PagerSlidingTabStrip) x.findViewById(R.id.tab_strip);
    viewPager = (ViewPager) x.findViewById(R.id.viewpager);
    viewPager.setAdapter(new MyAdapter(getChildFragmentManager()));
    tabs.post(
        new Runnable() {
          @Override
          public void run() {
            tabs.setViewPager(viewPager);
          }
        });
    tabs.setTextColorResource(R.color.white);
    return x;
  }
Пример #18
0
  private void setupViews() {
    mListsAdapter = new ListsPagerAdapter(getSupportFragmentManager(), this);

    mPager = (ViewPager) findViewById(R.id.pagerLists);
    mPager.setAdapter(mListsAdapter);

    mTabs = (PagerSlidingTabStrip) findViewById(R.id.tabsLists);
    mTabs.setViewPager(mPager);
    mTabs.setOnTabClickListener(
        new OnTabClickListener() {
          @Override
          public void onTabClick(int position) {
            if (mPager.getCurrentItem() == position) {
              String listId = mListsAdapter.getListId(position);
              ListManageDialogFragment.showListManageDialog(listId, getSupportFragmentManager());
            }
          }
        });
  }
 public void onPageScrolled(int i, float f, int j)
 {
     PagerSlidingTabStrip.access$1002(PagerSlidingTabStrip.this, i);
     PagerSlidingTabStrip.access$1102(PagerSlidingTabStrip.this, f);
     int k;
     if (PagerSlidingTabStrip.access$1400(PagerSlidingTabStrip.this) > 0)
     {
         k = (int)((float)PagerSlidingTabStrip.access$300(PagerSlidingTabStrip.this).getChildAt(i).getWidth() * f);
     } else
     {
         k = 0;
     }
     PagerSlidingTabStrip.access$1200(PagerSlidingTabStrip.this, i, k);
     invalidate();
     if (delegatePageListener != null)
     {
         delegatePageListener.ageScrolled(i, f, j);
     }
 }
Пример #20
0
 private void setTabsValue() {
   tabs.setShouldExpand(true);
   tabs.setDividerColor(Color.TRANSPARENT);
   tabs.setUnderlineHeight((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, dm));
   tabs.setIndicatorHeight((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 4, dm));
   tabs.setTextSize((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, dm));
   tabs.setIndicatorColor(Color.parseColor("#45c01a"));
   tabs.setTabBackground(0);
 }
Пример #21
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View v = inflater.inflate(R.layout.swipe, container, false);
    // TextView textV = (TextView) v.findViewById(R.id.drawer_itemName);
    // ImageView view = (ImageView) v.findViewById(R.id.drawer_icon);
    // view.setImageResource(R.drawable.ic_drawer);
    // textV.setText("skask");
    // Get the ViewPager and set it's PagerAdapter so that it can display items
    ViewPager viewPager = (ViewPager) v.findViewById(R.id.viewpager);
    viewPager.setAdapter(new SampleFragmentPagerAdapter(getFragmentManager()));

    // Give the PagerSlidingTabStrip the ViewPager

    PagerSlidingTabStrip tabsStrip = (PagerSlidingTabStrip) v.findViewById(R.id.tabs);
    // Attach the view pager to the tab strip
    tabsStrip.setViewPager(viewPager);
    return v;
  }
Пример #22
0
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    mVPager = (ViewPager) mFragmentView.findViewById(R.id.viewpager2);
    mUserProfilePagerAdapter = new UserProfilePagerAdapter(getChildFragmentManager());
    mVPager.setAdapter(mUserProfilePagerAdapter);
    mTabStrip = (PagerSlidingTabStrip) mFragmentView.findViewById(R.id.tabs2);
    mTabStrip.setViewPager(mVPager);
    mUserProfilePagerAdapter.notifyDataSetChanged();
  }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.activity_fragment_cut_pager_sliding_tab_strip);
   pagerSlidingTabStrip =
       (PagerSlidingTabStrip) findViewById(R.id.activity_fragnent_cut_pager_sliding_tab_strip);
   viewpager =
       (ViewPager) findViewById(R.id.activity_fragnent_cut_pager_sliding_tab_strip_viewpager);
   viewpager.setAdapter(new MyFragmentPagerAdapter(getSupportFragmentManager()));
   pagerSlidingTabStrip.setViewPager(viewpager);
 }
 private void changeTabsFont() {
   ViewGroup vg = (ViewGroup) tabCategories.getChildAt(0);
   int tabsCount = vg.getChildCount();
   for (int j = 0; j < tabsCount; j++) {
     TextView textView = (TextView) vg.getChildAt(j);
     textView.setWidth(App.screenWidth / tabCount);
     // textView.setTypeface(App.englishFont);
     textView.setTextColor(getResources().getColor(R.color.secondary_text));
     textView.setTextSize(14);
   }
 }
Пример #25
0
  @TargetApi(Build.VERSION_CODES.M)
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    UmengUpdateAgent.update(this);

    mainViewPager = (ViewPager) findViewById(R.id.main_viewPager);
    // mainViewPager.setOffscreenPageLimit(1);
    mainViewPager.setAdapter(new SampleFragmentPagerAdapter(getSupportFragmentManager()));
    pagerSlidingTabStrip = (PagerSlidingTabStrip) findViewById(R.id.tab_indicator);
    pagerSlidingTabStrip.setViewPager(mainViewPager);

    // 指示条颜色
    pagerSlidingTabStrip.setIndicatorColor(R.color.blue_500);
    // 指示条高度
    pagerSlidingTabStrip.setIndicatorHeight(
        (int)
            TypedValue.applyDimension(
                TypedValue.COMPLEX_UNIT_DIP, 3, getResources().getDisplayMetrics()));
  }
Пример #26
0
  /** 初始化Fragment和设置适配器 */
  private void initPager() {
    mPagerSlidingTabStrip = (PagerSlidingTabStrip) getView().findViewById(R.id.tabs);
    mViewPager = (ViewPager) getView().findViewById(R.id.pager);
    String[] titles = {"工点", "人员", "基点"};
    mViewPager.setAdapter(new MyPagerAdapter(getChildFragmentManager(), titles));
    mPagerSlidingTabStrip.setViewPager(mViewPager);
    mPagerSlidingTabStrip.setOnPageChangeListener(
        new ViewPager.OnPageChangeListener() {

          @Override
          public void onPageSelected(int arg0) {
            // colorChange(arg0);
          }

          @Override
          public void onPageScrolled(int arg0, float arg1, int arg2) {}

          @Override
          public void onPageScrollStateChanged(int arg0) {}
        });
  }
Пример #27
0
  @Override
  public void onResume() {
    super.onResume();

    if (isPageViewWithOffset) {
      tabs.animate().translationY(0);
      viewPager.animate().translationY(0);
      isPageViewWithOffset = Boolean.FALSE;
    }

    // this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
  }
Пример #28
0
  // Activity Callbacks __________________________________________________________________________
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity);
    this.getSupportActionBar().setElevation(0);

    getWindow().setSharedElementExitTransition(new Slide());
    getWindow().setSharedElementEnterTransition(new Slide());

    tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
    viewPager = (ViewPager) findViewById(R.id.pager);
    viewPagerAdapter = new ContactsAdapter(this.getSupportFragmentManager(), this);

    viewPager.setAdapter(viewPagerAdapter);

    tabs.setShouldExpand(true);
    tabs.setTextColor(getResources().getColor(R.color.text_primary));
    tabs.setDividerColor(getResources().getColor(R.color.primary));
    tabs.setIndicatorColorResource(R.color.text_primary);
    tabs.setIndicatorHeight(7);

    // Bind the tabs to the ViewPager
    tabs.setViewPager(viewPager);

    // Start in Contacts Fragment
    viewPager.setCurrentItem(1);

    // Listener for slide animation on searchable selected
    setOnSearchableListener();

    // Configure custom-searchable UI
    // CustomSearchableInfo.setTransparencyColor(Color.parseColor("#0288D1"));
  }
 public void onPageScrollStateChanged(int i)
 {
     if (i == 0)
     {
         PagerSlidingTabStrip.access$1200(PagerSlidingTabStrip.this, PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getCurrentItem(), 0);
     }
     View view = PagerSlidingTabStrip.access$300(PagerSlidingTabStrip.this).getChildAt(PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getCurrentItem());
     PagerSlidingTabStrip.access$1500(PagerSlidingTabStrip.this, view);
     if (PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getCurrentItem() - 1 >= 0)
     {
         View view1 = PagerSlidingTabStrip.access$300(PagerSlidingTabStrip.this).getChildAt(PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getCurrentItem() - 1);
         PagerSlidingTabStrip.access$400(PagerSlidingTabStrip.this, view1);
     }
     if (PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getCurrentItem() + 1 <= PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getAdapter().getCount() - 1)
     {
         View view2 = PagerSlidingTabStrip.access$300(PagerSlidingTabStrip.this).getChildAt(PagerSlidingTabStrip.access$200(PagerSlidingTabStrip.this).getCurrentItem() + 1);
         PagerSlidingTabStrip.access$400(PagerSlidingTabStrip.this, view2);
     }
     if (delegatePageListener != null)
     {
         delegatePageListener.ageScrollStateChanged(i);
     }
 }
  private void setupSlidingTabs(ViewPager vpPager) {
    tabs = (PagerSlidingTabStrip) findViewById(R.id.slidingTabStrip);
    tabs.setViewPager(vpPager);
    tabs.setTextColor(getResources().getColor(R.color.TwitterBlue));

    tabs.setIndicatorColor(getResources().getColor(R.color.TwitterBlue));
    tabs.setDividerColor(getResources().getColor(android.R.color.white));
    tabs.setShouldExpand(true);
    tabs.setAllCaps(true);
  }