Showing posts with label Image. Show all posts
Showing posts with label Image. Show all posts

Wednesday, June 8, 2011

Adding Local Images to An Android Webview

This tutorial demonstrates how to download a web page from the internet, and then modify that web page to use local graphics resources before displaying to the user.

Why Use Local Images?

Perhaps you want your app to dynamically load data from the internet, but you frequently want to display the same images. Using local images can be a good way to cut down on the amount of bandwidth needed for an application and could improve performance.

Before We Start

If you haven't all ready, please take a look at the previous tutorial, displaying a static web page in android.This tutorial will be building off of that.

Friday, June 3, 2011

Properly Scaling Android Images

This article describes how you can get an image to properly scale in an Android Image View.

Designing apps on the Android platform can sometimes be a challenge. Sometimes when dealing with images, you create a source image that is too large to fit on every screen. Since your app will likely run on a multitude of different devices, you want to ensure that it looks as good as possible on several different sized screens.

The Background Property

An image can automatically be scaled by setting it as the background property for a view. Sometimes this is desirable. For example, if you have an image that you want to be used as a background for your entire app, that is well suited to being stretched and skewed.

A linear layout with the background property set as an image