3
i TabWidgetandroid için eşdeğer kod nedir: layout_above = "@ android: id/tabs"?
TabWidget tabWidget = new TabWidget(this);
tabWidget.setId(android.R.id.tabs);
ve FrameLayout
FrameLayout frameLayout = new FrameLayout(this);
frameLayout.setId(android.R.id.tabcontent);
nasıl sekmelerin üzerinde framelayout yapmak oluşturduk?
**what is the equivalent code to "android:layout_above="@android:id/tabs"**
DÜZENLEME
ben bu kodla yapıyorum, bu doğru mu? yanılıyor muyum nerede
TabHost tabHost = new TabHost(this);
tabHost.setLayoutParams(
new RelativeLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT,1));
TabWidget tabWidget = new TabWidget(this);
tabWidget.setId(android.R.id.tabs);
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(width, height);
lp.addRule(RelativeLayout.ABOVE, R.id.tabcontent);
tabWidget.setLayoutParams(lp);
tabHost.addView(tabWidget);
FrameLayout frameLayout = new FrameLayout(this);
frameLayout.setId(android.R.id.tabcontent);
frameLayout.setPadding(0, 55, 0, 0);
tabHost.addView(frameLayout, new RelativeLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
tabHost.setup();
hey ben dono! Benim için çalışmıyor onun kodu – Ads
güncellemek izin miyim herhangi bir göreli düzeni eksik miyim ??? – Ads
Elbette bir RelativeLayout kullanıyor olmalısınız ... android: layout_above, çocuklarını nasıl düzenlediğine özeldir. –