在Android中,我需要相同的分辨率Default(WVGA800)
HVGA
QVGA
所有模拟器都意味着模拟器的大小现在不重要我有这个xml file
我需要固定底部标签栏的大小,我该怎么办?现在我面临的问题是..我必须在底部为标签栏留出空间。因此,当我在默认(WVGA800)HVGA 或 QVGA 中运行相同的应用程序时,它与选项卡栏上的 Web 视图重叠,因此看起来很糟糕,我该怎么办?我使用的是安卓1.6
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:id="@+id/rl"
android:layout_height="371dip">
<!-- <WebView android:id="@+id/webviewHelp" android:layout_width="fill_parent"-->
<!-- android:layout_height="fill_parent" />-->
<WebView android:id="@+id/webviewHelp" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<Button android:id="@+id/My_btn"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:gravity="center" android:textSize="8px" android:text="Download this mp3 file"
android:textColor="@color/white"
android:layout_width="fill_parent" android:layout_height="33dip"
android:visibility="invisible" />
<Button android:id="@+id/My_btn1"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:text="this is button !"
android:layout_width="0dip" android:layout_height="0dip"
android:visibility="invisible" />
</RelativeLayout>
这是我的标签栏活动课程
final TabHost tabHost = (TabHost) getTabHost();
try {
//GlobalVariable.Setdownload(0);
tabHost.addTab(createTab(myclsname.class, "Welcome",
"Welcome", R.drawable.tab_icon_events));
tabHost.addTab(createTab(anotheclsname.class, ".Mp3List", ".Mp3List",
R.drawable.tab_icon_pitchforkfm));
tabHost.addTab(createTab(AboutUs.class, "AboutUs", "AboutUs",
R.drawable.tab_icon_home));
tabHost.addTab(createTab(ExtraInfromation.class, "ExtraInformation", "ExtraInformation",
R.drawable.tab_icon_tv));
tabHost.setCurrentTab(1);
} catch (Exception e) {
// TODO: handle exception
}
tabHost.getTabWidget().getChildAt(0).getLayoutParams().width = 85;
tabHost.getTabWidget().getChildAt(0).getLayoutParams().height=57;
tabHost.getTabWidget().getChildAt(1).getLayoutParams().width = 85;
tabHost.getTabWidget().getChildAt(2).getLayoutParams().width = 85;
tabHost.getTabWidget().getChildAt(3).getLayoutParams().width = 85;
tabHost.setOnTabChangedListener(new OnTabChangeListener() {
bla.. bla.. bla..
private TabSpec createTab(final Class<?> intentClass, final String tag,
final String title, final int drawable)
{
final Intent intent = new Intent().setClass(this, intentClass);
final View tab = LayoutInflater.from(getTabHost().getContext())
.inflate(R.layout.tab, null);
((TextView) tab.findViewById(R.id.tab_text)).setText(title);
((ImageView) tab.findViewById(R.id.tab_icon))
.setImageResource(drawable);
return getTabHost().newTabSpec(tag).setIndicator(tab)
.setContent(intent);
}
我该怎么办,上面的问题就可以解决吗?