Android底部菜单(中间功能键)仿qq空间客户端
2015-03-22 16:15
344 查看
一、效果图
二、实现代码
代码说明:
1、只需在根节点设置android:clipChildren为false即可,默认为true
2、可以通过android:layout_gravity控制超出的部分如何显示。
3、android:clipChildren的意思:是否限制子View在其范围内
二、实现代码
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:clipChildren="false" android:orientation="vertical" > <android.support.v4.view.ViewPager android:id="@+id/view_pager" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1.0" /> <LinearLayout android:layout_width="match_parent" android:layout_height="48dip" android:background="#B0C4DE" android:orientation="horizontal" > <ImageView android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:scaleType="fitCenter" android:src="@drawable/ic_launcher" /> <ImageView android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:scaleType="fitCenter" android:src="@drawable/ic_launcher" /> <ImageView android:layout_width="0dip" android:layout_height="64dip" android:layout_gravity="bottom" android:layout_weight="1.0" android:scaleType="fitCenter" android:src="@drawable/ic_launcher" /> <ImageView android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:scaleType="fitCenter" android:src="@drawable/ic_launcher" /> <ImageView android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:scaleType="fitCenter" android:src="@drawable/ic_launcher" /> </LinearLayout> </LinearLayout>
代码说明:
1、只需在根节点设置android:clipChildren为false即可,默认为true
2、可以通过android:layout_gravity控制超出的部分如何显示。
3、android:clipChildren的意思:是否限制子View在其范围内
相关文章推荐
- Android-小巫新闻客户端底部菜单切换实现
- Android-小巫新闻客户端底部菜单切换实现
- Android仿QQ空间底部菜单
- Android-小巫新闻客户端底部菜单切换实现
- android特效集锦系列之六 仿QQ空间底部菜单
- Android自定义View之实现流行的底部菜单栏中间突起:高仿“咸鱼APP”的底部菜单。
- 高仿QQ空间首页底部菜单+弹出菜单+中间部分凸起
- Android仿QQ空间底部菜单
- Android仿QQ空间底部菜单示例代码
- Android - 底部菜单架构设计及封装实现
- android底部菜单应用/Android TabHost的标签放在底部,已写成框架,继承即可
- 【iPhone Demo】地图自定义大头针如何利用Android TabHost+ActivityGroup+Broadcast实现类似于iPhone的底部菜单
- android---android底部菜单(选项卡)
- 主题:android底部菜单应用
- Android仿微信底部菜单
- 如何利用Android TabHost+ActivityGroup+Broadcast实现类似于iPhone的底部菜单
- android:同时弹出顶部和底部菜单的做法
- Android 开发笔记2 --底部菜单(toolbar)
- android实现顶部底部固定 中间可滑动
- (转)android底部菜单应用