hugeterry/CoordinatorTabLayout là dự án tập trung di động trên GitHub với 4.2k sao, viết chủ yếu bằng Java. Combination of TabLayout and CoordinatorLayout./TabLayout和CoordinatorLayout相结合的折叠控件
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
CoordinatorTabLayout is a custom composite control that quickly implements the combination of TabLayout and CoordinatorLayout.
Inherited to the CoordinatorLayout, in the following components used CollapsingToolbarLayout contains TabLayout.
Use it in your own code:
1.setTitle(String title):Set the CoordinatorTabLayout's title.
2.setupWithViewPager(ViewPager viewPager):To link the two together.
3.setImageArray(int[] imageArray):Set the image array of the header according to the number of tabs and pass it to the control.
//Add the fragment to the viewpager
initFragments();
initViewPager();
//Image array
mImageArray = new int[]{
R.mipmap.bg_android,
R.mipmap.bg_ios,
R.mipmap.bg_js,
R.mipmap.bg_other};
mCoordinatorTabLayout = (CoordinatorTabLayout) findViewById(R.id.coordinatortablayout);
mCoordinatorTabLayout.setTitle("Demo")
.setImageArray(mImageArray)
.setupWithViewPager(mViewPager);
Finish, enjoy it.
More
Set the content scrim
setImageArray(int[] imageArray, int[] colorArray):Set the color array to use for the content scrim for each tab.
mColorArray = new int[]{
android.R.color.holo_blue_light,
android.R.color.holo_red_light,
android.R.color.holo_orange_light,
android.R.color.holo_green_light};
mCoordinatorTabLayout.setImageArray(mImageArray, mColorArray);
Set translucent status bar
setTranslucentStatusBar(Activity activity):Set translucent status bar,Support android4.4 and above.
addOnTabSelectedListener(OnTabSelectedListener onTabSelectedListener):Add a CoordinatorTabLayout.OnTabSelectedListener that will be invoked when tab selection changes.
mCoordinatorTabLayout.addOnTabSelectedListener(new OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
})
Gets the child control
getActionBar():get the ActionBar getTabLayout():get the TabLayout getImageView():get the ImageView
More code
Attributes
app:contentScrim -> color.Defaults to ?attr/colorPrimary
app:tabIndicatorColor -> color.
app:tabTextColor -> color.
Demo
http://fir.im/ctlayout
LICENSE
Copyright 2017 HugeTerry.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/hugeterry/CoordinatorTabLayout là nguồn chính thức.
hugeterry/CoordinatorTabLayout có bao nhiêu sao?
hugeterry/CoordinatorTabLayout có 4.2k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/hugeterry/CoordinatorTabLayout. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
hugeterry/CoordinatorTabLayout có những chủ đề gì?
GitHub topics của hugeterry/CoordinatorTabLayout: "android", "android-library", "coordinatorlayout", "tablayout". TopGit xếp repo vào nhóm Mobile.
hugeterry/CoordinatorTabLayout có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho hugeterry/CoordinatorTabLayout. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
hugeterry/CoordinatorTabLayout còn đang phát triển không?
Commit gần nhất trên hugeterry/CoordinatorTabLayout là 6.9 năm trước (theo timestamp GitHub). Repo có 577 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
hugeterry/CoordinatorTabLayout dùng license gì?
hugeterry/CoordinatorTabLayout phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
hugeterry/CoordinatorTabLayout viết bằng ngôn ngữ gì?
hugeterry/CoordinatorTabLayout chủ yếu viết bằng Java. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về CoordinatorTabLayout?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về CoordinatorTabLayout.