зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1170289 - Use ImageView in the search engine bar. r?Margaret
--HG-- extra : commitid : 9rVBKmrEgRW extra : rebase_source : 41fe934b76765adb1343b42eb933d5098b439ca7
This commit is contained in:
Родитель
0db8477d19
Коммит
48cbb5d34a
|
@ -15,6 +15,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.widget.FaviconView;
|
||||
|
@ -94,9 +95,9 @@ public class SearchEngineBar extends TwoWayView
|
|||
view = convertView;
|
||||
}
|
||||
|
||||
final FaviconView faviconView = (FaviconView) view.findViewById(R.id.search_engine_icon);
|
||||
final ImageView faviconView = (ImageView) view.findViewById(R.id.search_engine_icon);
|
||||
final SearchEngine searchEngine = searchEngines.get(position);
|
||||
faviconView.updateAndScaleImage(searchEngine.getIcon(), searchEngine.getEngineIdentifier());
|
||||
faviconView.setImageBitmap(searchEngine.getIcon());
|
||||
|
||||
final View container = view.findViewById(R.id.search_engine_icon_container);
|
||||
final String desc = getResources().getString(R.string.search_bar_item_desc, searchEngine.getEngineIdentifier());
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
|
||||
<!-- Width & height are set to make the Favicons as sharp as possible
|
||||
based on asset size. -->
|
||||
<org.mozilla.gecko.widget.FaviconView
|
||||
<ImageView
|
||||
android:id="@+id/search_engine_icon"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"/>
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
Загрузка…
Ссылка в новой задаче