Giter Site home page Giter Site logo

Comments (33)

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Hello. Thanks for question. There are a list of examples activities in sample app. You can look there and also check source code to resolve your issue.

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

Yeah, I'm trying to do that.

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

And what?

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

Hello, i have the same issue with french language title and badge do not show

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024
    <com.gigamole.navigationtabbar.ntb.NavigationTabBar
        android:id="@+id/navigationTabBar"
                android:layout_alignParentBottom="true"
    android:layout_width="match_parent"
                android:layout_height="60dp"
                app:ntb_badge_gravity="top"
                app:ntb_badge_position="right"
                app:ntb_badged="true"
                app:ntb_scaled="true"
                app:ntb_tinted="true"
                app:ntb_title_mode="all"
                app:ntb_titled="true"
                app:ntb_swiped="true"/>

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024
        final ArrayList<NavigationTabBar.Model> models = new ArrayList<NavigationTabBar.Model>()
        {
            {
                add(new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.icone_profile_tab),
                        Color.parseColor("#000000")
                ).title(getString(R.string.tab_bar_profil))
                        .build());

                add(new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.tab_bar_icone_missions),
                        Color.parseColor("#000000")
                ).title(getString(R.string.tab_bar_missions))
                        .build());

                add(new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.icone_push_tab),
                        Color.parseColor("#000000")
                ).build());

                add(new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.icone_activites_tab),
                        Color.parseColor("#000000")
                )
                        .title(getString(R.string.tab_bar_histoires))
                        .build());

                add(new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.icone_circuit_tab),
                        Color.parseColor("#000000") // fond du linearlayout quand actif
                ).title(getString(R.string.tab_bar_circuits))
                        .build());

            }
        };
        navigationTabBar.setModels(models);

        //setBackgroundColor ne marche pas
        navigationTabBar.setActiveColor(getResources().getColor(R.color.white)); //couleur de l'icone quand actif
        navigationTabBar.setInactiveColor(getResources().getColor(R.color.white)); //couleur de l'icone quand pas actif

        navigationTabBar.setBgColor(getResources().getColor(R.color.tab_bar_non_selectionne));//fond de couleur quand pas actif

        navigationTabBar.setViewPager(mViewPager, Prefs.getInt(GlobalConfig.SHARED_PREFERENCES_CURRENT_TAB, 2));

no error but they dont show

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

<com.gigamole.navigationtabbar.ntb.NavigationTabBar
android:id="@+id/navTabBar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
app:ntb_badge_gravity="top"
app:ntb_badge_position="right"
app:ntb_badged="true"
app:ntb_scaled="true"
app:ntb_tinted="true"
app:ntb_title_mode="all"
app:ntb_bg_color="@color/white"
app:ntb_titled="true"
app:ntb_swiped="true"/>

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Do you set titles in models? And what color of your titles?

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Maybe your fonttype doesnt provide any symbols for your languages?

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

How do you set the color of the titles please?

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Can you send me yout strings?

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024
<string name = "tab_bar_profil">Profile</string>
<string name = "tab_bar_missions">Quizz</string>
<string name = "tab_bar_histoires">Activities</string>
<string name = "tab_bar_circuits">Circuits</string>

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Its so interesting.

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

I dont know what is the problem is. I`ve tested on many langs and there was ok.

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Its seems like your method of getString(R.string.tab_bar_histoires) returns to you "". Try to log this.

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

maybe a conflict with an other library

compile 'com.github.MKergall:osmbonuspack:v5.8.1'
compile 'org.osmdroid:osmdroid-android:5.2@aar'
compile 'com.orhanobut:dialogplus:1.11@aar'
compile 'com.github.frank-zhu:pullzoomview:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:+'
compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.github.2359media:EasyAndroidAnimations:0.8'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.mobsandgeeks:android-saripaar:+'
compile 'com.google.android.gms:play-services-location:+'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.jaredrummler:android-device-names:1.0.9'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:design:24.0.0'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.github.johnkil.android-progressfragment:progressfragment:1.4.+'
compile 'de.hdodenhof:circleimageview:+'
compile 'com.google.android.gms:play-services-panorama:+'
compile 'com.github.halysongoncalves:pugnotification:1.8.1'
compile 'com.commonsware.cwac:cam2:0.6.2'
compile 'com.infstory:recyclerlist:1.0.0'
compile 'com.kogitune:pre-lollipop-activity-transition:+'
compile 'com.github.pwittchen:reactivenetwork:0.2.0'
compile('net.i2p.android.ext:floatingactionbutton:1.10.0') {
    exclude module: "library"
}
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.github.dmytrodanylyk.shadow-layout:library:1.0.1'
compile 'com.squareup.leakcanary:leakcanary-android:+'
compile 'org.zeroturnaround:zt-zip:1.9'
compile 'com.pixplicity.easyprefs:library:+'
compile 'com.github.jd-alexander:library:1.1.0'
compile 'com.github.viethoa:fastscroller:1.1.0'
compile 'com.github.fenjuly:ArrowDownloadButton:9e15b85e8a'
compile 'com.github.vlonjatg:progress-activity:v1.0.3'
compile('com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT@aar') {
    exclude module: "okhttp"
}
compile('com.twitter.sdk.android:twitter:+') {
    transitive = true;
}
compile 'com.karumi:dexter:2.2.2'
compile 'com.hedgehog.ratingbar:app:1.0.4'
compile 'com.google.android.gms:play-services:+'
compile 'com.jonathanfinerty.expandabletextview:expandabletextview:0.0.2'
compile 'io.reactivex:rxandroid:1.2.0'
compile 'com.sangcomz:FishBun:0.4.4@aar'
//compile 'cn.finalteam:galleryfinal:1.4.8.7'
compile 'com.github.NightWhistler:HtmlSpanner:+'
//compile 'com.jakewharton:butterknife:8.0.1'

//apt 'com.jakewharton:butterknife-compiler:8.0.1'
compile 'com.anjlab.android.iab.v3:library:1.0.+'
compile 'com.joanzapata.iconify:android-iconify:+'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:+'
compile 'com.github.thorbenprimke:realm-searchview:+'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.pacioianu.david:ink-page-indicator:1.2.0'
compile 'com.github.johnpersano:supertoasts:1.3.4@aar'
compile 'com.estimote:sdk:0.10.5@aar'
compile 'com.github.medyo:fancybuttons:1.8.1'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.github.dmytrodanylyk.shadow-layout:library:1.0.3'
compile 'com.github.devlight.navigationtabbar:navigationtabbar:1.2.3'

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

will try to log it

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

No. This is problem on your side.

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

A yes, it's our problem, the sample code can run normally

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

Mhhh the logs are correct, its really strange because the demo are ok

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

Well, it is very strange

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

Maybe your strings placed in not default folder of /values or /string.xml. Maybe there are some flag for this path like lang etc.

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

i am trying this

final String[] colors = getResources().getStringArray(R.array.default_preview);
final ArrayList<NavigationTabBar.Model> models = new ArrayList<NavigationTabBar.Model>();

        models.add(
                new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.ic_third),
                        Color.parseColor(colors[0]))
                        .selectedIcon(getResources().getDrawable(R.drawable.ic_third))
                        .title("Heart")
                        .badgeTitle("NTB")
                        .build()
        );
        models.add(
                new NavigationTabBar.Model.Builder(
                        getResources().getDrawable(R.drawable.ic_third),
                        Color.parseColor(colors[1]))

// .selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
.title("Cup")
.badgeTitle("with")
.build()
);
models.add(
new NavigationTabBar.Model.Builder(
getResources().getDrawable(R.drawable.ic_third),
Color.parseColor(colors[2]))
.selectedIcon(getResources().getDrawable(R.drawable.ic_third))
.title("Diploma")
.badgeTitle("state")
.build()
);
models.add(
new NavigationTabBar.Model.Builder(
getResources().getDrawable(R.drawable.ic_third),
Color.parseColor(colors[3]))
// .selectedIcon(getResources().getDrawable(R.drawable.ic_eighth))
.title("Flag")
.badgeTitle("icon")
.build()
);
models.add(
new NavigationTabBar.Model.Builder(
getResources().getDrawable(R.drawable.ic_third),
Color.parseColor(colors[4]))
.selectedIcon(getResources().getDrawable(R.drawable.ic_third))
.title("Medal")
.badgeTitle("777")
.build()
);

        navigationTabBar.setModels(models);

        //setBackgroundColor ne marche pas
        navigationTabBar.setActiveColor(getResources().getColor(R.color.white)); //couleur de l'icone quand actif
        navigationTabBar.setInactiveColor(getResources().getColor(R.color.white)); //couleur de l'icone quand pas actif

        navigationTabBar.setBgColor(getResources().getColor(R.color.tab_bar_non_selectionne));//fond de couleur quand pas actif

        DebugUtilities.displayInConsole("TOTO : " + getString(R.string.tab_bar_profil));

        navigationTabBar.setViewPager(mViewPager, Prefs.getInt(GlobalConfig.SHARED_PREFERENCES_CURRENT_TAB, 2));

        navigationTabBar.setOnTabBarSelectedIndexListener(new NavigationTabBar.OnTabBarSelectedIndexListener() {
            @Override
            public void onStartTabSelected(NavigationTabBar.Model model, int index) {
                try {
                    Prefs.putInt(GlobalConfig.SHARED_PREFERENCES_CURRENT_TAB, index);
                } catch (Exception e) {
                    new ExceptionManager(e, MonumentTrackerApplication.context);
                }
            }

            @Override
            public void onEndTabSelected(NavigationTabBar.Model model, int index) {

            }
        });

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

What's the reason why I found. Cannot use relativelayout parent layout

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

mhhh i use parent relativelayout

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

will try with linearlayout

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

linearlayout is ok

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

no it does not work with linearlayout too :/

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

ok it works with linearlayout like that

<com.monumentTrackerAddictive.Coeur.Fragments.NonScrollingViewPager
    android:id="@+id/viewpager"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"/>

<com.gigamole.navigationtabbar.ntb.NavigationTabBar
    android:id="@+id/navigationTabBar"
    android:layout_width="match_parent"
    android:layout_height="60dp"
    app:ntb_badge_gravity="top"
    app:ntb_badge_position="right"
    app:ntb_badged="true"
    app:ntb_scaled="true"
    app:ntb_tinted="true"
    app:ntb_title_mode="all"
    app:ntb_titled="true"
    app:ntb_swiped="true"/>

<include
    android:layout_alignParentTop="true"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    layout="@layout/navigation_action_bar_progression" />

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

i have the titles finally :)

from navigationtabbar.

darcheville06 avatar darcheville06 commented on May 18, 2024

Thank you very much for your help

from navigationtabbar.

baoxin avatar baoxin commented on May 18, 2024

:)

from navigationtabbar.

GIGAMOLE avatar GIGAMOLE commented on May 18, 2024

You welcome.

from navigationtabbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.