안녕하세요.
TabHost에 속하는 Tab를 Activity로 구현해서
intent = new Intent().setClass(this, Today.class);
spec = tabHost.newTabSpec("Today").setIndicator("Today").setContent(intent);
tabHost.addTab(spec);
사용하려 합니다.
그런데 Tab안에서 사용하는 Activity에 layout_weight가 동작안하네요.
layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="TextView 1"
android:background="#ff0000"
android:layout_weight="1"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="TextView 2"
android:background="#ff0000"
android:layout_weight="3"/>
</LinearLayout>
실행화면
어느부분이 잘못되었는지 아시는분 계신가요?




TextView로 반반씩 채우려고 하시는건가요?
<TextView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:text="TextView 1"
android:background="#ff0000"
android:layout_weight="1"/>
로 한번 해보세요
android:layout_height="fill_parent" - >android:layout_height="0dp"