到目前为止,这只发生在使用 Android 4.0.3的HTC OneX上
我在androID共享菜单中有两个共享菜单项.
当用户从AndroID库共享图像时,我的应用程序显示两个
图标,以便用户可以轻松访问我的应用程序的两个不同部分.
见图.
这在API v8中工作正常,但在真实设备上的API v15中,缺少其中一个. API v15模拟器没问题!
在我的AndroIDManifest.xml中,这两个Activity在共享菜单中设置了一个图标.
- ActivityMainLauncher - ActivityQuickLauncher
图像是hdpi,mdpi,ldpi文件夹中的位置.
大小为72,48,36像素,它们是PNG图像.
对于所有三个图像,Photoshop显示相同的分辨率72,009.
UPDATE
为96pix添加了drawable-xhdpi文件夹,但我仍然只有一个项目:“SPRiID”
这种行为很奇怪,我不知道从哪里开始调试.
我认为我监督的API v15中有一些新内容?
模拟器API v15的图像正确显示了两个选项.
这是我的AndroIDManifest.xml文件.
<?xml version="1.0" enCoding="utf-8"?><manifest xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:installLocation="internalOnly" package="com.carlsberg.dumbo" androID:versionCode="12" androID:versionname="0.83" ><!-- androID:versionCode as the basis for IDentifying the application internally and handling updates,--><!-- androID:versionname to users as the application's version --><permission androID:name="com.carlsberg.dumbo.permission.C2D_MESSAGE" androID:protectionLevel="signature" /><supports-screens androID:anyDensity="true" /><uses-permission androID:name="com.carlsberg.dumbo.permission.C2D_MESSAGE" /><!-- <uses-permission androID:name="androID.permission.SET_DEBUG_APP"></uses-permission> --><uses-permission androID:name="com.Google.androID.c2dm.permission.RECEIVE" /><uses-permission androID:name="androID.permission.GET_ACCOUNTS" /><uses-permission androID:name="androID.permission.USE_CREDENTIALS" /><uses-permission androID:name="androID.permission.INTERNET" /><uses-permission androID:name="androID.permission.WAKE_LOCK" /><uses-permission androID:name="androID.permission.WRITE_EXTERNAL_STORAGE" /><uses-permission androID:name="androID.permission.VIBRATE" /><uses-permission androID:name="androID.permission.RECEIVE_BOOT_COMPLETED" /><uses-permission androID:name="androID.permission.ACCESS_NETWORK_STATE" /><uses-permission androID:name="androID.permission.ACCESS_FINE_LOCATION" ></uses-permission><uses-sdk androID:minSdkVersion="8" /><application androID:icon="@drawable/launcher_gallery" androID:label="@string/string_app_name" > <activity androID:name=".ActivityMainLauncher" androID:configChanges="keyboardHIDden|orIEntation" androID:icon="@drawable/launcher_gallery" androID:label="@string/string_app_name" androID:launchMode="singletop" > <intent-filter> <action androID:name="androID.intent.action.SEND" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> <intent-filter> <action androID:name="androID.intent.action.SEND_MulTIPLE" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> <intent-filter> <action androID:name="androID.intent.action.MAIN" /> <category androID:name="androID.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity-alias androID:name="com.androID.internal.app.ResolverActivity" androID:exported="true" androID:targetActivity=".ActivityMainLauncher" /> <activity androID:name=".gallery.Activitygallery" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" androID:configChanges="orIEntation|keyboardHIDden" androID:icon="@drawable/launcher_gallery" androID:label="@string/string_app_name_gallery" androID:launchMode="singletop" androID:taskAffinity="com.carlsberg.dumbo.galleryActivity" > <intent-filter> <action androID:name="androID.intent.action.MAIN" /> <category androID:name="androID.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity androID:name=".ActivityQuickLauncher" androID:configChanges="keyboardHIDden|orIEntation" androID:icon="@drawable/launcher_gallery" androID:label="@string/string_app_name_quick_launcher" androID:launchMode="singletop" > <intent-filter> <action androID:name="androID.intent.action.SEND" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> <intent-filter> <action androID:name="androID.intent.action.SEND_MulTIPLE" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> </activity> <activity androID:name=".send.ActivitySend" androID:configChanges="orIEntation|keyboardHIDden" androID:launchMode="singleTask" androID:screenorIEntation="portrait" > </activity> <activity androID:name=".ActivityRemoveFrIEnd" androID:configChanges="keyboardHIDden|orIEntation" androID:label="@string/string_app_name" androID:theme="@androID:style/theme.Dialog" > </activity> <activity androID:name="com.carlsberg.dumbo.history.tabactivityHistoryLauncher" androID:label="@string/string_app_name" androID:launchMode="singleTask" > </activity> <activity androID:name="com.carlsberg.dumbo.history.ActivityTabGroup1" > </activity> <activity androID:name="com.carlsberg.dumbo.history.ActivityTabGroup2" > </activity> <activity androID:name="com.carlsberg.dumbo.history.ActivityHistoryOutgoing" > </activity> <activity androID:name="com.carlsberg.dumbo.history.ActivityHistoryIncoming" > </activity> <activity androID:name=".activitylogin" androID:configChanges="keyboardHIDden|orIEntation" androID:label="@string/string_app_name" androID:theme="@androID:style/theme.Dialog" > </activity> <activity androID:name=".ActivityAddFrIEnd" androID:configChanges="keyboardHIDden|orIEntation" androID:label="@string/string_app_name" androID:theme="@androID:style/theme.Dialog" > </activity> <activity androID:name=".ActivityAcceptFrIEnd" androID:configChanges="keyboardHIDden|orIEntation" androID:label="@string/string_app_name" androID:theme="@androID:style/theme.Dialog" > </activity> <activity androID:name=".Preferences" > </activity> <activity androID:name=".send.tabactivityActivityHelpSend" androID:launchMode="singleTask" androID:screenorIEntation="portrait" > </activity> <service androID:name=".IntentServiceSendfiles" androID:label="@string/string_sendfileService" > </service> <service androID:name=".IntentServiceGetfilesFromPc" androID:label="@string/string_getfileService" > </service> <service androID:name=".IntentServiceGetfiles" androID:label="@string/string_getfileService" > </service> <service androID:name=".ServiceBootCompleated" androID:label="@string/string_batchtester" > </service> <service androID:name=".IntentServiceGetFrIEndList" androID:label="@string/string_Listupdater" > </service> <service androID:name=".IntentServiceUpdateFrIEndList" androID:label="@string/string_Listupdater" > </service> <service androID:name=".C2DMReceiver" /> <receiver androID:name="com.Google.androID.c2dm.C2DMbroadcastReceiver" androID:permission="com.Google.androID.c2dm.permission.SEND" > <intent-filter> <!-- Receive the actual message --> <action androID:name="com.Google.androID.c2dm.intent.RECEIVE" /> <category androID:name="com.carlsberg.dumbo" /> </intent-filter> <intent-filter> <!-- Receive the registration ID --> <action androID:name="com.Google.androID.c2dm.intent.REGISTRATION" /> <category androID:name="com.carlsberg.dumbo" /> </intent-filter> </receiver> <receiver androID:name="com.Google.androID.c2dm.C2DMbroadcastReceiver" > <!-- Handle retry events --> <intent-filter> <action androID:name="com.Google.androID.c2dm.intent.RETRY" /> <category androID:name="com.carlsberg.dumbo" /> </intent-filter> </receiver> <receiver androID:name=".AlarmReceiver" > </receiver> <receiver androID:name=".mybroadcastReceiver" > <intent-filter> <action androID:name="androID.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> <provIDer androID:name=".contentprovIDer.UserContentProvIDer" androID:authoritIEs="com.carlsberg.dumbo.contentprovIDer" > </provIDer></application>解决方法 我刚刚复制了清单的相关部分并创建了一个测试项目:
<manifest xmlns:androID="http://schemas.androID.com/apk/res/androID" package="com.example.test" androID:versionCode="1" androID:versionname="1.0" > <uses-sdk androID:minSdkVersion="8" androID:targetSdkVersion="15" /> <application androID:icon="@drawable/ic_launcher" androID:label="@string/app_name" androID:theme="@style/Apptheme" > <activity androID:name=".MainActivity" androID:label="@string/Title_activity_main" > <intent-filter> <action androID:name="androID.intent.action.MAIN" /> <category androID:name="androID.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity androID:name=".ActivityMainLauncher" androID:configChanges="keyboardHIDden|orIEntation" androID:icon="@drawable/ic_launcher" androID:label="@string/string_app_name" androID:launchMode="singletop" > <intent-filter> <action androID:name="androID.intent.action.SEND" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> <intent-filter> <action androID:name="androID.intent.action.SEND_MulTIPLE" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> <intent-filter> <action androID:name="androID.intent.action.MAIN" /> <category androID:name="androID.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity androID:name=".ActivityQuickLauncher" androID:configChanges="keyboardHIDden|orIEntation" androID:icon="@drawable/ic_launcher" androID:label="@string/string_app_name_quick_launcher" androID:launchMode="singletop" > <intent-filter> <action androID:name="androID.intent.action.SEND" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> <intent-filter> <action androID:name="androID.intent.action.SEND_MulTIPLE" /> <category androID:name="androID.intent.category.DEFAulT" /> <data androID:mimeType="image/*" /> <data androID:mimeType="vIDeo/*" /> <data androID:mimeType="audio/*" /> <data androID:mimeType="text/*" /> <data androID:mimeType="application/*" /> </intent-filter> </activity> </application></manifest>
简单的活动实施:
public class ActivityQuickLauncher extends Activity { @OverrIDe protected voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Toast.makeText(this,getClass().getname(),Toast.LENGTH_LONG).show(); }}public class ActivityMainLauncher extends Activity { @OverrIDe protected voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Toast.makeText(this,Toast.LENGTH_LONG).show(); }}
它有效:
AndroID 4.1.1(galaxy Nexus)和AndroID 4.0.3(Archos G9 A70).
总结以上是内存溢出为你收集整理的为什么Android 4.0.3 PHONE HTC OneX中的“分享到”菜单项已经消失全部内容,希望文章能够帮你解决为什么Android 4.0.3 PHONE HTC OneX中的“分享到”菜单项已经消失所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)