If you don't like the FAB (FloatingActionButton) default color you can set a custom one using backgroundTint property/attribute.
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.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"
tools:context=".ToDoMainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_to_do_main" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
app:backgroundTint="#ccc"
android:src="@android:drawable/ic_dialog_email" />
</android.support.design.widget.CoordinatorLayout>
Note: app:backgroundTint may not work of older device.
More Posts related to Android-Studio,
- Error running 'app': No target device found.
- How to save IntelliJ IDE Console logs to external log file
- Android Studio : Implement abstract methods shortcut
- Android Studio Error:(19, 0) Gradle DSL method not found: android()
- Android [SDK Manager] The system cannot find the path specified
- [Solution] Android Studio does not displays Toolbar in Layout Design
- [Android Studio] failed to find Build Tools revision 23.0.0 rc1
- [Android Studio] Hardcoded string Button, should use @string resource
- JDK Location in Android Studio
- Android Studio : Connection Error : Failed to download patch file
- Your Android SDK is missing, out of date or corrupted SDK Problem
- Cannot start Android Studio. No JDK found
- Android Studio : Build Tools 23.0.0 rc1 is deprecated
- Android Studio emulator/Device logCat logs not displayed
- Delete Android Studio Projects
- Android Studio : Change FAB icon color : FloatingActionButton
- How to install Android Studio Chipmunk and SDK tools on macOS (2021.2)
- Building library Gradle Project Info: Downloading services.gradle.org
- [Android Studio] Could not automatically detect an ADB binary
- The package must have at least one . separator [Android Studio]
- Create assets folder in Android Studio
- How to remove Floating Action Button Android Studio Blank Activity Template
- [Event Log] Android Studio performance could be improved
- The selected device is incompatible : Android Studio
- Disabling Spell Check in Android Studio
More Posts:
- How to serialize-deserialize an object in java - Java
- Android Studio : Connection Error : Failed to download patch file - Android-Studio
- Java SE 8 Update 301 available with various bug fixes and security improvements - Java
- Java: Check Internet connection on Android Device (Wifi or Mobile) - Android
- How to enable line numbers in IntelliJ Android Studio for all files - Android-Studio
- Unhandled exception type InterruptedException : Java Threads - Java
- How to identify installed Java (JDK) Version on macOS - MacOS
- How to Generate Self-Signed OpenSSL certificate in three easy steps - HowTos