Move support for settings menu to UnifiedEmail

Move the base settings menu to UnifiedEmail

Bug: 9393150
Change-Id: Ifa69125d84802a0d7dd2275e4704ec7a4d1fb2f1
This commit is contained in:
Paul Westbrook 2013-06-12 23:40:59 -07:00
parent 380985add9
commit 525e8ad321
5 changed files with 9 additions and 50 deletions

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- A menu for Account Settings to provide the "Add Account" option -->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/add_new_account"
android:title="@string/add_account_action"
android:showAsAction="ifRoom|withText"
/>
</menu>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- A menu for Account Settings to provide the "Add Account" option -->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/add_new_account"
android:title="@string/add_account_action"
android:showAsAction="always"
/>
</menu>

View File

@ -90,8 +90,6 @@
<!-- Menu item -->
<string name="refresh_action">Refresh</string>
<!-- Menu item -->
<string name="add_account_action">Add account</string>
<!-- Menu item -->
<string name="compose_action">Compose</string>
<!-- Menu item/button name -->
<string name="search_action">Search</string>

View File

@ -271,7 +271,7 @@ public class AccountSettings extends PreferenceActivity implements FeedbackEnabl
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.account_settings_add_account_option, menu);
getMenuInflater().inflate(R.menu.settings_menu, menu);
return true;
}

View File

@ -39,6 +39,8 @@ import android.provider.CalendarContract;
import android.provider.ContactsContract;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuInflater;
import com.android.email.R;
import com.android.email.SecurityPolicy;
@ -410,6 +412,12 @@ public class AccountSettingsFragment extends EmailPreferenceFragment
super.onSaveInstanceState(outState);
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu.clear();
inflater.inflate(R.menu.settings_fragment_menu, menu);
}
/**
* Activity provides callbacks here
*/