Android Webview通过图片大小调整加载本地内容

时间:2015-07-02 03:40:23

标签: image webview resize

我有来自界面的html内容并在webview中显示它,但是有些图片太大而且有些非常小,我应该怎么做才能使大图片适合屏幕并保持小图片的大小? 这是我的剧本:

/**
 * Returns a canonical representation for the string object.
 * <p>
 * A pool of strings, initially empty, is maintained privately by the
 * class {@code String}.
 * <p>
 * When the intern method is invoked, if the pool already contains a
 * string equal to this {@code String} object as determined by
 * the {@link #equals(Object)} method, then the string from the pool is
 * returned. Otherwise, this {@code String} object is added to the
 * pool and a reference to this {@code String} object is returned.
 * <p>
 * It follows that for any two strings {@code s} and {@code t},
 * {@code s.intern() == t.intern()} is {@code true}
 * if and only if {@code s.equals(t)} is {@code true}.
 * <p>
 * All literal strings and string-valued constant expressions are
 * interned. String literals are defined in section 3.10.5 of the
 * <cite>The Java&trade; Language Specification</cite>.
 *
 * @return  a string that has the same contents as this string, but is
 *          guaranteed to be from a pool of unique strings.
 */

但是小图片会在4.4.4中调整到屏幕宽度,我应该怎么做?

0 个答案:

没有答案
相关问题