7
Like the Leonardo Dias commented. This is a Fragment Transition Animation Material Design. Sounds complicated but it’s not.
It’s just a button that turns into a view
that covers the entire fabric.
I think in a basic research of working Transition you will already understand and get to do.
A simple example:
Mainactivity.class
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
super.onCreate(savedInstanceState);
setContentView(R.layout.principal);
}
public void onButton(View view) {
Intent intent = new Intent(this, SegundaTela.class);
Button button = (Button) findViewById(R.id.button);
ActivityOptionsCompat compat = ActivityOptionsCompat.makeSceneTransitionAnimation(this, button, "transtion_key");
ActivityCompat.startActivity(this,intent, compat.toBundle());
}
}
Segunda ndatela.class
public class SegundaTela extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
First Layout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Button
android:layout_width="200dp"
android:layout_height="wrap_content"
android:transitionName="transtion_key"
android:text="Button"
android:id="@+id/button"
android:background="@color/colorPrimary"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:onClick="onButton"
android:layout_marginBottom="79dp" />
</RelativeLayout>
Second layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:transitionName="transtion_key"
android:background="@color/colorAccent"
android:orientation="vertical">
</LinearLayout>
Detail on the vestments android:transitionName="transtion_key"
, getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS)
and in the method onButton(View view)
This code makes the animation that your image shows after the login is done (full screen).
when validating the information after clicking the button(Sign in) the button turns Hide and in the same proportion is exchanged for an image that changes its format to a circle and then loads a new page with the user information. use Jquery + CSS3
– Wilson Rosa Gomes
You could try using a library, listed here are some: https://github.com/wasabeef/awesome-android-ui/blob/master/pages/Button.md
– Diniz
Search for search on android Fragment Transition Animation Material Design, There are many libraries that make this effect for you.
– Leonardo Dias