Code example for ScrollView

Methods: getHeight

0
        final boolean visible = now >= mTimeStart && now <= mTimeEnd;
        mNowView.setVisibility(visible ? View.VISIBLE : View.GONE);
 
        if (visible && forceScroll) {
            // Scroll to show "now" in center 
            final int offset = mScrollView.getHeight() / 2;
            mNowView.requestRectangleOnScreen(new Rect(0, offset, 0, offset), true);
        } 
 
        mBlocks.requestLayout();
    } 
 
    private BroadcastReceiver mReceiver = new BroadcastReceiver() {
        @Override 
        public void onReceive(Context context, Intent intent) { 
            Log.d(TAG, "onReceive time update"); 
            updateNowView(false); 
        } 
    }; 
 
    private interface BlocksQuery {