使用Glide在棒棒糖及以上设备上显示大型矢量绘图

时间:2016-05-27 05:15:47

标签: android android-studio android-glide android-vectordrawable

我可以使用BumpTech Glide在棒棒糖前设备上显示大型Vector Drawable但在棒棒糖及以上设备上无法显示...活动开始但Imageview不是所示。

这是布局文件

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FF5722"
    tools:context=".Main.SplashScreen2.SplashScreen2">

    <ImageView
        android:id="@+id/imageViewSplashScreen2"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:contentDescription="@string/image_of_ahilya_ghat_river_bank_of_varanasi" />

</FrameLayout>

这是java文件

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.raviseth.searchviewtrials.Main.MainActivityListViewPage.activities.MainActivity;
import com.example.raviseth.searchviewtrials.R;

import uk.co.senab.photoview.PhotoViewAttacher;

public class SplashScreen2 extends AppCompatActivity {
    FloatingActionButton fabSplashScreen2;
    ImageView imageViewSpashScreen2;
    PhotoViewAttacher photoViewAttacher = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splashsreen2);

        imageViewSpashScreen2 = (ImageView) findViewById(R.id.imageViewSplashScreen2);
        if (imageViewSpashScreen2 != null) {
            photoViewAttacher = new PhotoViewAttacher(imageViewSpashScreen2);
            Glide.with(getApplicationContext())
                    .load(R.drawable.ghat)
                    .into(imageViewSpashScreen2);
            photoViewAttacher.update();
        }
    }
}

0 个答案:

没有答案