Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TextView searchText= new TextView(mContext);
- searchText.setTextColor(Color.BLACK);
- searchText.setId(R.id.find_text);
- searchText.setText("customExample");
- LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
- searchText.setLayoutParams(params);
- final GeckoMenuItem text = (GeckoMenuItem) menu.add(Menu.NONE,R.id.find_text,0,R.string.find_text);
- text.setShowAsAction(GeckoMenuItem.SHOW_AS_ACTION_ALWAYS, R.attr.menuItemActionModeStyle);
- text.setActionView(searchText);
- text.setIcon(getResources().getDrawable(R.drawable.url_bar_entry));
- final GeckoMenuItem prev = (GeckoMenuItem) menu.add(Menu.NONE, R.id.find_prev, 1, R.string.find_prev);
- prev.setShowAsAction(GeckoMenuItem.SHOW_AS_ACTION_ALWAYS, R.attr.menuItemActionModeStyle);
- prev.setIcon(getResources().getDrawable(R.drawable.validation_arrow));
- final GeckoMenuItem next = (GeckoMenuItem) menu.add(Menu.NONE, R.id.find_next, 2, R.string.find_next);
- next.setShowAsAction(GeckoMenuItem.SHOW_AS_ACTION_ALWAYS, R.attr.menuItemActionModeStyle);
- next.setIcon(getResources().getDrawable(R.drawable.validation_arrow_inverted));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement