This was solved by having the following:
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/contactContent"
android:layout_below="@+id/profile_background">
<LinearLayout android:orientation="vertical" android:id="@+id/c_detail_content_main" android:paddingBottom="50.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:orientation="vertical" android:visibility="gone" android:id="@+id/c_detail_birthday_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="20.0dip">
</LinearLayout
</ScrollView>
And the following code:
if (this.contact.hasPhoneNumber())
{
LinearLayout phoneNumberContent = (LinearLayout) view.findViewById(R.id.c_detail_phone_layout);
phoneNumberContent.setVisibility(View.VISIBLE);
for (PhoneNumber number : this.contact.getPhoneNumbers())
{
LinearLayout tempNumberContent = new LinearLayout(this.getActivity().getApplicationContext());
TextView type = new TextView(this.getActivity().getApplicationContext());
TextView phoneNo = new TextView(this.getActivity().getApplicationContext());
type.setWidth(LayoutTools.getDPMeasurement(this.getActivity(), 85));
phoneNo.setText(number.getNumber());
tempNumberContent.addView(type);
tempNumberContent.addView(phoneNo);
phoneNumberContent.addView(tempNumberContent);
}
}