SpaceTabLayout
SpaceTabLayout copied to clipboard
Fragment and icon cannot be set dynamically
<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