Java Code Examples for org.chromium.chrome.browser.widget.TintedImageButton#setOnClickListener()
The following examples show how to use
org.chromium.chrome.browser.widget.TintedImageButton#setOnClickListener() .
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: BookmarkRow.java From delion with Apache License 2.0 | 6 votes |
@Override protected void onFinishInflate() { super.onFinishInflate(); mIconImageView = (ImageView) findViewById(R.id.bookmark_image); mTitleView = (TextView) findViewById(R.id.title); if (isSelectable()) { mHighlightView = (BookmarkItemHighlightView) findViewById(R.id.highlight); mMoreIcon = (TintedImageButton) findViewById(R.id.more); mMoreIcon.setVisibility(VISIBLE); mMoreIcon.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { showMenu(view); } }); } setOnClickListener(this); setOnLongClickListener(this); }
Example 2
Source File: AppMenuAdapter.java From delion with Apache License 2.0 | 6 votes |
private void setupImageButton(TintedImageButton button, final MenuItem item) { // Store and recover the level of image as button.setimageDrawable // resets drawable to default level. int currentLevel = item.getIcon().getLevel(); button.setImageDrawable(item.getIcon()); item.getIcon().setLevel(currentLevel); if (item.isChecked()) { button.setTint(ApiCompatibilityUtils.getColorStateList( button.getResources(), R.color.blue_mode_tint)); } button.setEnabled(item.isEnabled()); button.setFocusable(item.isEnabled()); button.setContentDescription(item.getTitleCondensed()); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mAppMenu.onItemClick(item); } }); }
Example 3
Source File: BookmarkRow.java From AndroidChromium with Apache License 2.0 | 6 votes |
@Override protected void onFinishInflate() { super.onFinishInflate(); mIconImageView = (ImageView) findViewById(R.id.bookmark_image); mTitleView = (TextView) findViewById(R.id.title); if (isSelectable()) { mMoreIcon = (TintedImageButton) findViewById(R.id.more); mMoreIcon.setVisibility(VISIBLE); mMoreIcon.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { showMenu(view); } }); } }
Example 4
Source File: AppMenuAdapter.java From AndroidChromium with Apache License 2.0 | 6 votes |
private void setupImageButton(TintedImageButton button, final MenuItem item) { // Store and recover the level of image as button.setimageDrawable // resets drawable to default level. int currentLevel = item.getIcon().getLevel(); button.setImageDrawable(item.getIcon()); item.getIcon().setLevel(currentLevel); if (item.isChecked()) { button.setTint(ApiCompatibilityUtils.getColorStateList( button.getResources(), R.color.blue_mode_tint)); } button.setEnabled(item.isEnabled()); button.setFocusable(item.isEnabled()); button.setContentDescription(item.getTitleCondensed()); button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mAppMenu.onItemClick(item); } }); // Menu items may be hidden by command line flags before they get to this point. button.setVisibility(item.isVisible() ? View.VISIBLE : View.GONE); }
Example 5
Source File: BookmarkRow.java From 365browser with Apache License 2.0 | 6 votes |
@Override protected void onFinishInflate() { super.onFinishInflate(); mIconImageView = (ImageView) findViewById(R.id.bookmark_image); mTitleView = (TextView) findViewById(R.id.title); mMoreIcon = (TintedImageButton) findViewById(R.id.more); mMoreIcon.setVisibility(VISIBLE); mMoreIcon.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { showMenu(view); } }); }
Example 6
Source File: AppMenuIconRowFooter.java From 365browser with Apache License 2.0 | 6 votes |
@Override protected void onFinishInflate() { super.onFinishInflate(); mForwardButton = (TintedImageButton) findViewById(R.id.forward_menu_id); mForwardButton.setOnClickListener(this); mForwardButton.setOnLongClickListener(this); mBookmarkButton = (TintedImageButton) findViewById(R.id.bookmark_this_page_id); mBookmarkButton.setOnClickListener(this); mBookmarkButton.setOnLongClickListener(this); mDownloadButton = (TintedImageButton) findViewById(R.id.offline_page_id); mDownloadButton.setOnClickListener(this); mDownloadButton.setOnLongClickListener(this); mPageInfoButton = (TintedImageButton) findViewById(R.id.info_menu_id); mPageInfoButton.setOnClickListener(this); mPageInfoButton.setOnLongClickListener(this); mReloadButton = (TintedImageButton) findViewById(R.id.reload_menu_id); mReloadButton.setOnClickListener(this); mReloadButton.setOnLongClickListener(this); }
Example 7
Source File: HistoryItemView.java From 365browser with Apache License 2.0 | 6 votes |
@Override protected void onFinishInflate() { super.onFinishInflate(); mTitle = (TextView) findViewById(R.id.title); mDomain = (TextView) findViewById(R.id.domain); mIconImageView = (ImageView) findViewById(R.id.icon_view); mContentView = findViewById(R.id.content); mRemoveButton = (TintedImageButton) findViewById(R.id.remove); mRemoveButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { remove(); } }); updateRemoveButtonVisibility(); }