NavigationTabBar icon indicating copy to clipboard operation
NavigationTabBar copied to clipboard

Why no title?

Open Leo4Truth opened this issue 8 years ago • 6 comments

I have tried to set both in layout file(xml) or activity file(java), but the title I set never show.

activity_main.xml <devlight.io.library.ntb.NavigationTabBar android:id="@+id/navigationTabBar" android:layout_width="match_parent" android:layout_height="50dp" android:layout_alignParentBottom="true" app:ntb_animation_duration="400" app:ntb_preview_colors="@color/orange" app:ntb_active_color="#fff" app:ntb_inactive_color="#fe3" app:ntb_badged="true" app:ntb_titled="true" app:ntb_scaled="true" app:ntb_title_mode="all" app:ntb_badge_position="center" app:ntb_badge_gravity="top" app:ntb_badge_bg_color="#24e3f5" app:ntb_badge_title_color="#000000" app:ntb_badge_use_typeface="true" app:ntb_typeface="fonts/xiyuan.TTF" app:ntb_swiped="true" app:ntb_bg_color="@color/orange" app:ntb_icon_size_fraction="0.5" app:ntb_badge_size="10sp" app:ntb_title_size="10sp" />

MainActivity.java in onCreate() navigationTabBar = (NavigationTabBar) findViewById(R.id.navigationTabBar); models = new ArrayList<>(); models.add( new NavigationTabBar.Model.Builder( getResources().getDrawable(R.mipmap.gift), Color.parseColor("#aaffbb") ).title("账本").badgeTitle("aaaa").build() ); models.add( new NavigationTabBar.Model.Builder( getResources().getDrawable(R.mipmap.clothing), Color.parseColor("#785355") ).title("明细").badgeTitle("bbbb").build() ); models.add( new NavigationTabBar.Model.Builder( getResources().getDrawable(R.mipmap.shopping), Color.parseColor("#214542") ).title("统计").badgeTitle("cccc").build() ); models.add( new NavigationTabBar.Model.Builder( getResources().getDrawable(R.mipmap.eating), Color.parseColor("#123456") ).title("设置").badgeTitle("dddd").build() ); navigationTabBar.setModels(models); navigationTabBar.setTitleMode(NavigationTabBar.TitleMode.ALL); navigationTabBar.setBadgeGravity(NavigationTabBar.BadgeGravity.TOP); navigationTabBar.setBadgePosition(NavigationTabBar.BadgePosition.CENTER); navigationTabBar.setTitleSize(30); navigationTabBar.setIsTitled(true);

api 26 What should I do to make it show title? thx!

Leo4Truth avatar Dec 14 '17 13:12 Leo4Truth

same problem. any solution?

adapana avatar Dec 29 '17 13:12 adapana

same

AlexLiuSheng avatar Mar 18 '18 13:03 AlexLiuSheng

same

Liujiangsong avatar May 30 '18 11:05 Liujiangsong

Did you try ?

models.get(index).showBadge();

xerdink avatar Aug 15 '18 12:08 xerdink

i have same problem any one solved?

sootood avatar Mar 07 '19 09:03 sootood

There was a similar problem, NavigationTabBar was inside RelativeLayout, looked at an example, changed it to LinearLayout, and the titles worked.

Metilar avatar Mar 19 '19 14:03 Metilar