--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape>
+ <corners android:radius="5dip"/>
+ <solid android:color="@color/white"/>
+ </shape>
+ </item>
+</layer-list>
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="4dip"
- android:background="@color/white">
+ >
<ImageView android:id="@+id/thumb"
- android:src="@drawable/app_web_browser_sm"
+ android:src="@drawable/blank"
android:scaleType="center"
android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_height="fill_parent"
+ />
+
+<!--
+ <ImageView android:id="@+id/fav"
+ android:scaleType="center"
+ android:layout_width="20dip"
+ android:layout_height="20dip"
+ />
+-->
<TextView android:id="@+id/label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textStyle="bold"
android:textColor="@color/white"
android:maxLines="1"
android:paddingTop="3dip"
android:paddingLeft="2dip"
android:paddingRight="2dip"
android:scrollHorizontally="true"
- android:background="#CC000000"/>
+ android:ellipsize="marquee"
+ />
</LinearLayout>
v = factory.inflate(R.layout.bookmark_thumbnail, null);
}
ImageView thumb = (ImageView) v.findViewById(R.id.thumb);
+ // Favicon disabled for now.
+ //ImageView fav = (ImageView) v.findViewById(R.id.fav);
TextView tv = (TextView) v.findViewById(R.id.label);
ViewGroup.LayoutParams lp = thumb.getLayoutParams();
byte[] data = mCursor.getBlob(
Browser.HISTORY_PROJECTION_THUMBNAIL_INDEX);
if (data == null) {
- // Backup is to show the favicon
- data = mCursor.getBlob(
- Browser.HISTORY_PROJECTION_FAVICON_INDEX);
- thumb.setScaleType(ImageView.ScaleType.CENTER);
+ // Backup is to just show white
+ thumb.setImageResource(R.drawable.blank);
} else {
- thumb.setScaleType(ImageView.ScaleType.FIT_XY);
- }
- if (data != null) {
thumb.setImageBitmap(
BitmapFactory.decodeByteArray(data, 0, data.length));
+ }
+/*
+ // Now show the favicon
+ data = mCursor.getBlob(Browser.HISTORY_PROJECTION_FAVICON_INDEX);
+ if (data == null) {
+ fav.setVisibility(View.GONE);
} else {
- thumb.setImageResource(R.drawable.app_web_browser_sm);
- thumb.setScaleType(ImageView.ScaleType.CENTER);
+ fav.setVisibility(View.VISIBLE);
+ fav.setImageBitmap(
+ BitmapFactory.decodeByteArray(data, 0, data.length));
}
+*/
return v;
}