use of org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem in project AndroidChromium by JackyAndroid.
the class BookmarkItemRow method setBookmarkId.
@Override
BookmarkItem setBookmarkId(BookmarkId bookmarkId) {
BookmarkItem item = super.setBookmarkId(bookmarkId);
mUrl = item.getUrl();
mIconImageView.setImageDrawable(null);
mTitleView.setText(item.getTitle());
mDelegate.getLargeIconBridge().getLargeIconForUrl(mUrl, mMinIconSize, this);
return item;
}
use of org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem in project AndroidChromium by JackyAndroid.
the class BookmarkRow method setBookmarkId.
/**
* Updates this row for the given {@link BookmarkId}.
* @return The {@link BookmarkItem} corresponding the given {@link BookmarkId}.
*/
BookmarkItem setBookmarkId(BookmarkId bookmarkId) {
mBookmarkId = bookmarkId;
BookmarkItem bookmarkItem = mDelegate.getModel().getBookmarkById(bookmarkId);
clearPopup();
if (isSelectable()) {
mMoreIcon.setVisibility(bookmarkItem.isEditable() ? VISIBLE : GONE);
setChecked(mDelegate.getSelectionDelegate().isItemSelected(bookmarkId));
}
super.setItem(bookmarkId);
return bookmarkItem;
}
use of org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem in project AndroidChromium by JackyAndroid.
the class BookmarkEditActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mModel = new BookmarkModel();
mBookmarkId = BookmarkId.getBookmarkIdFromString(getIntent().getStringExtra(INTENT_BOOKMARK_ID));
mModel.addObserver(mBookmarkModelObserver);
BookmarkItem item = mModel.getBookmarkById(mBookmarkId);
if (!mModel.doesBookmarkExist(mBookmarkId) || item == null) {
finish();
return;
}
setContentView(R.layout.bookmark_edit);
mTitleEditText = (EmptyAlertEditText) findViewById(R.id.title_text);
mFolderTextView = (TextView) findViewById(R.id.folder_text);
mUrlEditText = (EmptyAlertEditText) findViewById(R.id.url_text);
mFolderTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
BookmarkFolderSelectActivity.startFolderSelectActivity(BookmarkEditActivity.this, mBookmarkId);
}
});
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
updateViewContent(false);
}
use of org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem in project AndroidChromium by JackyAndroid.
the class BookmarkFolderRow method setBookmarkId.
@Override
BookmarkItem setBookmarkId(BookmarkId bookmarkId) {
BookmarkItem item = super.setBookmarkId(bookmarkId);
mTitleView.setText(item.getTitle());
return item;
}
Aggregations