Comments (11)
Please show me your code.
from bottomnavigationviewex.
Menu:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/navigation_engagement"
android:checked="true"
android:icon="@drawable/folder_con"
android:title="@string/title_engagement" />
<item
android:id="@+id/navigation_mytodos"
android:icon="@drawable/check_ico"
android:title="@string/title_dashboard" />
<!--must set the item title to empty-->
<item
android:id="@+id/menu_add"
android:icon="@drawable/icon_add"
android:title="" />
<item
android:id="@+id/navigation_activity"
android:icon="@drawable/active_ico"
android:title="@string/title_notifications" />
<item
android:id="@+id/navigation_file"
android:icon="@drawable/file_ico"
android:title="@string/title_files" />
</menu>
XMl :
<com.auvenir.ui.BottomNavigationViewEx
android:id="@+id/navigation"
style="@style/bnve_primary_bg"
android:layout_gravity="bottom"
app:itemIconTint="@color/selector_item_gray_color"
app:itemTextColor="@color/selector_item_gray_color"
app:menu="@menu/menu_navigation_center_icon_only" />
Java code:
navigation = (BottomNavigationViewEx) findViewById(R.id.navigation);
navigation.setOnNavigationItemSelectedListener(this);
navigation.enableAnimation(false);
navigation.enableShiftingMode(false);
navigation.enableItemShiftingMode(false);
int centerPosition = 2;
navigation.setIconSizeAt(centerPosition, 48, 48);
navigation.setTextSize(10);
navigation.setIconMarginTop(centerPosition, BottomNavigationViewEx.dp2px(this, 4));
navigation.setItemBackground(centerPosition, R.color.white);
navigation.setIconTintList(centerPosition,
getResources().getColorStateList(R.color.selector_item_center));
from bottomnavigationviewex.
Can you help me? Thanks
from bottomnavigationviewex.
Can't find the problem. Can you share me the project ?
Or you can try another method to show center icon only.
- clear center menu icon
- add FloatingActionButton at bottom center..
- Control the tab click click listener.
from bottomnavigationviewex.
Sorry, not have time today. I will reply at tomorrow.
from bottomnavigationviewex.
I use app of you https://github.com/ittianyu/BottomNavigationViewEx/tree/master/app change menu_navigation_center_icon_only.xml of you. I add icon
<item android:id="@+id/menu_add" android:icon="@drawable/ic_add_48dp" android:title="" />
to
<item android:id="@+id/menu_add" android:icon="@drawable/icon_add" android:title="" />
then not show.
from bottomnavigationviewex.
You can help me when I have free time!
from bottomnavigationviewex.
I just try your image. It not works. May be you need a svg instead of png.
You can find some images here: http://www.iconfont.cn/search/index?searchType=icon&q=add
I think png is ok. But may be can't mix with svg. I means all item use png.
from bottomnavigationviewex.
So My icon not works?
from bottomnavigationviewex.
Try to use svg or use five png.
from bottomnavigationviewex.
I use file png and svg not work with my icon. I think Some other color icons (not black color, color white) then not works.
from bottomnavigationviewex.
Related Issues (20)
- Support compileSdkVersion 30 buildToolsVersion "30.0.2" HOT 1
- 请问可以关闭在点击item时,在item背景生成的圆形动画效果吗 HOT 1
- Icon color not showing with compile version 29 HOT 1
- is still alive this project? HOT 1
- Crush app after update com.google.android.material from 1.3.0 to 1.4.0 HOT 10
- Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference HOT 3
- 怎么禁止滑动? HOT 1
- 长按与水波纹的取消设置
- Error
- 长按有toast
- 能把bottomNavigation改成竖排的嘛,我打算一个控件兼容pad,手机 HOT 1
- help me!
- No cached version of com.github.ittianyu:BottomNavigationViewEx:1.2.4 available for offline mode.
- The following classes could not be instantiated: - com.ittianyu.bottomnavigationviewex.BottomNavigationViewEx HOT 1
- [ERROR] Failed to resolve: com.github.ittianyu:BottomNavigationViewEx:2.0.4
- 最新的api报错, HOT 5
- Why it's Isnt Showing the Menus? Even tho I created the Files Correctly please solve this problem i cant Able to Use it HOT 1
- 这个库貌似已经放弃维护了,你们可以考虑使用另一个库
- No static field BottomNavigationView_itemTextAppearanceInactive HOT 4
- Library source does not match the bytecode for class BottomNavigationViewInner
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bottomnavigationviewex.