社区
Android
帖子详情
tabHost在WVGA800时只显示一半
逐Ls梦
2011-11-30 03:10:32
使用android模拟器为WVGA800时tabHost区只能显示一半的高度,
但是用WQVGA400或者432的时候却是正常的。实在无法理解,
哪位遇到过同样问题的大牛能告诉我下么?
本来上传个图片的结果貌似上传不了
...全文
302
4
打赏
收藏
tabHost在WVGA800时只显示一半
使用android模拟器为WVGA800时tabHost区只能显示一半的高度, 但是用WQVGA400或者432的时候却是正常的。实在无法理解, 哪位遇到过同样问题的大牛能告诉我下么? 本来上传个图片的结果貌似上传不了
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
逐Ls梦
2011-12-01
打赏
举报
回复
[Quote=引用 1 楼 ultrapro 的回复:]
你把layout贴上来就行了
[/Quote]
如下: <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">
<!-- A paddingTop of zero will remove the strip below the tabs.
显示tabhost 里面的内容
-->
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="45px" >
</FrameLayout>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/maintabrl"
>
<TabWidget android:id="@android:id/tabs"
android:tabStripEnabled="false"
android:layout_alignParentBottom="true"
android:layout_width="fill_parent"
android:layout_height="45px" />
</RelativeLayout>
</TabHost>
下面是元素layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/tab_main_nav_selector"
android:gravity="center_horizontal" android:orientation="horizontal"
android:textAppearance="@style/TextViewStyleTabMainNav"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabMainNav" android:layout_weight="99"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
android:orientation="vertical"
>
<ImageView android:id="@+id/ivIcon" android:layout_width="30dip"
android:layout_height="30dip" android:scaleType="fitXY"
android:layout_marginTop="5dip" android:layout_marginBottom="1dip" />
<TextView android:id="@+id/tvTitle" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="14dip"
android:textAppearance="@style/TextViewStyleTabMainNav"
android:layout_marginBottom="5dip" />
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_weight="1"
android:layout_height="fill_parent"
android:gravity="right" android:orientation="horizontal"
>
<ImageView
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:src="@drawable/tab_split"
/>
</LinearLayout>
</LinearLayout>
逐Ls梦
2011-12-01
打赏
举报
回复
[Quote=引用 2 楼 ncuboy045wsq 的回复:]
WVGA800和WQVGA400的分辨率是不一样的,简单的说一个高分辨的图片在WVGA800显示是正常的,但是在WQVGA400下会放大显示1.5倍,所以你应该改下你的tabHost背景图片
[/Quote]
可是我没有背景图片啊。这才让人纠结的地方
安卓机器人
2011-11-30
打赏
举报
回复
WVGA800和WQVGA400的分辨率是不一样的,简单的说一个高分辨的图片在WVGA800显示是正常的,但是在WQVGA400下会放大显示1.5倍,所以你应该改下你的tabHost背景图片
儿大不由爷
2011-11-30
打赏
举报
回复
你把layout贴上来就行了
第二篇 界面开发 (Android学习笔记)
第二篇 界面开发 第5章 探索界面UI元素 ●The Android View Class ...需要修改三个XML,以及一个class: ...一般来说如果用这个部件
显示
时
间,那就只在这个布局XML中声明一个textview就...
Android应用移植到OPhone平台指南
这是由于OPhone平台只允许在一屏有三个
Tab
,而对此的实现导致了该问题的发生。 但只要严格按照以下例子程序就可以避免该问题的出现: view plain copy to clipboard print ? ...
android有用代码片段
有
时
候,需要一些小的功能,找到以后,就把它贴到了博客下面... 一、 获取系统版本号:PackageInfo info = this.getPackageManager().getPackageInfo(this.getPackageName(), 0); int versionCode=nfo.versionCode st
(转)android有用代码片段(一)
有
时
候,需要一些小的功能,找到以后,就把它贴到了博客下面,... 一、 获取系统版本号: [java] view plaincopy PackageInfo info = this.getPackageManager().getPackageInfo(this.getPa
android有用代码片段 (一)
为了让
tab
Host
显示
在下方,要将RadioGroup的layout_gravity设置为bottom,再将FrameLayout的 layout_weight设置为1,这样就可以将RadioGroup撑到最下方。style="@style/main_
tab
_bottom"里面定义了样式文件 ...
Android
80,351
社区成员
91,288
社区内容
发帖
与我相关
我的任务
Android
移动平台 Android
复制链接
扫一扫
分享
社区描述
移动平台 Android
android
android-studio
androidx
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章