This view is a representation of a Calendar.
In this layout I have a LineaerLayout inside of an HorizontalScrollView, and inside of LinearLayout they are a lot of TextView. I set min width to TextView, because in portrait position there is not much space, and i don´t want to see 7 super little TextView, I prefer to se 4 TextView mid size.
When I rotate to Landscape position I want to see only 7 TextView with equivalent width and scroll the others, but I can´t to reach that.
Sorry for my bad english. Here is the XML.
<HorizontalScrollView
android:id="@+id/scroll_dias"
android:layout_below="@+id/header2"
android:layout_toRightOf="@+id/tv_etiqueta_hora"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="1dp"
android:fillViewport="true"
android:scrollbars="none">
<LinearLayout
android:id="@+id/contenedor_dias"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="7">
</LinearLayout>
</HorizontalScrollView>
And the inflated textview add programmatically to LinearLayout
<TextView
android:id="@+id/tv_item_dia"
android:layout_width="60dp"
android:layout_height="32dp"
android:layout_marginRight="1dp"
android:layout_weight="1"
android:background="#3f7668"
android:gravity="center"
android:padding="8dp"
android:text="Día "
android:textColor="#fff"
android:textSize="12dp"
android:textStyle="bold" />