[Mono-bugs] [Bug 645247] New: View.FindViewById doesn't work if the view has been inflated from a layout.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Oct 10 17:23:11 EDT 2010



           Summary: View.FindViewById doesn't work if the view has been
                    inflated from a layout.
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: 64bit
        OS/Version: Windows 7
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Runtime
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bryancostanich at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer
           Blocker: Yes

Created an attachment (id=393964)
 --> (http://bugzilla.novell.com/attachment.cgi?id=393964)
repro project

given this:

    LayoutInflater layoutInflater =
    View view = layoutInflater.Inflate(Resource.drawable.list_item_template,
parent, false);
    View test = view.FindViewById(Resource.id.listItem);

test will be null, even if the layout has the following definition:
<?xml version="1.0" encoding="utf-8" ?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="fill_parent"
  <TextView id="@+id/listItem" android:layout_width="fill_parent"

to reproduce, run attached project. breakpoint is set on line of failure.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list