My android studio messed up everything. App is working fine. There's no error in compiling and installing app. When I open files in notepad++ there's everything is perfect.
I've tried so far clean Project, Rebuild, Invalidate Cache and Restart. Even I created a new project and copied all the files and assets. Still same problem. Let see the screenshot
But the actual code in HomeActivity is
<?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"
tools:context=".HomeActivity">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="?attr/actionBarSize">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
style="@style/floating_action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:backgroundTint="@color/colorPrimary"
android:clickable="true"
android:src="@drawable/ic_add_plus"
app:borderWidth="0dp"
app:elevation="6dp"
app:rippleColor="@color/colorGreyLight" />
</FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/app_bar"
layout="@layout/home_app_bar" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="160dp"
android:layout_below="@id/app_bar"
android:layout_alignParentTop="false"
android:layout_margin="8dp" />
<LinearLayout
android:id="@+id/slider_dots"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/view_pager"
android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal"></LinearLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="?android:attr/windowBackground"
app:labelVisibilityMode="labeled"
app:menu="@menu/bottom_nav_menu" />
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Here is my build.gradle file if you need.
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.apnaapp"
minSdkVersion 23
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.android.support:appcompat-v7:29.+'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:29.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Any suggestions are most appreciated. Let me know if you require any details regarding.