yanzm / materialtabhost Goto Github PK
View Code? Open in Web Editor NEWTabHost along with the specifications of the Material design
License: Apache License 2.0
TabHost along with the specifications of the Material design
License: Apache License 2.0
I am using the component as:
<net.yanzm.mth.MaterialTabHost
android:id="@+id/activity_music_media_browser_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:colorTabIndicator="@android:color/black"
app:colorAccent="@color/orange"
style="@style/AppTheme.TabHost"
/>
The style is defined as in your README:
<style name="AppTheme.TabHost" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimaryDark">#00695C</item>
<item name="colorPrimary">#00897B</item>
<item name="colorAccent">#FFD54F</item>
</style>
The app:colorTabIndicator is making effect, but the rest not. Any suggestions what might went wrong?
Thanks in advance
I tried the following code but findViewById(android.R.id.title) returns null. Is there a convenient way to adjust the font size of all tabs?
MaterialTabHost tabHost = (MaterialTabHost) findViewById(android.R.id.tabhost);
for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) {
TextView tv = (TextView) tabHost.getTabWidget().getChildAt(i).findViewById(android.R.id.title);
tv.setTextSize(23);
}
i have 10 tabs and need to scrollable tab ! please help
I have 4 tabs in my activity and here's the scenario:
Expectes results:
I tried varies methods of changing the font. Like trying to get textview (its private-- cant access).
How do i set different fonts for different tabs ? Please help .
here is my question http://stackoverflow.com/questions/35988592/how-to-change-font-of-text-in-materialtabhost-in-android
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.