What I want to achieve
I have an application, where in the bottom left corner, I have a button. This button is a circular ImageButton. When I press the button (with the magnifying glass icon, the following transition should happen:
Also, if it is not clear in the image, the button is a ImageButton, while the "end result" is a SearchView. This doesn't necessarily have to be like this, but it seems to be the best way to go.
What I have now
I have an XML-file for the style of the circular button, called search_button_layout.xml that looks like this:
<?xml version="1.0" encoding="utf-8"?> shapexmlns:android="http://schemas.android.com /apk/res /android" android:shape="rectangle"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<corners
android:topLeftRadius="100dp"
android:topRightRadius="100dp"
android:bottomLeftRadius="100dp"
android:bottomRightRadius="100dp"
/>
<solid
android:color="#31DE65"
/>
<padding
android:left="0dp"
android:top="0dp"
android:right="0dp"
android:bottom="0dp"
/>
<size
android:width="45dp"
android:height="46dp"
/>
</shape>
The button itself is created in the activity_main.xml file, and looks like this.
<ImageButton
android:id="@+id/search_btn"
android:layout_width="65dp"
android:layout_height="66dp"
android:background="@layout/search_button_layout"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:onClick="goToSearch"
android:src="@drawable/ic_action_name"
android:scaleType="fitCenter" />
I have been trying to search, but I only end up with unanswered questions that are outdated.
Please respond if informations is lacking, or if you have a source to a solution that I haven't been able to find.
Short version
When I click the circular imagebutton (left in the image) I want an animation that looks like a searchview (right in the image).