android {
compileSdkVersion 28
buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.app.tesandroidx"
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(\'proguard-android-optimize.txt\'), \'proguard-rules.pro\'
}
}
useLibrary \'org.apache.http.legacy\'
}
dependencies {
implementation fileTree(dir: \'libs\', include: [\'*.jar\'])
implementation \'androidx.appcompat:appcompat:1.0.2\'
implementation \'androidx.constraintlayout:constraintlayout:1.1.3\'
implementation \'com.google.android.gms:play-services-maps:17.0.0\'
testImplementation \'junit:junit:4.12\'
androidTestImplementation \'androidx.test:runner:1.1.1\'
androidTestImplementation \'androidx.test.espresso:espresso-core:3.1.1\'
implementation \'androidx.cardview:cardview:1.0.0\'
implementation \'com.android.support:design:28.0.0\'
implementation \'info.vividcode.android.zxing:capture-activity:2.3.0-1.+\'
implementation \'com.journeyapps:zxing-android-embedded:3.1.0@aar\'
implementation \'com.google.zxing:core:3.0.1\'
implementation \'me.dm7.barcodescanner:zxing:1.9\'
implementation \'me.dm7.barcodescanner:zxing:1.8.4\'
implementation "com.android.support:support-v4:28.0.0"
}
=================If you make card View====
change to in layout: <br>
androidx.cardview.widget.CardView
<androidx.cardview.widget.CardView
android:foreground="?android:attr/selectableItemBackground"
android:clickable="true"
android:id="@+id/mapsCard"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_margin="10dp">