I want to show just two TextViews on the screen, one on top of the other.
TextView B: 400dp high, at the bottom, TextView A: fill the rest of the screen.
However, if the height of TextView A is less than 100dp, it shouldn't be displayed (only TextView A visible, the rest is just white space).
Can this be achieved just by XML?
Currently I'm using something like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/blue"
android:text="Image A"
android:gravity="center"
android:textSize="40sp" />
<TextView
android:layout_width="fill_parent"
android:layout_height="400dp"
android:background="@color/green"
android:text="Image B: 400dp"
android:gravity="center"
android:textSize="40sp" />
</LinearLayout>