0

I just took a junior android developer job test and that was one of the questions, it was a fill in the blank type of questions and it had the attribute name missing but it took another TextView id as its parameter so it was like android:_______="@+id/logIn"

or something like that, I would love to know what it is incase I get it as a question in the future

thanks in advance

RayMcfly
  • 3
  • 2
  • `labelFor` is the first one that comes to mind. There might be others. – Mike M. Jan 22 '22 at 22:11
  • Notice that the "+" means the id is being defined, not referred. https://stackoverflow.com/a/46383922/11880323 – cmak Jan 23 '22 at 01:13

1 Answers1

0

If I understand your question, you want to know all XML attributes that use ID, right?

    android:layout_toRightOf="@+id/logIn"
    android:layout_toLeftOf="@+id/logIn"
    android:labelFor="@+id/logIn"
    android:layout_toStartOf="@+id/logIn"
    android:layout_toEndOf="@+id/logIn"
    android:layout_alignEnd="@+id/logIn"
    android:layout_alignStart="@+id/logIn"
  • 1
    If they are indeed looking for all attributes that take a reference to any `View`, there are a few more; e.g., `layout_alignTop`. Might be easiest to go through the platform `attrs.xml`. [The `RelativeLayout` section there](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/attrs.xml#5785), at least, has some additional ones. (Of course, this doesn't count library and custom attributes.) – Mike M. Jan 22 '22 at 22:56