Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 让孩子们远离视线_Android - Fatal编程技术网

Android 让孩子们远离视线

Android 让孩子们远离视线,android,Android,我有自己的看法。如何在视图中获取和编辑子视图 View myTable = inflater.inflate(R.layout.letters_table, container); // Get and edit myTable children 并非所有的视图都有子视图。只有ViewGroup实例具有。如果要获取膨胀的视图的子项,请尝试以下操作: if (view instanceof ViewGroup) { ViewGroup viewGroup = (ViewGroup) vie

我有自己的看法。如何在视图中获取和编辑子视图

View myTable = inflater.inflate(R.layout.letters_table, container);

// Get and edit myTable children

并非所有的
视图都有子视图。只有
ViewGroup
实例具有。如果要获取膨胀的
视图的子项,请尝试以下操作:

if (view instanceof ViewGroup) {
  ViewGroup viewGroup = (ViewGroup) view;
  for(int i = 0; i< viewGroup.getChildCount(); ++i) {
    View child = viewGroup.getChildAt(i);
    // Edit the child
  }
}
if(视图组的视图实例){
ViewGroup ViewGroup=(ViewGroup)视图;
对于(int i=0;i
您的视图实际上是一个表?