Android添加书签(二)(8)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:12 点击:次
/**
*
* <p>
* Title: BookmarkItem.java
* </p>
* <p>
* E-Mail: 176291935@qq.com
* </p>
* <p>
* QQ: 176291935
* </p>
* <p>
* Http: iaiai.iteye.com
* </p>
* <p>
* Create time: 2011-8-29
* </p>
*
* @author 丸子
* @version 0.0.1
*/
class BookmarkItem extends RelativeLayout {
private TextView mTextView; // title
private TextView mUrlText; // url
private ImageView mImageView; // favicon
private LayoutInflater mFactory;
private RelativeLayout mBookmarkItem;
/**
* Instantiate a bookmark item, including a default favicon.
*
* @param context
* The application context for the item.
*/
BookmarkItem(Context context) {
super(context);
mFactory = LayoutInflater.from(context);
mFactory.inflate(R.layout.bookmark_item, this);
mTextView = (TextView) findViewById(R.id.title);
mUrlText = (TextView) findViewById(R.id.url);
mImageView = (ImageView) findViewById(R.id.favicon);
mBookmarkItem = (RelativeLayout) findViewById(R.id.bookmarkitem);
}
public void setSelected() {
mBookmarkItem.setBackgroundColor(0xFFFF6633);
mUrlText.setTextColor(0xFF000000);
}
public void setUnselected() {
mBookmarkItem.setBackgroundColor(0xFF000000);
mUrlText.setTextColor(0xFFAAAAAA);
}
/**
* Copy this BookmarkItem to item.
*
* @param item
* BookmarkItem to receive the info from this BookmarkItem.
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>