2

What´s the idea of context in layouts?

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="THIS VALUE!!!!!!">

</Scrollview>
Daniel Gomez Rico
  • 15,026
  • 20
  • 92
  • 162

1 Answers1

2

tools:context provides the context(i.e which activity the layout is associated with) which is used by the visual layout editor in Android Studio to render your layout. You can read more about it here.

Bidhan
  • 10,607
  • 3
  • 39
  • 50