user2119884
user2119884

Reputation: 1

How to hide only the actionbar on selection of a text in edittext

I am working on a project in which I have to select a text on long press. It works but the action bar appears. I want to hide the action bar but not selection of the text in edittext box. I have searched for it but didn't get any specific answer.

Upvotes: 0

Views: 172

Answers (2)

Nguyen Thanh An
Nguyen Thanh An

Reputation: 269

so hard to undstand what you mind , I think you should try this :

final ActionBar actionBar = getActionBar();
actionBar.hide();

Upvotes: 0

Ogen
Ogen

Reputation: 6709

In the onclick method put this line...

getActivity().getActionBar().hide();

Also, a little tip. I like to define a variable called appContext and I make it equal this in the onCreate method so I can use the application's context easily.

Upvotes: 1

Related Questions