Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void setupTabIcons() {
- TextView tabOne = (TextView) LayoutInflater.from(mContext).inflate(R.layout.custome_tab_with_icon, null);
- tabOne.setText("Home");
- tabOne.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.selector_home, 0, 0);
- tabLayout.getTabAt(0).setCustomView(tabOne);
- TextView tabTwo = (TextView) LayoutInflater.from(mContext).inflate(R.layout.custome_tab_with_icon, null);
- tabTwo.setText("Search");
- tabTwo.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.selector_search, 0, 0);
- tabLayout.getTabAt(1).setCustomView(tabTwo);
- TextView tabThree = (TextView) LayoutInflater.from(mContext).inflate(R.layout.custome_tab_with_icon, null);
- tabThree.setText("WishList");
- tabThree.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.selector_wishlist, 0, 0);
- tabLayout.getTabAt(2).setCustomView(tabThree);
- TextView tabFour = (TextView) LayoutInflater.from(mContext).inflate(R.layout.custome_tab_with_icon, null);
- tabFour.setText("Cart");
- tabFour.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.selector_cart, 0, 0);
- tabLayout.getTabAt(3).setCustomView(tabFour);
- TextView tabFive = (TextView) LayoutInflater.from(mContext).inflate(R.layout.custome_tab_with_icon, null);
- tabFive.setText("Account");
- tabFive.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.selector_accounts, 0, 0);
- tabLayout.getTabAt(4).setCustomView(tabFive);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement