Comments (5)
Hello @ionate12
Thanks for using BubbleTabBar
I will later integrate this functionality to modify titles dynamically, for now, you can use this code
(((bubbleTabBar.getChildAt(0) as Bubble).getChildAt(0) as LinearLayoutCompat).getChildAt(1) as AppCompatTextView).setText("Hello")
it will modify the first tab title to "Hello".
from bubbletabbar.
Thanks @akshay2211,
This piece of code works well.
Only when changing the text in an active MenuItem, you might have to call "isSelected = true" to let it recalculate the length of the text.
(((bubbleTabBar.getChildAt(0) as Bubble).getChildAt(0) as LinearLayoutCompat).getChildAt(1) as AppCompatTextView).setText("Hello")
(bubbleTabBar.getChildAt(0) as Bubble).isSelected = true /*Invoke title.expand(container, item.iconColor) once again*/
from bubbletabbar.
How can i change the text color of item
from bubbletabbar.
Hello @fsfaysalcse
just add the desired color like below in iconTint
<item android:id="@+id/home" android:icon="@drawable/ic_grid" android:title="Home" android:checked="true" android:iconTint="@color/home"/>
from bubbletabbar.
@akshay2211 is there any dynamic way available to modify icon tint color programmatically instead of menu xml?
from bubbletabbar.
Related Issues (20)
- NavController Support HOT 2
- ViewPager2 Support HOT 2
- android:iconTint not working for API < 26 HOT 1
- Background is not set properly for API < 23 HOT 1
- Animation time HOT 1
- different fragment HOT 1
- Cannot Change the color of text HOT 1
- Received status code 403 from server: Forbidden HOT 1
- Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int io.ak1.Bubble.getId()' on a null object reference
- Is there any way to change the shape of the selected bubble? HOT 1
- Attempt to invoke virtual method 'int io.ak1.Bubble.getId()' on a null object reference HOT 2
- How To Perform Android Instrument Testing HOT 1
- The onBubbleclick listener is not working in Java Code HOT 2
- First bubble text shown on activity recreate from saved state HOT 4
- How to connect with NavController in Java? HOT 2
- setTypeface dynamically from code HOT 1
- Adding dynamic data. HOT 1
- Pager HOT 1
- Question : How to add selected tab colors dynamically instead of menu xml ? HOT 1
- Bottom Navigation Without Label / Text
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bubbletabbar.