Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I make moreTab as toggle ! #4

Open
deshario opened this issue Aug 17, 2017 · 0 comments
Open

Can I make moreTab as toggle ! #4

deshario opened this issue Aug 17, 2017 · 0 comments

Comments

@deshario
Copy link

deshario commented Aug 17, 2017

Can I change icon n text of moreTab when clicked it or i wanna make something like toggle when we click it!
ex : when we click moretab && is up arrow >change icon to downarrow and text also.

Text : Up > Down
Icon : upicon>downicon

screenshot_1502958116

ExpandableBottomBar.java || Line 399

      if (pos == mMoreTabPosition && mAllTabsVisible == false) {
                setBtmTabsVisibility(btmTabContainers, View.VISIBLE);
                mAllTabsVisible = true;
                ValueAnimator btm = ValueAnimator.ofFloat(0, topTabContainer.getHeight());
                btm.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
                    @Override
                    public void onAnimationUpdate(ValueAnimator valueAnimator) {
                        float val = (float) valueAnimator.getAnimatedValue();
                        LinearLayout.LayoutParams p = new LayoutParams(btmTabContainers[0].getLayoutParams().width, (int) val);
                        setLayoutParamsToBtmTabs(btmTabContainers, p);
                    }
                });
                 
               // Custom
                TabInformation tf =  mTabInfoList.get(pos);
                tf.title = "Down";
                tf.iconResId = ArrowDownIconRecId;
                tf.notify(); //  notify() is showing error something like:
                java.lang.IllegalMonitorStateException: object not locked by thread before notify()

                btm.setDuration(mAnimationDuration);
                btm.start();
            }

Its also not working

   changeTab(mMoreTabPosition,"helo");

        public void changeTab(int position, String title){
            TabInformation tabInformation =  mTabInfoList.get(position);
            tabInformation.iconResId = des_mMoreIconRecId;
            tabInformation.title = title;
            Toast.makeText(mContext,"tabInformation : "+tabInformation,Toast.LENGTH_SHORT).show();
        }
@deshario deshario changed the title Can I change icon of moreTab when clicked it ! Can I make moreTab as toggle ! Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant