Comments (7)
@zhangzhzh
Alrighty then, I'll add an option for turning the shadow off in the next release (soon...!). Stay tuned!
from bottombar.
Yes there is, but the direction of the shadow can't be changed, so the shadow won't show above the BottomBar.
from bottombar.
download the source code to read
from bottombar.
@zhangzhzh
How did you get it to look like that? It would be helpful if you provide some code to duplicate your problem so I can fix it.
from bottombar.
its about the shadow, there is not methods in support libs to implement it as shadow(elevation
) instead like this ? I mean like a toolbar elevation
from bottombar.
@roughike
I just set the LinearLayout's android:background to black in the activity_main.xml:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
</LinearLayout>
<FrameLayout
android:id="@+id/container_body"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
menu.xml:
<item
android:id="@+id/bottomBarHome"
android:icon="@drawable/ic_home"
android:title="@string/nav_item_home" />
......
MainActivity.java:
@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mToolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
getSupportActionBar().setDisplayShowHomeEnabled(true);
mBottomBar = BottomBar.attach(this, savedInstanceState);
mBottomBar.setItemsFromMenu(R.menu.menu_bottombar, new OnMenuTabSelectedListener() {
@Override
public void onMenuItemSelected(int resId) {
switch (resId) {
case R.id.bottomBarHome:
displayView(0);
break;
...
default:
displayView(0);
break;
}
}
});
displayView(0);
}
private void displayView(int position) {
Fragment fragment = null;
switch (position) {
case 0:
fragment = new HomeFragment();
break;
......
default:
fragment = new HomeFragment();
break;
}
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.container_body, fragment);
fragmentTransaction.commit();
}
from bottombar.
Now you can hide the shadow in the library version 1.0.3 by calling bottomBar.hideShadow()
.
from bottombar.
Related Issues (20)
- Not support set badge count in text format HOT 3
- Bump to version 26 HOT 1
- bottom bar not working on first time
- Change The BottomBar selected with Swipe Gesture
- How to change the icon in the code?
- Does it support changing the title color only? HOT 1
- How can I change the color of bottom bar item title , without affecting the bottom bar icon ?
- How do I remove the shadow of the click HOT 1
- Call Fragment onTabSelect
- "iconsOnly" doesn't center the icon in the view container
- BottomBar crashes when "minSdkVersion" is set to 21 HOT 1
- BottomBarBadge is not accessible.
- Crash: NullPointerException
- Vector image
- disable first tab autoselection HOT 2
- Programmatically activate tab without firing events
- Shy behaviour is not working
- open third tab onstart HOT 3
- Will this library support in SDK level 30 ?
- 可否实现选中一个图片,未选中一个图片 HOT 1
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 bottombar.