Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Bug and Problem in Use this Library.

Open
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, java
Domain
mobile

Research direction

Reproduce the reported layout using the XML in the issue and follow the stack trace to BottomNavigationView.java:156, especially its onSizeChanged path. Confirm the expected behavior for the bottom navigation and identify what prevents the IndexOutOfBoundsException during layout.

Written by the indexing model from the issue text.

Description

Hello,
tank you.
i import your lib. and gradle is ready.

but in my layout have problem

<?xml version="1.0" encoding="utf-8"?>
<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.support.v7.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="58dp"
        android:background="@android:color/holo_green_dark"
        android:minHeight="?attr/actionBarSize"
        android:titleTextColor="#ffffff">

    </android.support.v7.widget.Toolbar>


    <Button
        android:id="@+id/btnPayment"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Payment"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"/>


    <com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView
        android:id="@+id/bottomNavigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" />

</LinearLayout>

Error show in Android Studio :

java.lang.IndexOutOfBoundsException: Position must be less or equivalent than items size, items size is -1 current is 0   at com.luseen.luseenbottomnavigation.BottomNavigation.BottomNavigationView.onSizeChanged(BottomNavigationView.java:156)   at android.view.View.sizeChange(View.java:17641)   at android.view.View.setFrame(View.java:17603)   at android.view.View.layout(View.java:17520)   at android.view.ViewGroup.layout(ViewGroup.java:5612)   at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)   at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1730)   at android.widget.LinearLayout.onLayout(LinearLayout.java:1496)   at android.view.View.layout(View.java:17523)   at android.view.ViewGroup.layout(ViewGroup.java:5612)   at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)   at android.widget.FrameLayout.onLayout(FrameLayout.java:261)   at android.view.View.layout(View.java:17523)   at android.view.ViewGroup.layout(ViewGroup.java:5612)   at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)   at android.view.View.layout(View.java:17523)   at android.view.ViewGroup.layout(ViewGroup.java:5612) Copy stack to clipboard   Tip: Try to refresh the layout.  
Dominant language
Java
Stars
1k
Forks
178
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from armcha/LuseenBottomNavigation

All issues in armcha/LuseenBottomNavigation

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.