我想动态地创建一系列可以通过id名访问的视图。ViewCompat.generateViewId听起来像是一种很有前途的方式,但我还没有看到一种为该id指定名称的方法。我在找这样的东西: TextView tv = new TextView(this);
tv.setIdName("myTextView"); 有没有办法通过名称检索动态<
更新到com.android.support.constraint:constraint-layout:1.1.0后
约束布局的所有子级都应该有使用约束集的id。java.lang.RuntimeException: All children of ConstraintLayout must have ids to use ConstraintSet at android.support.constraint.ConstraintSet.clone