我的操作栏图标在模拟器和手机中看起来模糊不清。
请帮助我从上个月开始坚持这个..
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
openBottomSheet();
return true;
}
else if(id==R.id.action_stories_settings){
Settings();
}
return super.onOptionsItemSelected(item);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.appsfreax.humansofindia.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.appsfreax.humansofindia.permission.C2D_MESSAGE" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:name=".app.ParseApplication"
android:largeHeap="true"
android:allowBackup="true"
android:icon="@drawable/humans_india_icon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name"
android:clearTaskOnLaunch="true"
android:theme="@style/CustomActionBarTheme"
>
</activity>
<activity
android:name=".activity.Submit_story"
android:label="@string/title_activity_sumit_story" >
</activity>
<activity
android:name=".activity.Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.All_stories"
android:label="@string/app_name" >
</activity>
<activity
android:name=".activity.Errorview"
android:label="@string/app_name" >
</activity>
<service android:name="com.parse.PushService" />
<receiver
android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<!--
IMPORTANT: If you change the package name of this sample app,
change "com.parse.tutorials.pushnotifications" in the lines
below to match the new package name.
-->
<category android:name="com.appsfreax.humansofindia" />
</intent-filter>
</receiver>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.appsfreax.humansofindia"
minSdkVersion 13
targetSdkVersion 20
versionCode 102
versionName "1.0.2"
}
<menu 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"
tools:context=".MainActivity">
<item
android:id="@+id/action_settings"
android:icon="@drawable/t"
android:orderInCategory="100"
android:title="Botttom menu"
app:showAsAction="always"
/>
<item
android:id="@+id/action_stories_settings"
android:title="@string/action_settings"
android:icon="@drawable/settings_icon"
android:orderInCategory="200"
app:showAsAction="always" />
https://drive.google.com/file/d/0B_2xbmgzcrhmcHk2QnR4V3lsWWs/view?usp=sharing