Bug 757776 - Rename starView to bookmarkIconView in AwesomeBarTabs (r=mfinkle)

This commit is contained in:
Lucas Rocha 2012-06-07 21:27:39 +01:00
Родитель 03d588e3a9
Коммит 10c64fd8e0
2 изменённых файлов: 10 добавлений и 11 удалений

Просмотреть файл

@ -96,7 +96,7 @@ public class AwesomeBarTabs extends TabHost {
public TextView titleView;
public TextView urlView;
public ImageView faviconView;
public ImageView starView;
public ImageView bookmarkIconView;
}
private class SearchEntryViewHolder {
@ -127,7 +127,7 @@ public class AwesomeBarTabs extends TabHost {
viewHolder.titleView = (TextView) convertView.findViewById(R.id.title);
viewHolder.urlView = (TextView) convertView.findViewById(R.id.url);
viewHolder.faviconView = (ImageView) convertView.findViewById(R.id.favicon);
viewHolder.starView = (ImageView) convertView.findViewById(R.id.bookmark_star);
viewHolder.bookmarkIconView = (ImageView) convertView.findViewById(R.id.bookmark_icon);
convertView.setTag(viewHolder);
} else {
@ -161,7 +161,7 @@ public class AwesomeBarTabs extends TabHost {
// The bookmark id will be 0 (null in database) when the url
// is not a bookmark.
int visibility = (bookmarkId == 0 ? View.GONE : View.VISIBLE);
viewHolder.starView.setVisibility(visibility);
viewHolder.bookmarkIconView.setVisibility(visibility);
return convertView;
}
@ -766,7 +766,7 @@ public class AwesomeBarTabs extends TabHost {
viewHolder.titleView = (TextView) convertView.findViewById(R.id.title);
viewHolder.urlView = (TextView) convertView.findViewById(R.id.url);
viewHolder.faviconView = (ImageView) convertView.findViewById(R.id.favicon);
viewHolder.starView = (ImageView) convertView.findViewById(R.id.bookmark_star);
viewHolder.bookmarkIconView = (ImageView) convertView.findViewById(R.id.bookmark_icon);
convertView.setTag(viewHolder);
} else {
@ -781,7 +781,7 @@ public class AwesomeBarTabs extends TabHost {
updateTitle(viewHolder.titleView, cursor);
updateUrl(viewHolder.urlView, cursor);
updateFavicon(viewHolder.faviconView, cursor);
updateBookmarkStar(viewHolder.starView, cursor);
updateBookmarkIcon(viewHolder.bookmarkIconView, cursor);
}
return convertView;
@ -1084,14 +1084,14 @@ public class AwesomeBarTabs extends TabHost {
urlView.setText(url);
}
private void updateBookmarkStar(ImageView starView, Cursor cursor) {
private void updateBookmarkIcon(ImageView bookmarkIconView, Cursor cursor) {
int bookmarkIdIndex = cursor.getColumnIndexOrThrow(Combined.BOOKMARK_ID);
long id = cursor.getLong(bookmarkIdIndex);
// The bookmark id will be 0 (null in database) when the url
// is not a bookmark.
int visibility = (id == 0 ? View.GONE : View.VISIBLE);
starView.setVisibility(visibility);
bookmarkIconView.setVisibility(visibility);
}
public void setOnUrlOpenListener(OnUrlOpenListener listener) {

Просмотреть файл

@ -17,7 +17,7 @@
android:minHeight="32dip"
android:scaleType="fitCenter"/>
<ImageView android:id="@+id/bookmark_star"
<ImageView android:id="@+id/bookmark_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
@ -25,7 +25,6 @@
android:layout_alignParentRight="true"
android:visibility="gone"
android:minHeight="32dip"
android:src="@drawable/ic_awesomebar_star"
android:scaleType="fitStart"/>
<TextView android:id="@+id/title"
@ -34,7 +33,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
android:layout_toRightOf="@id/favicon"
android:layout_toLeftOf="@id/bookmark_star"
android:layout_toLeftOf="@id/bookmark_icon"
android:singleLine="true"
android:ellipsize="middle"/>
@ -46,7 +45,7 @@
android:layout_marginTop="2dip"
android:layout_below="@id/title"
android:layout_alignLeft="@id/title"
android:layout_toLeftOf="@id/bookmark_star"
android:layout_toLeftOf="@id/bookmark_icon"
android:includeFontPadding="false"
android:singleLine="true"
android:ellipsize="middle"/>