Profile

Cover photo
Jadon Baker
Lived in Melbourne
227,192 views
AboutPostsPhotosVideos+1'sReviews

Stream

Jadon Baker

Discussion  - 
 
Is it possible to get a toolbar+tabs+view pager working with an AppCompat theme? Whenever theme is changed from Holo to AppCompat the tabs are hidden. I've not been able to find any examples.
1
Linton Ye's profile photo
 
+Jadon Baker Right it was not working because the tabs stuff in action bar is deprecated. Currently the best way to show tabs for ViewPager is to use TabLayout in the design support library [1].

To let Mirror populate the tabs, you can keep using the <_page> tags in the mirror file, and initialize the TabLayout using Mirror Sandbox [2] like so:

public class ViewPagerBox extends MirrorSandboxBase {
    public ViewPagerBox(View rootView) {
        super(rootView);
    }


   @Override
    public void $onLayoutDone(View rootView) {
        TabLayout tabLayout = (TabLayout) rootView.findViewById(R.id.tabs);
        ViewPager viewPager = (ViewPager) rootView.findViewById(R.id.viewpager);
        tabLayout.setupWithViewPager(viewPager);
    }
}

[1] http://stackoverflow.com/a/26543020/71133
[2] https://github.com/jimulabs/mirror-sandbox
Add a comment...

Jadon Baker

Shared publicly  - 
1
Add a comment...

Jadon Baker

Shared publicly  - 
 
 
Trolling Apple like a boss.
1
Add a comment...

Jadon Baker

Shared publicly  - 
 
Blackout anyone?
1
Add a comment...
Story
Tagline
some chap
Basic Information
Gender
Male
Apps with Google+ Sign-in
  • Reckless Racing 3
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Previously
Melbourne
Links
Jadon Baker's +1's are the things they like, agree with, or want to recommend.
Kingdom Rush
market.android.com

The acclaimed action fantasy defense game is now available on Android for Phones and Tablets! Get ready for an epic journey to defend your k

Ridiculous Fishing
market.android.com

A handcrafted game about fishing with guns, chainsaws &amp; toasters. *****Now with Google Play Game Services leaderboards and achievements!****

Candy Crush Saga fan app
market.android.com

This FREE App will give you a Walktrough for the popular game "Candy Crush Saga" You will also get some tips, hints, and Cheats to help you

Breaking Bad
market.android.com

A mild-mannered high school chemistry teacher unexpectedly adopts a criminal new lifestyle in the highly anticipated new one hour series BRE

Public - a month ago
reviewed a month ago
Public - 2 months ago
reviewed 2 months ago
Public - 2 months ago
reviewed 2 months ago
Public - 2 months ago
reviewed 2 months ago