Android Question Get Designer's Main section's Properties for a view

Discussion in 'Android Questions' started by francoisg, Jan 29, 2015.

  1. francoisg

    francoisg Active Member Licensed User

    Good day,

    Is it possible to retrieve a view's "Name" and "Event Name" Properties? That one would set within the Designer's Main section. I'm creating a dynamic view library and need to retrieve those fields.
    I've tried reflection, and use something like...
    Code:
    Dim r As Reflector
    r.Target = Label1
       
    Log(r.GetField("Name"))
    Log(r.RunMethod("getName"))
    But obviously Name & getName field/Method don't exist or aren't accessible... Can someone please advise?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    No. There are no such fields.

    You can use the Tag property to store information.
     
  3. francoisg

    francoisg Active Member Licensed User

    I can't really expect the end user to assign field names to the Tag property to all the layout views (when a layout file is being loaded into my class library).
    Can't you just expose the View "Name" and "EventName" Properties somehow?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    No. They are not saved anywhere.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice