应用程序图标不会在正在运行的应用程序中显示,但它在Android中的启动器中显示

时间:2017-10-05 10:28:14

标签: java android

我首先面对这个问题并且无法对它进行排序我需要你们帮助解决问题,以便更好地理解图片也附上

运行应用程序时,

fori mazdoor图标为空白 fori mazdoor icon is blank in running app

fori mazdoori图标显示启动器图标 fori mazdoori icon is showing launcher icon

我的android清单现在我的图标没有显示,我的图标也放在drawable文件夹中抱歉弱英语请帮我找一个解决方案

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.forimazdoori.Fmuserapps"
    android:versionCode="14"
    android:versionName="2.1.4">

    <uses-sdk
       android:minSdkVersion="14"
       android:targetSdkVersion="23" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission 
          android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission 
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" 
    />

    <!-- Declaration for writing/reading on SD card -->
    <uses-permission 
    android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <!-- Declaration for camera access -->
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <!--
     The ACCESS_COARSE/FINE_LOCATION permissions are not required to 
     use
     Google Maps Android API v2, but you must specify either coarse or 
     fine
     location permissions for the 'MyLocation' functionality.
    -->
    <uses-permission 
    android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission 
    android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <application
    android:allowBackup="false"
    android:icon="@drawable/icon_app"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:largeHeap="true"
    android:theme="@style/AppTheme"
    >
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

    <provider
        android:name="com.facebook.FacebookContentProvider"

    android:authorities=
    "com.facebook.app.FacebookContentProvider759142140921307"
        android:exported="true" />


    <activity android:name=".SplashScreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" 
       />
        </intent-filter>
    </activity>

    <activity
        android:name=".LoginActivity"
        android:exported="false" />


    <activity
        android:name=".SearchActivity"
        android:exported="false"
        android:windowSoftInputMode="stateHidden">

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        />
    </intent-filter>
    </activity>

    <activity
        android:name=".SearchResultActivity"
        android:exported="false" />
    <activity
        android:name=".WorkerProfileActivity"
        android:exported="false" />

    <activity
        android:name=".RegistrationActivity"
        android:exported="false"
        android:windowSoftInputMode="stateAlwaysVisible" />
    <activity
        android:name="com.facebook.FacebookActivity"


    android:configChanges=
    "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:exported="false"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar" />
    <activity
        android:name=".UserProfileActivity"
        android:exported="false" />
    <activity
        android:name=".VideoViewActivity"
        android:exported="false" />
    <activity
        android:name=".FavoritesActivity"
        android:exported="false" />
    <activity
        android:name=".CommentsActivity"
        android:exported="false" />
    <!--
         The API key for Google Maps-based APIs is defined as a string 
    resource.
         (See the file "res/values/google_maps_api.xml").
         Note that the API key is linked to the encryption key used to 
    sign the APK.
         You need a different API key for each encryption key, 
    including the release key that is used to
         sign the APK for publishing.
         You can define the keys for the debug and release targets in 
    src/debug/ and src/release/.
    -->
    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/google_maps_key" />

    <activity
        android:name=".MapActivity"
        android:label="@string/title_activity_map" />
    <activity android:name=".RegisterAsWorkerActivity" />

    <service
        android:name=".utils.SyncProvider"
        android:exported="false" />

    <activity
        android:name=".AddFriendActivity"
        android:exported="false" />
    <activity
        android:name=".ValidatePhoneActivity"
        android:exported="false" />
    <activity android:name=".PendingReviewActivity" />
    <activity
        android:name=".PremiumActivity"
        android:label="@string/title_activity_premium"
        android:parentActivityName=".SearchActivity"
        android:exported="false"
        >
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.forimazdoori.Fmuserapps.SearchActivity" 
        />
       </activity>
       </application>

       </manifest>

1 个答案:

答案 0 :(得分:0)

来自Android开发人员指南

几乎每个应用程序都应该有不同的可绘制资源用于不同的屏幕密度,因为几乎每个应用程序都有一个启动器图标,并且该图标应该在所有屏幕密度上看起来都很好。同样,如果在应用程序中包含其他位图drawable(例如应用程序中的菜单图标或其他图形),则应提供替代版本或每个版本,以适应不同的密度。

要为不同密度创建替代位图可绘制,您应遵循六个广义密度之间的3:4:6:8:12:16缩放比例。例如,如果您有一个位图可绘制的中等密度屏幕的48x48像素,则所有不同的大小应为:

  • 36x36(0.75x)用于低密度
  • 中等密度
  • 的48x48(1.0x基线)
  • 72x72(1.5x)高密度
  • 96x96(2.0x),用于超高密度
  • 144x144(3.0x),用于额外超高密度
  • 192x192(4.0x),用于额外超高密度