GithubHelp home page GithubHelp logo

robotamiee / android-nicetab Goto Github PK

View Code? Open in Web Editor NEW
248.0 248.0 65.0 14.45 MB

A nice tab to navigate between the different pages of a ViewPager, supports badge, blur, and cross fade effect.

License: Other

Java 100.00%

android-nicetab's People

Contributors

robotamiee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-nicetab's Issues

Binary XML file line #9: Error inflating class me.amiee.nicetab.NiceTabLayout

Process: com.example.milispace.milispace, PID: 13101
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.milispace.milispace/com.dreamm.Milispace.view.slidemenu.MilispaceSlideMenu}: android.view.InflateException: Binary XML file line #9: Error inflating class me.amiee.nicetab.NiceTabLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2525)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2617)
at android.app.ActivityThread.access$800(ActivityThread.java:182)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:218)
at android.app.ActivityThread.main(ActivityThread.java:5657)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:990)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:785)
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class me.amiee.nicetab.NiceTabLayout
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.onCreateView(StartNiceTab.java:46)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1244)
at android.app.Activity.performStart(Activity.java:6151)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2482)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2617) 
at android.app.ActivityThread.access$800(ActivityThread.java:182) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:218) 
at android.app.ActivityThread.main(ActivityThread.java:5657) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:990) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:785) 
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.onCreateView(StartNiceTab.java:46) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) 
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602) 
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1244) 
at android.app.Activity.performStart(Activity.java:6151) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2482) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2617) 
at android.app.ActivityThread.access$800(ActivityThread.java:182) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:218) 
at android.app.ActivityThread.main(ActivityThread.java:5657) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:990) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:785) 
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v8/renderscript/RenderScript;
at me.amiee.nicetab.NiceTabStrip.initRenderScript(NiceTabStrip.java:544)
at me.amiee.nicetab.NiceTabStrip.(NiceTabStrip.java:502)
at me.amiee.nicetab.NiceTabLayout.(NiceTabLayout.java:194)
at me.amiee.nicetab.NiceTabLayout.(NiceTabLayout.java:133)
at java.lang.reflect.Constructor.newInstance(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.onCreateView(StartNiceTab.java:46) 
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742) 
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:339) 
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:602) 
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1244) 
at android.app.Activity.performStart(Activity.java:6151) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2482) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2617) 
at android.app.ActivityThread.access$800(ActivityThread.java:182) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:218) 
at android.app.ActivityThread.main(ActivityThread.java:5657) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:990) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:785) 
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v8.renderscript.RenderScript" on path: DexPathList[[dex file "/data/data/com.example.milispace.milispace/files/instant-run/dex/slice-zip4j-1.3.2_f728f80ccf711e45ce184a9c1b90868a8c287ed9-classes.dex", dex file "/data/data/com.example.milispace.milispace/files/instant-run/dex/slice-universal-image-loader-1.9.3_c0a769fce08f3876d58b638cd3cf59c11e0d5448-classes.dex", dex file "/data/data/com.example.milispace.milispace/files/instant-run/dex/slice-systembartint-1.0.3_79084032bdf4831b4792a45df467e6d485629218-classes.dex", dex file "/data/data/com.example.milispace.milispace/files/instant-run/dex/slice-support-annotations-23.3.0_5f3c49fb8cf92a86f170212d7084646ffc9e0982-classes.dex", dex file "/data/data/com.example.milispace.milispace/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.milispace.milispace

support for layout direction

I am using this very good library, but the problem I am facing now is that, I am using an Arabic interface, and I am getting an LTR direction in the tabs, instead of the RTL.

Tabs text font

Hello,
can I change the tab text fonts?
and if so, then how?

How update badge into tab when receiver data from server

java.lang.NullPointerException
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.clearBadge(StartNiceTab.java:177)
at com.dreamm.Milispace.view.slidingtab.StartNiceTab.setBadge(StartNiceTab.java:160)

public void setBadgeActivity(int badgeInbox) {
    clearBadge();
    if (badgeInbox > 0) {
        mNiceTabLayout.setBadge(2, String.valueOf(badgeInbox));
    }
}

private void clearBadge() {
    mNiceTabLayout.clearBadge();
}

public void setBadge(int badgeInbox, int badgeActivity) {
clearBadge();
if (badgeInbox > 0) {
mNiceTabLayout.setBadge(2, String.valueOf(badgeInbox));
}
if (badgeActivity > 0) {
mNiceTabLayout.setBadge(3, String.valueOf(badgeActivity));
}
}

SelectedTabColor is not changing color in Android 4.3

Hi,
I'm Testing my app in a Galaxy Nexus (Android 4.3) version and in a Nexus 5 (Android 5.1.1).
Everything is fine in the Nexus 5, but in the Galaxy Nexus the tabs didn't change color when the Pages changes, when the tab is clicked it changes, but the last selected tab didn't, if i click in all the tabs all will stay with the color selected.

I have to do something special so it can work int the old version?

<me.amiee.nicetab.NiceTabLayout android:id="@+id/main_tabs_slide" android:layout_width="match_parent" android:layout_height="48dp" android:layout_alignParentBottom="true" android:background="#F8F8F8" app:ntlTabDistributeEvenly="true" app:ntlDefaultTabColor="#B2B2B2" app:ntlDividerPaddingLeft="6dp" app:ntlDividerPaddingRight="6dp" app:ntlSelectedTabColor="?colorPrimary" app:ntlShowIndicator="false" app:ntlShowUnderline="true" app:ntlTabMode="iconOnly" />

If i change to app:ntlTabMode="both" it works again.

Thanks

Cost too much CPU on refresh Draw

Usage in Layout xml:
<me.amiee.nicetab.NiceTabLayout
android:id="@+id/sliding_nice_tabs"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="?colorPrimary"
app:ntlDividerPaddingLeft="8dp"
app:ntlDividerPaddingRight="8dp"
app:ntlIndicatorHeight="2dp"
app:ntlOverlayColor="#aa1a237e"
app:ntlTabMode="titleOnly"
app:ntlTextSize="18sp"
app:ntlTextStyle="normal"
app:ntlUnderlineHeight="1dp"
/>

Detect by memory working history, as attached

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.