Skip to content Skip to sidebar Skip to footer

Why Does My Framelayout Have 0 Height?

I have a FrameLayout, containing various overlayed ImageViews:

Solution 1:

This may help you

     FrameLayout target = (FrameLayout) dialog.findViewById(R.id.australia_frame);
    target.post(new Runnable() {

        @Override
        public void run() {             
            int width = target.getWidth();
                            int height = width/2;
            /*your code with width and height*/
        }

    });
}   

Post a Comment for "Why Does My Framelayout Have 0 Height?"