How to add FloatingActionButton inside RecyclerView

How to add FloatingActionButton inside RecyclerView

I m new to android programing and i have a tricky problem i passed a couple hours on trying to resolving it but without succuess, im looking how to add FloatingActionButton inside RecyclerView my template look like :

I m new to android programing and i have a tricky problem i passed a couple hours on trying to resolving it but without succuess, im looking how to add FloatingActionButton inside RecyclerView my template look like :

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainFragment">

<android.support.v7.widget.RecyclerView android:id="@+id/messages" android:layout_width="match_parent" android:layout_height="451dp" android:layout_weight="1" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:scrollbarStyle="outsideOverlay" android:scrollbars="vertical" /> <!-- TODO: fix this by adding the floating button inside the recyclerView --> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:src="@drawable/ic_launcher" android:layout_margin="16dp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:orientation="horizontal" android:gravity="center_vertical">

<span class="hljs-tag">&lt;<span class="hljs-name">EditText</span>
        <span class="hljs-attr">android:id</span>=<span class="hljs-string">"@+id/message_input"</span>
        <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">"0dp"</span>
        <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">"wrap_content"</span>
        <span class="hljs-attr">android:layout_weight</span>=<span class="hljs-string">"1"</span>
        <span class="hljs-attr">android:hint</span>=<span class="hljs-string">"@string/prompt_message"</span>
        <span class="hljs-attr">android:imeActionId</span>=<span class="hljs-string">"@+id/send"</span>
        <span class="hljs-attr">android:imeActionLabel</span>=<span class="hljs-string">"@string/action_send"</span>
        <span class="hljs-attr">android:imeOptions</span>=<span class="hljs-string">"actionSend"</span>
        <span class="hljs-attr">android:inputType</span>=<span class="hljs-string">"text"</span>
        <span class="hljs-attr">android:maxLines</span>=<span class="hljs-string">"1"</span>
        <span class="hljs-attr">android:singleLine</span>=<span class="hljs-string">"true"</span>/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">ImageButton</span>
        <span class="hljs-attr">android:id</span>=<span class="hljs-string">"@+id/send_button"</span>
        <span class="hljs-attr">android:layout_width</span>=<span class="hljs-string">"wrap_content"</span>
        <span class="hljs-attr">android:layout_height</span>=<span class="hljs-string">"wrap_content"</span>
        <span class="hljs-attr">android:src</span>=<span class="hljs-string">"@android:drawable/ic_menu_send"</span>
        <span class="hljs-attr">android:contentDescription</span>=<span class="hljs-string">"@string/action_send"</span>/&gt;</span>

</LinearLayout>

Here a my target layout that i need :


java android user-experience

What's new in Bootstrap 5 and when Bootstrap 5 release date?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

Top Android Projects with Source Code

Android projects with source code - Work on real-time android projects. We’ll start project ideas from beginners level and later move to advance projects.

Android Menu - Steps to implement Menu in Android - DataFlair

Implement Android Menu in your application - Provide functionality to your application and make it user friendly. Also, Learn its types and implementation.

Android Hello World Program - Create Your First App in Android Studio

Learn how to start android development in android studio. This is a very simple android project & doesn't need to do much coding

Android Telephony and Telephony Manager Implementation - DataFlair

Android Telephony - What is Android telephony, architecture of telephony in Android, Implementation of TelephonyManager in Android

Android Security - Best Ways to Secure your Android Devices

Android security - Learn what is security in Android, how to make your Android devices secure, what are security patches and how are they important.