NavigationTabBar icon indicating copy to clipboard operation
NavigationTabBar copied to clipboard

Titles not working

Open vg0426 opened this issue 8 years ago • 19 comments

Hi i've downloaded your demo app and use the example of the top horizontal tab bar on my app but the titles for the models are not been displayed in the app on any of the modes(all and active). Am using the exact example as above only that am not using the tab bar with a viewpager cause i want only the tab bar, I've tried this on your demo app in the same example as above removing the viewpager and it continues to work perfectly showing the titles but on my app is not showing the titles, just the icons. What could be the problem, if you need anything from me let me know. I really wanna use the dependency cause is nice

vg0426 avatar Nov 30 '16 02:11 vg0426

I also found this problem,but Layouts use LinearLayout can display

haegyeong avatar Dec 13 '16 01:12 haegyeong

Yes, If layout is LinearLayout then title works fine.

ameymh avatar Jan 16 '17 13:01 ameymh

Same bug here, my layout it is:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/content_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:showIn="@layout/activity_main"
    tools:context="br.com.ecoleta.app.presentation.MainActivity"
    >

    <devlight.io.library.ntb.NavigationTabBar
        android:id="@+id/navigation_tab_bar"
        android:layout_width="72dp"
        android:layout_height="match_parent"
        app:ntb_bg_color="?attr/colorPrimaryDark"
        app:ntb_inactive_color="@android:color/white"
        app:ntb_active_color="#9C348F"
        app:ntb_scaled="false"
        app:ntb_swiped="true"
        app:ntb_titled="true"
        app:ntb_title_mode="all"
        />

</LinearLayout>

filipebezerra avatar Feb 09 '17 02:02 filipebezerra

In my case, this is happening because it is vertically oriented?

filipebezerra avatar Feb 09 '17 02:02 filipebezerra

just wrap a LinearLayout as a parent around NavigationTabBar . it would solve this issue.

rafiip avatar Mar 12 '17 03:03 rafiip

@mehraf the NavigationTabBar already have a LinearLayout as parent in my case, so your solution does not apply for me, right?

filipebezerra avatar Mar 12 '17 04:03 filipebezerra

@filipebezerra lookout for the orientation . just use a horizontal LinearLayout as parent for NTB. after that you can specify any parent for the existing LinearLayout .

rafiip avatar Mar 13 '17 15:03 rafiip

@mehraf as I said earlier, this doesn't works buddy. I used the sample app to prove this.

I changed the orientation to vertically oriented and set the titles then the result:

droid screen-1

The code:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#423752"
    >

    <devlight.io.library.ntb.NavigationTabBar
        android:id="@+id/ntb_vertical"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        app:ntb_preview_colors="@array/vertical_ntb"
        app:ntb_title_mode="all"
        app:ntb_titled="true"
        />

    <android.support.v4.view.ViewPager
        android:id="@+id/vp_vertical_ntb"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        />

</LinearLayout>

And after that I changed to horizontally oriented and the result:

droid screen-3

The code:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:background="#423752"
    >

    <devlight.io.library.ntb.NavigationTabBar
        android:id="@+id/ntb_vertical"
        android:layout_width="50dp"
        android:layout_height="match_parent"
        app:ntb_preview_colors="@array/vertical_ntb"
        app:ntb_title_mode="all"
        app:ntb_titled="true"
        />

    <android.support.v4.view.ViewPager
        android:id="@+id/vp_vertical_ntb"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        />

</LinearLayout>

filipebezerra avatar Apr 12 '17 22:04 filipebezerra

Please somebody help me here, I'm trying to use this library to do what was supposed to do, but I can't do it. I need help from experts.

filipebezerra avatar Apr 12 '17 22:04 filipebezerra

I encountered the same problem, when I use the demo in the vertical layout, title not work. Even if I used a LinerLayout as the parent layout

569258yin avatar Apr 15 '17 02:04 569258yin

image

I debug found that the set mIsTitled to true, after the implementation of the program to the location of the map will be set when the isTitled false, so it does not show, what is the role of this code for what?

569258yin avatar Apr 15 '17 02:04 569258yin

@GIGAMOLE can you help here please?

filipebezerra avatar Apr 17 '17 15:04 filipebezerra

@filipebezerra I modify some code.may be help you. https://github.com/569258yin/NavigationTabBar

569258yin avatar Apr 18 '17 01:04 569258yin

Thanks @569258yin, I'll wait PR to be accepted!

filipebezerra avatar Apr 18 '17 01:04 filipebezerra

Hey any updates here?

filipebezerra avatar May 09 '17 22:05 filipebezerra

I just tried, but vertical menu still no title -_-

huzain07 avatar Jul 17 '17 04:07 huzain07

Yeah, very sad guys. The PR was denied @569258yin?

filipebezerra avatar Jul 17 '17 13:07 filipebezerra

at the sample, the title is showed because the library was edited. but in default library, that vertical menu still didnt show the title because the library not edited yet.

huzain07 avatar Jul 18 '17 02:07 huzain07

I have the same problem I load the library in the sample inside my project as a android module and work fine for title inside a vertical navigationTabBar

samerkador avatar Sep 01 '17 19:09 samerkador