Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

textview - Android W/DisplayListCanvas: DisplayListCanvas is started on unbinded RenderNode

Why do I get this warning in Android LogCat?

W/DisplayListCanvas: DisplayListCanvas is started on unbinded RenderNode (without mOwningView)

MainActivity interaction with 3 simple TextViews:

textView.append("
" + objecta.objectb.get(objectindex).getName());
if (currentLeg <= begfltLeg + 1 ) {
    textView2.setText(objecta.objectb.get(objectindex).getName());
} else {
   textView2.setText(objecta.objectb.get(objectindex).getName());
}
textView3.setText(" leg " + 0 +  "   - "     objecta.objectb.get(objectindex).getName() + "
" );
for(int i=1; i<numLegs; i++) {
   if (i < 10){
      textView3.append(" leg " + i + "   - " +     objecta.objectb.get(objectindex).getName() + "
");
} else {
     textView3.append(" leg " + i + " - " + objecta.objectb.get(objectindex).getName() + "
");
}
}

Activity_Main.XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    tools:context="com.example.xxxxxxx.MainActivity">

    <TextView
    android:text="xxxxxxxxxxx"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/textView2"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:textAlignment="center" />

    <Chronometer
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/chronometer"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true" />

    <TextView
    android:text="xxxxxxxxxxxx"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="19dp"
    android:id="@+id/textView3"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true" />

    <TextView
    android:id="@+id/textView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:scrollbars="vertical"
    android:gravity="bottom"
    android:text="Log:"
    android:maxLines="8"
    android:layout_marginTop="23dp"
    android:layout_below="@+id/textView2"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true" />

</RelativeLayout>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I once had this when I did

testButton.setOnTouchListener(new View.OnTouchListener() {
        @Override
        public boolean onTouch(View v, MotionEvent event) {
            buttonClicked();
            return false;
        }
    });

instead of

 testButton.setOnClickListener(...)

If that helps anyone.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...