Android examples for User Interface:View
Invalidates a view and all of its descendants.
// Copyright 2015 The Chromium Authors. All rights reserved. //package com.java2s; import android.view.View; import android.view.ViewGroup; public class Main { /**//from w w w. j a v a 2s. c o m * Invalidates a view and all of its descendants. */ private static void recursiveInvalidate(View view) { view.invalidate(); if (view instanceof ViewGroup) { ViewGroup group = (ViewGroup) view; int childCount = group.getChildCount(); for (int i = 0; i < childCount; i++) { View child = group.getChildAt(i); if (child.getVisibility() == View.VISIBLE) { recursiveInvalidate(child); } } } } }