{"action":"created","issue":{"url":"https://api.github.com/repos/android-cn/android-discuss/issues/225","labels_url":"https://api.github.com/repos/android-cn/android-discuss/issues/225/labels{/name}","comments_url":"https://api.github.com/repos/android-cn/android-discuss/issues/225/comments","events_url":"https://api.github.com/repos/android-cn/android-discuss/issues/225/events","html_url":"https://github.com/android-cn/android-discuss/issues/225","id":100920084,"number":225,"title":"【调查】你是如何实现一个Bottom tab？","user":{"login":"zhdh2008","id":8311285,"avatar_url":"https://avatars.githubusercontent.com/u/8311285?v=3","gravatar_id":"","url":"https://api.github.com/users/zhdh2008","html_url":"https://github.com/zhdh2008","followers_url":"https://api.github.com/users/zhdh2008/followers","following_url":"https://api.github.com/users/zhdh2008/following{/other_user}","gists_url":"https://api.github.com/users/zhdh2008/gists{/gist_id}","starred_url":"https://api.github.com/users/zhdh2008/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhdh2008/subscriptions","organizations_url":"https://api.github.com/users/zhdh2008/orgs","repos_url":"https://api.github.com/users/zhdh2008/repos","events_url":"https://api.github.com/users/zhdh2008/events{/privacy}","received_events_url":"https://api.github.com/users/zhdh2008/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-14T03:00:13Z","updated_at":"2015-08-19T10:10:05Z","closed_at":null,"body":"现在很多app进入主界面之后，都会实现一个tab，请问你是如何实现的？ \r\n说说比较常见的实现吧\r\n1.FragmentTabHost+Fragment\r\n2.LinearLayout  分成n等分，每个等分为一个tab，在tab的上方为一个FrameLayout作为试图容器，点击每个tab时，将视图容器的View替换成对应的Fragment. "},"comment":{"url":"https://api.github.com/repos/android-cn/android-discuss/issues/comments/132525727","html_url":"https://github.com/android-cn/android-discuss/issues/225#issuecomment-132525727","issue_url":"https://api.github.com/repos/android-cn/android-discuss/issues/225","id":132525727,"user":{"login":"Olaman","id":1823767,"avatar_url":"https://avatars.githubusercontent.com/u/1823767?v=3","gravatar_id":"","url":"https://api.github.com/users/Olaman","html_url":"https://github.com/Olaman","followers_url":"https://api.github.com/users/Olaman/followers","following_url":"https://api.github.com/users/Olaman/following{/other_user}","gists_url":"https://api.github.com/users/Olaman/gists{/gist_id}","starred_url":"https://api.github.com/users/Olaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Olaman/subscriptions","organizations_url":"https://api.github.com/users/Olaman/orgs","repos_url":"https://api.github.com/users/Olaman/repos","events_url":"https://api.github.com/users/Olaman/events{/privacy}","received_events_url":"https://api.github.com/users/Olaman/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T10:10:05Z","updated_at":"2015-08-19T10:10:05Z","body":"用的 3、FragmentPagerAdapter+ViewPager； 继承了view pager, 禁用了滑动，看起来就和tab一样了。 底部就是linearlayout 几等分。 然后里面imageview+textview 做成按钮"}}