I'm inflating View
for ListFragment with:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_home, container, false);
}
In public void onViewCreated(View view, Bundle savedInstanceState)
I'm checking the view children's width/height and it seems that they are always 0. Why?
This is my fragment_home.xml
:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:id="@+id/home_fragment_map"
android:layout_width="match_parent"
android:layout_height="@dimen/home_map_h" />
<LinearLayout
android:id="@id/android:empty"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="@dimen/event_height"
android:gravity="center">
<FrameLayout
android:layout_width="50dp"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/location_icon_grey"
android:layout_gravity="center" />
</FrameLayout>
<com.gigaset.location.ui.custom.TextViewMuseo
android:layout_width="match_parent"
android:text="@string/home_no_events"
android:layout_height="@dimen/home_latest_pos_h"
android:gravity="center_vertical" />
</LinearLayout>
<ListView
android:id="@id/android:list"
android:divider="@null"
android:dividerHeight="0dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>