Java Code Examples for com.actionbarsherlock.view.MenuInflater#inflate()

The following examples show how to use com.actionbarsherlock.view.MenuInflater#inflate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InCallCard.java    From CSipSimple with GNU General Public License v3.0 5 votes vote down vote up
private void initControllerView() {
    photo = (ImageView) findViewById(R.id.contact_photo);
    remoteName = (TextView) findViewById(R.id.contact_name_display_name);
    remoteSipAddress = (TextView) findViewById(R.id.contact_name_sip_address);
    elapsedTime = (Chronometer) findViewById(R.id.elapsedTime);
    callStatusText = (TextView) findViewById(R.id.call_status_text);
    callSecureBar = (ViewGroup) findViewById(R.id.call_secure_bar);
    callSecureText = (TextView) findViewById(R.id.call_secure_text);
    endCallBar = (ViewGroup) findViewById(R.id.end_call_bar);


    View btn;
    btn = findViewById(R.id.endButton);
    btn.setOnClickListener(this);

    btnMenuBuilder = new MenuBuilder(getContext());
    btnMenuBuilder.setCallback(this);
    MenuInflater inflater = new MenuInflater(getContext());
    inflater.inflate(R.menu.in_call_card_menu, btnMenuBuilder);
    
    mActionMenuPresenter = new ActionMenuPresenter(getContext());
    mActionMenuPresenter.setReserveOverflow(true);
    
    btnMenuBuilder.addMenuPresenter(mActionMenuPresenter);
    
    updateMenuView();
}
 
Example 2
Source File: LoginActivity.java    From buddycloud-android with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onCreateOptionsMenu(Menu menu) {
	MenuInflater inflater = getSupportMenuInflater();
       inflater.inflate(R.menu.login_screen_options, menu);
	
       MenuItem item = menu.findItem(R.id.menu_signup);
       if (item != null) {
       	item.setTitle(getString(R.string.signup_button).toUpperCase(Locale.ENGLISH));
       }
       
	return super.onCreateOptionsMenu(menu);
}
 
Example 3
Source File: TodoTxtTouch.java    From endpoints-codelab-android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onCreateOptionsMenu(Menu menu) {
	MenuInflater inflater = getSupportMenuInflater();
	inflater.inflate(R.menu.main, menu);
	this.options_menu = menu;

	return super.onCreateOptionsMenu(menu);
}
 
Example 4
Source File: CropManager.java    From Favorite-Android-Client with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onCreateOptionsMenu(Menu menu) {

	// 메뉴 버튼 구현부분
	MenuInflater inflater = getSupportMenuInflater();
	inflater.inflate(R.menu.cropper, menu);
	return true;

}
 
Example 5
Source File: page_create.java    From Favorite-Android-Client with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onCreateOptionsMenu(Menu menu) {

	// 메뉴 버튼 구현부분
	MenuInflater inflater = getSupportMenuInflater();
	inflater.inflate(R.menu.accept, menu);
	return true;

}
 
Example 6
Source File: DefaultStyleActivity.java    From android-opensource-library-56 with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    //通常のActivityでの呼び出し方
    //MenuInflater inflator = getMenuInflater();

    MenuInflater inflator = getSupportMenuInflater();

    inflator.inflate(R.menu.default_style, menu);
    return true;
}
 
Example 7
Source File: TwoLinesArrayAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 8
Source File: CustomLayoutProgressFragment.java    From Android-ProgressFragment with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.refresh, menu);
}
 
Example 9
Source File: ComplexItemLayoutAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 10
Source File: MySimpleCursorAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 11
Source File: PendingSubscriptionsAdapter.java    From buddycloud-android with Apache License 2.0 4 votes vote down vote up
@Override
protected void onCreateActionMode(ActionMode mode, Menu menu) {
	MenuInflater inflater = mode.getMenuInflater();
	inflater.inflate(R.menu.pending_subscriptions_options, menu);
}
 
Example 12
Source File: MyGridAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 13
Source File: CustomActionModeTitleAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 14
Source File: DefaultProgressListFragment.java    From Android-ProgressFragment with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.refresh, menu);
}
 
Example 15
Source File: CountriesAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 16
Source File: AlphabetIndexerCursorAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 17
Source File: DisplayNovelTabFragment.java    From coolreader with MIT License 4 votes vote down vote up
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
	// set menu for main/teaser/original
	inflater.inflate(R.menu.fragment_display_novel_tab, menu);
}
 
Example 18
Source File: DefaultProgressGridFragment.java    From Android-ProgressFragment with Apache License 2.0 4 votes vote down vote up
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    inflater.inflate(R.menu.refresh, menu);
}
 
Example 19
Source File: MyBaseAdapter.java    From MultiChoiceAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
    MenuInflater inflater = mode.getMenuInflater();
    inflater.inflate(R.menu.my_action_mode, menu);
    return true;
}
 
Example 20
Source File: MainPrefs.java    From CSipSimple with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean onCreateOptionsMenu(Menu menu) {
       MenuInflater inflater = getSupportMenuInflater();
       inflater.inflate(R.menu.main_prefs, menu);
	return super.onCreateOptionsMenu(menu);
}