D
D
Denis2016-07-08 13:55:09
Android
Denis, 2016-07-08 13:55:09

Is it possible to set a non-unique name for an android view?

Is it possible for screen elements, such as textView, to be given some name that is not a unique name by which it can be found in the container?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
GavriKos, 2016-07-08
@GavriKos

If you are talking about ID, then the ID must be unique within the given root element. For example - activation. It cannot have views with the same ID - otherwise findViewByID will not work. But in two different activities, you can duplicate the ID.

Z
z0rgoyok, 2016-07-08
@z0rgoyok

It is possible, but you will have to search from the container where it is unique.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question