Archit Gupta
Archit Gupta

Reputation: 1

Android - Navigation Bar - Left most triangle method name

By default the triangle is towards left and if i click on search option ,It opens up edit text on the top & virtual keyboard , the triangle changes its shape to downwards**,CLICK FOR IMAGE 1**Now when i tap on down triangle it only closes the virtual keyboard not the edit text & virtual keyboard together**,CLICK FOR IMAGE 2**In Navigation Bar of an android application at the bottom of your screen , left most triangle icon defines onKeyDown Method by default & onBackPressed Method do the same task (which is a left side pointing triangle by default)..

If there is a edit box and virtual keyboard is open then the triangle changes its shape towards down and if i press it (It only closes the virtual keyboard, not the edit box(search bar) & changes its shape back to left side pointing triangle)..

I want to know the Method name for the down side triangle so that i can override it & close the edit box & virtual keyboard both at the same time .. (Just like it happens in play store when you search for something in My apps and games).. Thanks for the solution in advance....

Upvotes: 0

Views: 333

Answers (1)

Boban S.
Boban S.

Reputation: 1662

It's onBackPressed method in activity.

http://developer.android.com/reference/android/app/Activity.html#onBackPressed()

Upvotes: 1

Related Questions