Je développe une application dans android. besoin de la même résolution pour Default(WVGA800)
HVGA
QVGA
et tous les émulateurs qui signifient la taille de l'émulateur ne devraient pas avoir d'importance en ce moment j'ai ce xml file
et je vais avoir besoin de taille fixe pour la barre d'onglet inférieure pour cela aussi ce shold je fais? en ce moment je fais face à un problème est .. je dois mettre de l'espace pour tabbar en bas. Donc, quand je suis cette même application dans la configuration par défaut (WVGA800) HVGA ou QVGA, il chevauchent le webview sur la barre d'onglets, donc il semble que je devrais faire? J'utilise Android 1,6résolution android besoin d'aide
<?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>
c'est mon activité TabBar classe
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);
}
Que dois-je faire, problème ci-dessus sera résoudre? merci à l'avance: Pragna
Même résolution sur les écrans ayant des résolutions différentes? Si c'est encore possible, ça aura l'air vraiment mauvais (comme courir des applications iphone sur un ipad en 2x). – trutheality
voir mon code édité – Android