2016-10-05 10 views
0

私は壁紙アプリを作ろうとしていますが、壁紙を設定した後で低解像度の問題に直面しています。壁紙の解像度の問題

壁紙に設定する前の実写はURLから非常に高解像度ですが、

これは私のコードです:それは解像度

の損失

チェックせずにスケールします、

public void set(View view) { 
    Toast.makeText(MainActivity.this, "Setting wallpaper", Toast.LENGTH_LONG).show(); 

    Intent intent = new Intent(Intent.ACTION_ATTACH_DATA); 
    intent.setDataAndType(getImageUri(this,bitmaptwo), "image/*"); 
    intent.putExtra("Bitmap", "image/*"); 
    startActivity(intent); 

    } 

public Uri getImageUri(Context inContext, Bitmap inImage) { 
ByteArrayOutputStream bytes = new ByteArrayOutputStream(); 
inImage.compress(Bitmap.CompressFormat.JPEG, 0, bytes); 
String path = MediaStore.Images.Media.insertImage(inContext.getContentResolver(), inImage, "Title", null); 
return Uri.parse(path); 
} 

答えて

0

試してみて、ベクトルに壁紙を変換するベクトルhttps://developer.android.com/studio/write/vector-asset-studio.html答えるため

+0

おかげについてこのうち、しかしSvgsはアイコンとリソースフォルダにあるイメージのために働くでしょう 私が使用しているのは、ビットマップファイルである限り、解像度が –

+0

の私のサーバ上のイメージです。それは変換する必要があります – user3875913