long1eu / long1eu/SpaceTabLayout
Fragment and icon cannot be set dynamically
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 265
- PR merge metrics
- No merged PRs in 30d
Description
<eu.long1.spacetablayout.SpaceTabLayout
android:id="@+id/spaceTabLayout"
android:layout_width="match_parent"
android:layout_height="77dp"
android:layout_alignParentBottom="true"
android:gravity="bottom"
app:button_color="@color/colorAccent"
app:icon_five="@drawable/ic_ico_my"
app:icon_four="@drawable/design_ic_visibility"
app:icon_one="@drawable/ic_ico_home"
app:icon_three="@drawable/ic_ico_publish"
app:icon_two="@drawable/ic_ico_circle"
app:number_of_tabs="five"
app:starting_position="one"
app:layout_behavior="eu.long1.spacetablayout.SpaceTabLayoutBehavior"
app:tab_color="@color/colorPrimary"
app:text_color="#61FFFFFF" />
fragmentList.add(new HomeThis());
fragmentList.add(new Forum());
fragmentList.add(new Follow());
fragmentList.add(new Find());
fragmentList.add(new My_putstr());
spaceTabLayout.initialize(main_viewpager, getSupportFragmentManager(),
fragmentList, savedInstanceState);
You can only use XML to set icons,
spaceTabLayout.setTabOneIcon(R.drawable.ic_ico_home);
It will be a mistake
Prompt to reference null
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SpaceTabLayout and the setTabOneIcon(R.drawable.ic_ico_home) call shown in the issue, then compare it with the XML icon configuration. Reproduce the null-reference error when setting an icon dynamically after initialize. Done means the dynamic icon setter works without the error while the existing XML configuration continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100