Code example for ImageView

Methods: measure

0
 
        /** 
         * Ensure all the dependent widgets are measured. 
         */ 
        public void measure() { 
            tab.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
                    View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
            text.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
                    View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
        } 
 
        /** 
         * Get the measured tab width. Must be called after {@link Slider#measure()}. 
         * @return 
         */ 
        public int getTabWidth() { 
            return tab.getMeasuredWidth();
        } 
 
        /** 
         * Get the measured tab width. Must be called after {@link Slider#measure()}.