Move support for settings menu to UnifiedEmail
Move the base settings menu to UnifiedEmail Bug: 9393150 Change-Id: Ifa69125d84802a0d7dd2275e4704ec7a4d1fb2f1
This commit is contained in:
parent
380985add9
commit
525e8ad321
|
@ -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>
|
|
||||||
|
|
|
@ -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>
|
|
|
@ -90,8 +90,6 @@
|
||||||
<!-- Menu item -->
|
<!-- Menu item -->
|
||||||
<string name="refresh_action">Refresh</string>
|
<string name="refresh_action">Refresh</string>
|
||||||
<!-- Menu item -->
|
<!-- Menu item -->
|
||||||
<string name="add_account_action">Add account</string>
|
|
||||||
<!-- Menu item -->
|
|
||||||
<string name="compose_action">Compose</string>
|
<string name="compose_action">Compose</string>
|
||||||
<!-- Menu item/button name -->
|
<!-- Menu item/button name -->
|
||||||
<string name="search_action">Search</string>
|
<string name="search_action">Search</string>
|
||||||
|
|
|
@ -271,7 +271,7 @@ public class AccountSettings extends PreferenceActivity implements FeedbackEnabl
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
super.onCreateOptionsMenu(menu);
|
super.onCreateOptionsMenu(menu);
|
||||||
getMenuInflater().inflate(R.menu.account_settings_add_account_option, menu);
|
getMenuInflater().inflate(R.menu.settings_menu, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ import android.provider.CalendarContract;
|
||||||
import android.provider.ContactsContract;
|
import android.provider.ContactsContract;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuInflater;
|
||||||
|
|
||||||
import com.android.email.R;
|
import com.android.email.R;
|
||||||
import com.android.email.SecurityPolicy;
|
import com.android.email.SecurityPolicy;
|
||||||
|
@ -410,6 +412,12 @@ public class AccountSettingsFragment extends EmailPreferenceFragment
|
||||||
super.onSaveInstanceState(outState);
|
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
|
* Activity provides callbacks here
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue