社区
Android
帖子详情
TabActivity布局的页签高度设置问题
MIS_ECSM
2010-04-07 03:47:40
TabActivity布局的页签高度如何设置,如下图中tab1,tab2,tab3页签的高度
...全文
683
4
打赏
收藏
TabActivity布局的页签高度设置问题
TabActivity布局的页签高度如何设置,如下图中tab1,tab2,tab3页签的高度
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
yangxuanlun
2010-05-01
打赏
举报
回复
为什么要设置高度呢,我认为美化可以加点图片就行。而且最主要的是,我在真机上调试的时候发现他那个选项卡不是很高,也就是说没有模拟器上那么丑。你非要设置高度的话,据说可以通过什么方法隐藏一部分,可能是调一下它与TOP的距离吧。我以前也做过这个,不过不记得了。嘿嘿...
vclongking
2010-04-08
打赏
举报
回复
每具体设置过它的高度 关注 学习
ffyd2000
2010-04-07
打赏
举报
回复
记得是这样的:
按照android源码里面的tab_content.xml写一个layout,修改TabWidget的高度
在你的TabActivity的oncreate方法里面setContentView(R.layout.xxxxx)
ok
tab_content.xml内容:
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_weight="0" />
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="0dip"
android:layout_weight="1"/>
</LinearLayout>
</TabHost>
lingyu2843
2010-04-07
打赏
举报
回复
看不到,一般都是写好XML文件,然后通过LayoutInflater填充
LCRapidDevelop-master
//
设置
加载错误
页
显示 progress.showError(getResources().getDrawable(R.mipmap.monkey_cry), Constant.ERROR_TITLE, Constant.ERROR_CONTEXT, Constant.ERROR_BUTTON, new View.OnClickListener() { @Override ...
Tab
Activity
中的
Tab
标
签
详细
设置
//################################################################# } package com.woclub.
tab
activity
test; ...import android.app.
Tab
Activity
; import android.content.res.ColorStateList; impor
Tab
Activity
的使用遇到的
问题
private
Tab
Host
tab
Host; @Override protected void onCreate(Bundle ... // TODO 需要设计该
Tab
的UI
布局
super.onCreate(savedInstanceState);
tab
Host = this.get
Tab
Host(); LayoutInflater
Android 底部
Tab
Activity
(2)——
Activity
Group|顶部底部均有
Tab
标
签
之一
//
设置
高度
、宽度,由于宽度
设置
为fill_parent,在此对它没效果
tab
Widget.getChildAt(i).getLayoutParams().height=height; //
设置
tab
中标题文字的颜色,不然默认为黑色 final TextView tv = ...
Tab
Activity
+
Tab
host+
Activity
Group 创建多
tab
的分
页
APP
//
设置
该
页
的indicator(指示器)
设置
该
Tab
页
的名字和图标,以及
布局
tab
Spec.setIndicator(composeLayout("帮助", R.drawable.icon)) .setContent(new Intent(PEMain
Activity
.this, Help
Activity
.class)); /...
Android
80,350
社区成员
91,288
社区内容
发帖
与我相关
我的任务
Android
移动平台 Android
复制链接
扫一扫
分享
社区描述
移动平台 Android
android
android-studio
androidx
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章