I have more ANR errors in the Google Play Developer Console

57 Views Asked by At

This is my code below. I tried different methods, but I dnot understand what was wrong with my code in my xml code i delete this now

android:clickable="true" android:focusable="true"

MainActivity.addTableRow

private void addTableRow(String time, String age, String name, String number) {
    TableRow tableRow = (TableRow) getLayoutInflater().inflate(R.layout.rowp, null);
    ((TextView) tableRow.findViewById(R.id.time)).setText(time);
    ((TextView) tableRow.findViewById(R.id.age)).setText(age);
    ((TextView) tableRow.findViewById(R.id.name)).setText(name);
    ((TextView) tableRow.findViewById(R.id.number)).setText(number);

    this.table.addView(tableRow);
    TextView textView = new TextView(this);
    textView.setBackgroundColor(Color.parseColor("#80808080"));
    textView.setHeight(2);
    this.table.addView(textView);
}

Stack trace :

  at android.view.View.requestLayout (View.java:26591)
  at android.widget.TableLayout.requestRowsLayout (TableLayout.java:211)
  at android.widget.TableLayout.addView (TableLayout.java:410)
  at android.view.ViewGroup.addView (ViewGroup.java:5075)
  at android.widget.TableLayout.addView (TableLayout.java:400)
  at addTableRow (MainActivity.java:475)
  at onClick (MainActivity.java:397)
  at android.view.View.performClick (View.java:7570)
  at android.view.View.performClickInternal (View.java:7540)
  at android.view.View.-$$Nest$mperformClickInternal (unavailable)
  at android.view.View$PerformClick.run (View.java:29710)
  at android.os.Handler.handleCallback (Handler.java:942)
  at android.os.Handler.dispatchMessage (Handler.java:99
  at android.os.Looper.loopOnce (Looper.java:240)
  at android.os.Looper.loop (Looper.java:351)
  at android.app.ActivityThread.main (ActivityThread.java:8427)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

I can't find the solution whta the wrong with it ?

0

There are 0 best solutions below