2016-10-07 9 views
1

Android Asset Studioでアイコンをロードしました。
それはMDPI、hdpix hdpi、xxhdpiとxxxhdpiアイコン
私を作成したが、アイコンがピクセル化し、ぼやけている:(
ここでコード:
Androidアイコンがピクセル化/ぼんやりしています

<?xml version="1.0" encoding="utf-8"?> 
<android.support.constraint.ConstraintLayout 
    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="wrap_content"> 

    <ImageView 
     android:id="@+id/img" 
     android:layout_width="144dp" 
     android:layout_height="144dp" 
     android:layout_margin="16dp" 
     android:src="@mipmap/ic_launcher" 
     app:layout_constraintBottom_toBottomOf="parent" 
     app:layout_constraintLeft_toLeftOf="parent" 
     app:layout_constraintRight_toRightOf="parent" 
     app:layout_constraintTop_toTopOf="parent"/> 

</android.support.constraint.ConstraintLayout> 
+0

Androidスタジオの画像資産ウィザードは、側面に144dpの画像を作成するようには設計されていません。そのウィザードは、アクションバーアイコン、通知アイコンなどのためのもので、そのすべてがはるかに小さくなっています。 – CommonsWare

+0

が、144x144のサイトで1つのアイコンが作成されました。どうすれば使えますか? –

答えて

0

をベクタ形式を試してみてください

これ。 .SVGとしてグラフィックを保存してから、Android Vector Drawable .XMLファイル(コンバーターの場合はGoogle「SVG to Vector Convertor」)に変換することができます。

生成された.XML Android Vector Drawableをres\drawableフォルダに入れます。

+0

ツールはグラデーションを持つベクターファイルでは機能しません。あなたは別の方法を知っていますか? –

+0

Vector Drawableはグラデーションをサポートしていないため、適切なソリューションではありません。 – SimonH

関連する問題