AhbottomnavigationAndroid 底部导航库
Ahbottomnavigation 是采用 Material Design 风格设计的底部导航库,要求最小版本SDK为16,支持3~5个底部Item项,可以自行设置底部每个Item项的风格。
效果图:
使用示例
Gradle
// Very soon on JCenter! ;)repositories { maven { url 'https://dl.bintray.com/aurelhubert/maven/' } } dependencies { compile 'com.aurelhubert:ahbottomnavigation:0.1.1'}
XML
<com.aurelhubert.ahbottomnavigation.AHBottomNavigation android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content"/>
Activity/Fragment
AHBottomNavigation bottomNavigation = (AHBottomNavigation) findViewById(R.id.bottom_navigation); // Create items AHBottomNavigationItem item1 = new AHBottomNavigationItem("Label One", R.drawable.ic_maps_place, Color.parseColor("#455C65")); AHBottomNavigationItem item2 = new AHBottomNavigationItem("Label Two", R.drawable.ic_maps_local_bar, Color.parseColor("#00886A")); AHBottomNavigationItem item3 = new AHBottomNavigationItem("Label Three", R.drawable.ic_maps_local_restaurant, Color.parseColor("#8B6B62")); // Add items bottomNavigation.addItem(item1); bottomNavigation.addItem(item2); bottomNavigation.addItem(item3); // Set background color bottomNavigation.setDefaultBackgroundColor(Color.parseColor("#FEFEFE")); // Change colors bottomNavigation.setAccentColor(Color.parseColor("#F63D2B")); bottomNavigation.setInactiveColor(Color.parseColor("#747474")); // Use colored navigation with circle reveal effect bottomNavigation.setColored(true); // Set listener bottomNavigation.setAHBottomNavigationListener(new AHBottomNavigation.AHBottomNavigationListener() { @Override public void onTabSelected(int position) { // Do something cool here... } });
评论
AhbottomnavigationAndroid 底部导航库
Ahbottomnavigation是采用MaterialDesign风格设计的底部导航库,要求最小版本SDK为16,支持3~5个底部Item项,可以自行设置底部每个Item项的风格。效果图:使用示例
AhbottomnavigationAndroid 底部导航库
0
优酷客户端底部导航
实现类似优酷客户端底部导航菜单按钮。效果十分炫,用户拖动列表是,导航按钮自动隐藏。点击某个按钮,更多按钮会从底部引出。具体效果请看视频。测试时,需将模拟器的语言区域设置成中国。[Code4App.co
优酷客户端底部导航
0
SmartTabLayoutAndroid 自定义导航库
SmartTabLayout 是一个自定义的 Tab title strip, 基于 Google
SmartTabLayoutAndroid 自定义导航库
0