What is the name of this function?
Unverified by an official source, but most likely it is called "Sample Data".
How can I put an image file in a project and use it as a placeholder this way? In which folder?
Unlike resources such as images, fonts, etc. Data samples are not included in /res/ (they are not compiled using the application, therefore. It is probably easier to filter them out by placing them in a completely separate directory). They are included in /app/sampledata/ , for example: /app/sampledata/image.png .
You can create a sampledata folder by right-clicking on the application and making New > Sample Data directory :

You can then reference them as follows: @sample/
<ImageView android:layout_width="match_parent" android:layout_height="200dp" tools:src="@sample/test.png" />
While this does not give any errors, unfortunately, the function seems to be listening right now, since the images are not displayed in the preview, regardless of whether they are placed in a subdirectory or not (try png, jpeg, jpg, xml).
Interestingly, placing one image in a subdirectory and accessing that subdirectory instead of a specific image seems to work:
Structure of this

In conjunction with these links
<?xml version="1.0" encoding="utf-8"?> <LinearLayout 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" android:orientation="vertical" tools:background="@sample/image"> <ImageView android:layout_width="match_parent" android:layout_height="100dp" tools:src="@sample/avatar" /> <ImageView android:layout_width="match_parent" android:layout_height="100dp" tools:src="@sample/jpeg" /> <ImageView android:layout_width="match_parent" android:layout_height="100dp" tools:src="@sample/vector" /> </LinearLayout>
Produces this preview. Notice how I used tools:background to set the layout background to a sample image.

Can I add more images to be used in this way?
Yes, just add them to the folder.
Can I add other resources? Layouts? Rows?
It is also not supported. If you try to identify some other type of resource, you will get a bunch of syntax errors due to the fact that keywords are not recognized, or you cannot refer to them using the notation tools:src="@sample/ .
Are there any additional features of this new feature?
Not sure about this time.