0

I want to ask something about the gifwebview. How can i resize the gif images while im using the gifwebview. Should I use relative layout params? Because the gif images appeared is very big. I want to adjust the size to fix my application. Please help me.

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    InputStream stream = null;
    try {
        stream = getAssets().open("number1.gif");
    } catch (IOException e) {
        e.printStackTrace();
    }

    GifWebView view = new GifWebView(this, "file:///android_asset/number1.gif");

    setContentView(mainView);


}

There is solution that I found but, im not really how to apply it. Here is the code:

<meta name="viewport"
  content="
      height = [pixel_value | "device-height"] ,
      width = [pixel_value | "device-width"] ,
      initial-scale = float_value ,
      minimum-scale = float_value ,
      maximum-scale = float_value ,
      user-scalable = ["yes" | "no"]
      " />

I already create a html file, and paste into assets. And i use this code to call the meta file, still it doesn't solve the problem. Anyone could explain what am i doing wrong?

WebSettings settings = webView.getSettings();
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
2
Contributors
1
Reply
6
Views
4 Years
Discussion Span
Last Post by peter_budo
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.