Я получил xml кодов (с чертежами ...) и внедрил его в свой проект, но он не работает
apply plugin: 'com.android.application'
android {
dataBinding {
enabled true
}
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.md.splashloginsignup"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation "com.mikepenz:iconics-core:3.0.2@aar"
implementation 'com.mikepenz:fontawesome-typeface:5.0.6.0@aar'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0-alpha1'
implementation 'com.google.android.material:material:1.0.0'
//noinspection GradleCompatible
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//noinspection GradleCompatible
implementation 'com.android.support:gridlayout-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:26.1.0'
}
и вот код xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="@color/profileBackground">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="@color/profilePrimaryDark"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:toolbarId="@+id/toolbar"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center_horizontal"
android:orientation="vertical"
android:id="@+id/linearLayout"
android:background="@drawable/profile_bk">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/profile_round" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="\@appsnippuser"
android:textSize="28dp"
android:textStyle="bold"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="developer@appsnipp.com"
android:textSize="12dp"
android:textStyle="bold"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="bottom"
android:layout_marginTop="20dp"
android:background="@color/profileBackground">
<View
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="@drawable/profile_bk"/>
</RelativeLayout>
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_profile" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Я пытался изменить много версий в Gradle, но все еще не работает
может быть, также проблема со стилями. xml, я не могу опубликуйте его из-за ошибки
"Похоже, ваше сообщение в основном состоит из кода; пожалуйста, добавьте еще несколько деталей."