smemamian
دوشنبه 16 دی 1392, 17:57 عصر
سلام دوستان
خواستم چک کنم ببینم آیا تصاویر به درستی انتخاب میشه یا نه !
برای این کار اومدم 3 آیکون مختلف با سایزهای پیشنهادی با فرمت png ایجاد کردم(فایل های عکس همنام هستند) :
114960
96*96 یعنی xhigh :
114956
72*72 یعنی high :
114954
48*48 یعنی medium :
114955
یه AVD ساختم با سایز 854*480 که یعنی hdpi که باید تصویر شماره 2 رو انتخاب کنه ولی شماره 3 رو انتخاب می کنه یعنی medium !!!
114957
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ex31"
android:versionCode="1"
android:versionName="1.0" >
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.ex31.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/one"
/>
</RelativeLayout>
خواستم چک کنم ببینم آیا تصاویر به درستی انتخاب میشه یا نه !
برای این کار اومدم 3 آیکون مختلف با سایزهای پیشنهادی با فرمت png ایجاد کردم(فایل های عکس همنام هستند) :
114960
96*96 یعنی xhigh :
114956
72*72 یعنی high :
114954
48*48 یعنی medium :
114955
یه AVD ساختم با سایز 854*480 که یعنی hdpi که باید تصویر شماره 2 رو انتخاب کنه ولی شماره 3 رو انتخاب می کنه یعنی medium !!!
114957
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ex31"
android:versionCode="1"
android:versionName="1.0" >
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.ex31.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/one"
/>
</RelativeLayout>