ImageVerifierCode 换一换
格式:DOCX , 页数:8 ,大小:59.71KB ,
资源ID:4098725      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/4098725.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(andrid底部导航栏设计.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

andrid底部导航栏设计.docx

1、andrid底部导航栏设计Android应用底部导航栏(选项卡)实例现在很多android的应用都采用底部导航栏的功能,这样可以使得用户在使用过程中随意切换不同的页面,现在我采用TabHost组件来自定义一个底部的导航栏的功能。我们先看下该demo实例的框架图:其中各个类的作用以及资源文件就不详细解释了,还有资源图片(在该Demo中借用了其它应用程序的资源图片)也不提供了,大家可以自行更换自己需要的资源图片。直接上各个布局文件或各个类的代码:1 res/layout目录下的maintabs.xml源码:htmlTabHostandroid:id=android:id/tabhost andro

2、id:layout_width=fill_parent android:layout_height=fill_parent xmlns:android= 2 res/drawable 下的home_btn_bg.xml 源码:htmlselector xmlns:android= 3 res/values 下的源码:dimens.xml源码html 10.0sp 5.0dip 2.0dip 30.0sp 100.0dip 48.0dip 20.0dip 19.0dip 10.0dip 20.0dip 10.0dip 35.0dip 74.0dip 70.0dip 13.299988dip 20

3、.0dip 0.0dip 20.0sp 10.0dip 50.0dipdrawables.xml源码:html #fff4f4f4 #fffff4db #ff000000 #00000000 android:color/transparent #99000000 #fff4f4f4 #ff272727 #ff333333ids.xml源码:html false false false false false falsestrings.xml源码:html Hello World, MainTabActivity! TabDemo 消息 首页 更多 时间 好友styles.xml源码:html

4、dimen/bottom_tab_font_size #ffffffff marquee center_horizontal drawable/home_btn_bg dimen/bottom_tab_padding_up 2.0dip fill_parent wrap_content 2.0dip null true dimen/bottom_tab_padding_drawable 1.0 4 src/com.andyidea.tabdemo包下面各个UI界面类源码:MainTabActivity.java源码:htmlpackage com.andyidea.tabdemo;import

5、 android.app.TabActivity;import android.content.Intent;import android.os.Bundle;import android.view.Window;import android.widget.CompoundButton;import android.widget.RadioButton;import android.widget.CompoundButton.OnCheckedChangeListener;import android.widget.TabHost;public class MainTabActivity ex

6、tends TabActivity implements OnCheckedChangeListener private TabHostmTabHost; private Intent mAIntent; private Intent mBIntent; private Intent mCIntent; private Intent mDIntent; private Intent mEIntent; /* Called when the activity is first created. */ Override public void onCreate(Bundle savedInstan

7、ceState) super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.maintabs); this.mAIntent = new Intent(this,AActivity.class); this.mBIntent = new Intent(this,BActivity.class); this.mCIntent = new Intent(this,CActivity.class); this.mDIntent = new Int

8、ent(this,DActivity.class); this.mEIntent = new Intent(this,EActivity.class); (RadioButton) findViewById(R.id.radio_button0) .setOnCheckedChangeListener(this); (RadioButton) findViewById(R.id.radio_button1) .setOnCheckedChangeListener(this); (RadioButton) findViewById(R.id.radio_button2) .setOnChecke

9、dChangeListener(this); (RadioButton) findViewById(R.id.radio_button3) .setOnCheckedChangeListener(this); (RadioButton) findViewById(R.id.radio_button4) .setOnCheckedChangeListener(this); setupIntent(); Override public void onCheckedChanged(CompoundButtonbuttonView, booleanisChecked) if(isChecked) sw

10、itch (buttonView.getId() case R.id.radio_button0: this.mTabHost.setCurrentTabByTag(A_TAB); break; case R.id.radio_button1: this.mTabHost.setCurrentTabByTag(B_TAB); break; case R.id.radio_button2: this.mTabHost.setCurrentTabByTag(C_TAB); break; case R.id.radio_button3: this.mTabHost.setCurrentTabByTa

11、g(D_TAB); break; case R.id.radio_button4: this.mTabHost.setCurrentTabByTag(MORE_TAB); break; private void setupIntent() this.mTabHost = getTabHost(); TabHostlocalTabHost = this.mTabHost; localTabHost.addTab(buildTabSpec(A_TAB, R.string.main_home, R.drawable.icon_1_n, this.mAIntent); localTabHost.addTab(buildTabSpec(B_TAB, R.string.main_news, R.dra

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1