Yup, you're confusing a few things.
When you use the "share text" button or the dictionary lookup you're opening other activities. These activities did enable certain filters to let other activities notice they can do things with them (like share, process text or open a document).
That's why when you click "share text" you'll be prompted with activities that can handle text sharing (from Whatsapp to Twitter, note taking apps, dictionaries... whatever)
All activities have their own UI, because that's what they are (see
https://developer.android.com/guide/...tro-activities)
What you want needs an application that provides a service, not an activity. That service needs to be available for other activities. If you find an offline translator that provides an service that can be bounded by 3rd party apps (using
AIDL, for instance) then we can use its API like we use the API of google translate.