On recent versions of Android, opening a link from Google Search it opens on a wrapped version of the Chrome within Google Search app and it offers a option on the menu to 'open with Chrome'. This common pattern is also seen on other apps like Facebook, Twitter, etc. So basically it opens the link on a 'WebView wrapper' within the app instead of opening the Browser app.
An interesting thing is found on the one from Google Search, that when you click on the 'open with Chrome' it plays a very smooth transition to Chrome, like if it would get transformed into Chrome.
Is there any sample or library that kinda helps or wraps this behavior? Or an 'in-app browser' that wraps this activity behavior.
You're probably looking for Chrome Custom Tabs as Morrison Chang already mentioned.
Add implementation "androidx.browser:browser:1.3.0"
to your build.gradle file.
You can open a new tab like this:
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse("https://www.example.com"));
Further examples can be found in the Implementation guide.