Section 3.6 recyclerView add dependencies
As used in the compile command build.gradle file is now no longer supported, the command to change implementation, as follows:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:recyclerview-v7:24.2.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Accordingly, when reference recyclerView control the xml file, using androidx library, the following tags:
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
Section 4.4 Dynamic loading layout
Here you need to add a layout-large / activity_main.xml, but when the operation will be error: duplicate file names (although this is not the default activity_main.xml under the same path), which seems to be the new AS function, as shown below:
solution:
right-layout-large-> New-> layoutsoursefile to (the last step Do not point the xml), as shown below: