question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't make it show title

See original GitHub issue

I use your NavigationTabBar in my project,But it is not work so better,it can not show title,can you please help me debug it?

There is a part of code about it.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.bigmercu.qinxinjiajiao.activity.bigmercuActivity"
    tools:showIn="@layout/activity_bigmercu">
    <com.gigamole.library.NavigationTabBar
        android:id="@+id/ntb"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="@color/colorPrimaryDark"
        app:ntb_animation_duration="400"
        app:ntb_preview_colors="@array/polluted_waves"
        app:ntb_active_color="#ffffff"
        app:ntb_inactive_color="#000000"
        app:ntb_badged="true"
        app:ntb_titled="true"
        app:ntb_title_mode="all"
        app:ntb_badge_position="right"
        app:ntb_badge_gravity="top"
        app:ntb_badge_use_typeface="true"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"/>
</RelativeLayout>
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_bigmercu);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    ButterKnife.bind(this);

    String[] colors = getResources().getStringArray(R.array.default_preview);
    ArrayList<NavigationTabBar.Model> models = new ArrayList<>();
    models.add(new NavigationTabBar.Model(
            getResources().getDrawable(R.drawable.ic_first), Color.parseColor(colors[0]), "首页"));
    models.add(new NavigationTabBar.Model(
            getResources().getDrawable(R.drawable.ic_second), Color.parseColor(colors[1]), "赵老师"));
    models.add(new NavigationTabBar.Model(
            getResources().getDrawable(R.drawable.ic_third), Color.parseColor(colors[2]), "周边家长"));
    models.add(new NavigationTabBar.Model(
            getResources().getDrawable(R.drawable.ic_fourth), Color.parseColor(colors[3]), "消息"));
    models.add(new NavigationTabBar.Model(
            getResources().getDrawable(R.mipmap.me), Color.parseColor(colors[4]), "我"));

    navigationTabBar.setBadgeGravity(NavigationTabBar.BadgeGravity.TOP);
    navigationTabBar.setBadgePosition(NavigationTabBar.BadgePosition.CENTER);
    navigationTabBar.setIsBadged(true);
    navigationTabBar.setIsTitled(true);
    navigationTabBar.setTitleMode(NavigationTabBar.TitleMode.ALL);
    navigationTabBar.setModels(models);

Do you now why?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
GIGAMOLEcommented, Apr 15, 2016

Just wrap NTB in FrameLayout insted of RelativeLayout.

1reaction
Lswkscommented, Apr 15, 2016

I want to enable title and i try a lot of times,It is not work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How come my title won't show up? - Codecademy
I'm at 6/14 (Paragraphs and Headings) and when I put text between my title tags it doesn't show up, but the text between...
Read more >
HTML - Why doesn't my title show? - Stack Overflow
The title tag is used to show a name for the page in the browser title. You have incorrectly removed the title element...
Read more >
No Views? Fix Your Titles - YouTube
Can't get your channel to grow? Fix your titles ! ... If you want to learn how to get more views on YouTube,...
Read more >
CAN'T MAKE TITLES!! - Adobe Support Community - 8203908
1 Correct answer. The old titler is still there. Go to File / New / Legacy Title. The old titler is still there....
Read more >
How can I display my title above my character so it's next to my ...
The answer from Jim is the manual way to do it without a command. There used to be an option in the Interface...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found