如何在全屏显示gif图像?安卓工作室

时间:2015-11-05 21:50:26

标签: android surfaceview gif

我在程序中显示gif时遇到问题: 它恰好适合页面的25%.. \

public class MainActivity extends AppCompatActivity {
SurfaceView surfaceView;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState); 
    setContentView(R.layout.activity_main);
    surfaceView = (SurfaceView)findViewById(R.id.mygif);

    GifRun gifRun = new GifRun();
    gifRun.LoadGiff(surfaceView, this, R.drawable.splashgif);
}

XML:

<SurfaceView
android:id="@+id/mygif"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
    android:scaleType="fitXY"
    />

图像适合屏幕的这一部分,而我需要它适合整个屏幕..谢谢你:) The image fits just part of the screen, while i need it to be all over it.. Thank you!] 1

0 个答案:

没有答案