started work on migrating to appcompat

This commit is contained in:
Daniel Gultsch 2018-02-16 12:06:05 +01:00
parent 454f68799e
commit 6e89427d5e
18 changed files with 142 additions and 130 deletions

View File

@ -1,7 +1,6 @@
package eu.siacs.conversations.ui; package eu.siacs.conversations.ui;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.FragmentTransaction; import android.app.FragmentTransaction;
import android.app.PendingIntent; import android.app.PendingIntent;
@ -20,6 +19,7 @@ import android.provider.MediaStore;
import android.provider.Settings; import android.provider.Settings;
import android.support.v4.widget.SlidingPaneLayout; import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener; import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
import android.support.v7.app.ActionBar;
import android.util.Log; import android.util.Log;
import android.util.Pair; import android.util.Pair;
import android.view.Gravity; import android.view.Gravity;
@ -214,7 +214,7 @@ public class ConversationActivity extends XmppActivity
this.listView.setAdapter(this.listAdapter); this.listView.setAdapter(this.listAdapter);
this.listView.setSwipeDirection(EnhancedListView.SwipeDirection.END); this.listView.setSwipeDirection(EnhancedListView.SwipeDirection.END);
final ActionBar actionBar = getActionBar(); final ActionBar actionBar = getSupportActionBar();
if (actionBar != null) { if (actionBar != null) {
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE); actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE);
} }
@ -359,7 +359,7 @@ public class ConversationActivity extends XmppActivity
} }
private void updateActionBarTitle(boolean titleShouldBeName) { private void updateActionBarTitle(boolean titleShouldBeName) {
final ActionBar ab = getActionBar(); final ActionBar ab = getSupportActionBar();
final Conversation conversation = getSelectedConversation(); final Conversation conversation = getSelectedConversation();
if (ab != null) { if (ab != null) {
if (titleShouldBeName && conversation != null) { if (titleShouldBeName && conversation != null) {

View File

@ -2,15 +2,8 @@ package eu.siacs.conversations.ui;
import android.Manifest; import android.Manifest;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.ActionBar.TabListener;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.app.ListFragment;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
@ -21,8 +14,14 @@ import android.content.pm.PackageManager;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.ListFragment;
import android.support.v4.view.MenuItemCompat;
import android.support.v4.view.PagerAdapter; import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.text.Editable; import android.text.Editable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
@ -78,8 +77,8 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
public int conference_context_id; public int conference_context_id;
public int contact_context_id; public int contact_context_id;
private Tab mContactsTab; private ActionBar.Tab mContactsTab;
private Tab mConferencesTab; private ActionBar.Tab mConferencesTab;
private ViewPager mViewPager; private ViewPager mViewPager;
private ListPagerAdapter mListPagerAdapter; private ListPagerAdapter mListPagerAdapter;
private List<ListItem> contacts = new ArrayList<>(); private List<ListItem> contacts = new ArrayList<>();
@ -118,29 +117,30 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
}; };
private boolean mHideOfflineContacts = false; private boolean mHideOfflineContacts = false;
private TabListener mTabListener = new TabListener() { private ActionBar.TabListener mTabListener = new ActionBar.TabListener() {
@Override @Override
public void onTabUnselected(Tab tab, FragmentTransaction ft) { public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
return; return;
} }
@Override @Override
public void onTabSelected(Tab tab, FragmentTransaction ft) { public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
mViewPager.setCurrentItem(tab.getPosition()); mViewPager.setCurrentItem(tab.getPosition());
onTabChanged(); onTabChanged();
} }
@Override @Override
public void onTabReselected(Tab tab, FragmentTransaction ft) { public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
return; return;
} }
}; };
private ViewPager.SimpleOnPageChangeListener mOnPageChangeListener = new ViewPager.SimpleOnPageChangeListener() { private ViewPager.SimpleOnPageChangeListener mOnPageChangeListener = new ViewPager.SimpleOnPageChangeListener() {
@Override @Override
public void onPageSelected(int position) { public void onPageSelected(int position) {
if (getActionBar() != null) { ActionBar actionBar = getSupportActionBar();
getActionBar().setSelectedNavigationItem(position); if (actionBar != null) {
actionBar.setSelectedNavigationItem(position);
} }
onTabChanged(); onTabChanged();
} }
@ -165,7 +165,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
private TextView.OnEditorActionListener mSearchDone = new TextView.OnEditorActionListener() { private TextView.OnEditorActionListener mSearchDone = new TextView.OnEditorActionListener() {
@Override @Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
int pos = getActionBar().getSelectedNavigationIndex(); int pos = getSupportActionBar().getSelectedNavigationIndex();
if (pos == 0) { if (pos == 0) {
if (contacts.size() == 1) { if (contacts.size() == 1) {
openConversationForContact((Contact) contacts.get(0)); openConversationForContact((Contact) contacts.get(0));
@ -240,18 +240,16 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
new EmojiService(this).init(); new EmojiService(this).init();
setContentView(R.layout.activity_start_conversation); setContentView(R.layout.activity_start_conversation);
mViewPager = findViewById(R.id.start_conversation_view_pager); mViewPager = findViewById(R.id.start_conversation_view_pager);
ActionBar actionBar = getActionBar(); ActionBar actionBar = getSupportActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
mContactsTab = actionBar.newTab().setText(R.string.contacts) mContactsTab = actionBar.newTab().setText(R.string.contacts).setTabListener(mTabListener);
.setTabListener(mTabListener); mConferencesTab = actionBar.newTab().setText(R.string.conferences).setTabListener(mTabListener);
mConferencesTab = actionBar.newTab().setText(R.string.conferences)
.setTabListener(mTabListener);
actionBar.addTab(mContactsTab); actionBar.addTab(mContactsTab);
actionBar.addTab(mConferencesTab); actionBar.addTab(mConferencesTab);
mViewPager.setOnPageChangeListener(mOnPageChangeListener); mViewPager.setOnPageChangeListener(mOnPageChangeListener);
mListPagerAdapter = new ListPagerAdapter(getFragmentManager()); mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
mViewPager.setAdapter(mListPagerAdapter); mViewPager.setAdapter(mListPagerAdapter);
mConferenceAdapter = new ListItemAdapter(this, conferences); mConferenceAdapter = new ListItemAdapter(this, conferences);
@ -598,18 +596,17 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
menuHideOffline.setChecked(this.mHideOfflineContacts); menuHideOffline.setChecked(this.mHideOfflineContacts);
mMenuSearchView = menu.findItem(R.id.action_search); mMenuSearchView = menu.findItem(R.id.action_search);
mMenuSearchView.setOnActionExpandListener(mOnActionExpandListener); mMenuSearchView.setOnActionExpandListener(mOnActionExpandListener);
View mSearchView = mMenuSearchView.getActionView(); View mSearchView = MenuItemCompat.getActionView(mMenuSearchView);
mSearchEditText = (EditText) mSearchView mSearchEditText = (EditText) mSearchView.findViewById(R.id.search_field);
.findViewById(R.id.search_field);
mSearchEditText.addTextChangedListener(mSearchTextWatcher); mSearchEditText.addTextChangedListener(mSearchTextWatcher);
mSearchEditText.setOnEditorActionListener(mSearchDone); mSearchEditText.setOnEditorActionListener(mSearchDone);
if (getActionBar().getSelectedNavigationIndex() == 0) { if (getSupportActionBar().getSelectedNavigationIndex() == 0) {
menuCreateConference.setVisible(false); menuCreateConference.setVisible(false);
} else { } else {
menuCreateContact.setVisible(false); menuCreateContact.setVisible(false);
} }
if (mInitialJid != null) { if (mInitialJid != null) {
mMenuSearchView.expandActionView(); MenuItemCompat.expandActionView(mMenuSearchView);
mSearchEditText.append(mInitialJid); mSearchEditText.append(mInitialJid);
filter(mInitialJid); filter(mInitialJid);
} }
@ -769,7 +766,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
} }
final Intent intent = getIntent(); final Intent intent = getIntent();
final ActionBar ab = getActionBar(); final ActionBar ab = getSupportActionBar();
boolean init = intent != null && intent.getBooleanExtra("init", false); boolean init = intent != null && intent.getBooleanExtra("init", false);
boolean noConversations = xmppConnectionService.getConversations().size() == 0; boolean noConversations = xmppConnectionService.getConversations().size() == 0;
if ((init || noConversations) && ab != null) { if ((init || noConversations) && ab != null) {

View File

@ -38,6 +38,7 @@ import android.os.PowerManager;
import android.os.SystemClock; import android.os.SystemClock;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.text.InputType; import android.text.InputType;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.util.Pair; import android.util.Pair;
@ -80,7 +81,7 @@ import eu.siacs.conversations.xmpp.OnUpdateBlocklist;
import eu.siacs.conversations.xmpp.jid.InvalidJidException; import eu.siacs.conversations.xmpp.jid.InvalidJidException;
import eu.siacs.conversations.xmpp.jid.Jid; import eu.siacs.conversations.xmpp.jid.Jid;
public abstract class XmppActivity extends Activity { public abstract class XmppActivity extends AppCompatActivity {
public static final String EXTRA_ACCOUNT = "account"; public static final String EXTRA_ACCOUNT = "account";
protected static final int REQUEST_ANNOUNCE_PGP = 0x0101; protected static final int REQUEST_ANNOUNCE_PGP = 0x0101;

View File

@ -1,17 +1,18 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_account_details" android:id="@+id/action_account_details"
android:title="@string/account_details" android:title="@string/account_details"
android:showAsAction="always" app:showAsAction="always"
android:icon="@drawable/ic_account_box_white_24dp"/> android:icon="@drawable/ic_account_box_white_24dp"/>
<item <item
android:id="@+id/action_accounts" android:id="@+id/action_accounts"
android:orderInCategory="90" android:orderInCategory="90"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_accounts"/> android:title="@string/action_accounts"/>
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings"/> android:title="@string/action_settings"/>
</menu> </menu>

View File

@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:actionLayout="@layout/actionview_search" android:actionLayout="@layout/actionview_search"
android:icon="?attr/icon_search" android:icon="?attr/icon_search"
android:showAsAction="collapseActionView|always" app:showAsAction="collapseActionView|always"
android:title="@string/search"/> android:title="@string/search"/>
<item <item
android:id="@+id/action_create_contact" android:id="@+id/action_create_contact"
android:icon="?attr/icon_add_person" android:icon="?attr/icon_add_person"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/create_contact" android:title="@string/create_contact"
android:visible="false"/> android:visible="false"/>
<item <item
android:id="@+id/action_block_jid" android:id="@+id/action_block_jid"
android:icon="?attr/icon_add_person" android:icon="?attr/icon_add_person"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/block_jabber_id" android:title="@string/block_jabber_id"
android:visible="false"/> android:visible="false"/>
</menu> </menu>

View File

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_edit_contact" android:id="@+id/action_edit_contact"
android:icon="?attr/icon_edit" android:icon="?attr/icon_edit"
android:orderInCategory="10" android:orderInCategory="10"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/action_edit_contact"/> android:title="@string/action_edit_contact"/>
<item <item
android:id="@+id/action_share" android:id="@+id/action_share"
android:icon="?attr/icon_share" android:icon="?attr/icon_share"
android:orderInCategory="15" android:orderInCategory="15"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/share_uri_with"> android:title="@string/share_uri_with">
<menu> <menu>
<item <item
@ -29,30 +30,30 @@
<item <item
android:id="@+id/action_delete_contact" android:id="@+id/action_delete_contact"
android:orderInCategory="10" android:orderInCategory="10"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_delete_contact"/> android:title="@string/action_delete_contact"/>
<item <item
android:id="@+id/action_block" android:id="@+id/action_block"
android:orderInCategory="72" android:orderInCategory="72"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_block_contact"/> android:title="@string/action_block_contact"/>
<item <item
android:id="@+id/action_unblock" android:id="@+id/action_unblock"
android:orderInCategory="73" android:orderInCategory="73"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_unblock_contact"/> android:title="@string/action_unblock_contact"/>
<item <item
android:id="@+id/action_accounts" android:id="@+id/action_accounts"
android:orderInCategory="90" android:orderInCategory="90"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_accounts"/> android:title="@string/action_accounts"/>
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings"/> android:title="@string/action_settings"/>
</menu> </menu>

View File

@ -1,70 +1,71 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_add" android:id="@+id/action_add"
android:icon="?attr/icon_new" android:icon="?attr/icon_new"
android:orderInCategory="10" android:orderInCategory="10"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/action_add"/> android:title="@string/action_add"/>
<item <item
android:id="@+id/action_security" android:id="@+id/action_security"
android:icon="?attr/icon_not_secure" android:icon="?attr/icon_not_secure"
android:orderInCategory="20" android:orderInCategory="20"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/action_secure"/> android:title="@string/action_secure"/>
<item <item
android:id="@+id/action_attach_file" android:id="@+id/action_attach_file"
android:icon="?attr/icon_new_attachment" android:icon="?attr/icon_new_attachment"
android:orderInCategory="30" android:orderInCategory="30"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/attach_file"/> android:title="@string/attach_file"/>
<item <item
android:id="@+id/action_contact_details" android:id="@+id/action_contact_details"
android:orderInCategory="40" android:orderInCategory="40"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_contact_details"/> android:title="@string/action_contact_details"/>
<item <item
android:id="@+id/action_muc_details" android:id="@+id/action_muc_details"
android:icon="?attr/icon_group" android:icon="?attr/icon_group"
android:orderInCategory="40" android:orderInCategory="40"
android:showAsAction="ifRoom" app:showAsAction="ifRoom"
android:title="@string/action_muc_details"/> android:title="@string/action_muc_details"/>
<item <item
android:id="@+id/action_invite" android:id="@+id/action_invite"
android:orderInCategory="45" android:orderInCategory="45"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/invite_contact"/> android:title="@string/invite_contact"/>
<item <item
android:id="@+id/action_clear_history" android:id="@+id/action_clear_history"
android:orderInCategory="50" android:orderInCategory="50"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_clear_history"/> android:title="@string/action_clear_history"/>
<item <item
android:id="@+id/action_archive" android:id="@+id/action_archive"
android:orderInCategory="60" android:orderInCategory="60"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_end_conversation"/> android:title="@string/action_end_conversation"/>
<item <item
android:id="@+id/action_mute" android:id="@+id/action_mute"
android:orderInCategory="70" android:orderInCategory="70"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/disable_notifications"/> android:title="@string/disable_notifications"/>
<item <item
android:id="@+id/action_unmute" android:id="@+id/action_unmute"
android:orderInCategory="71" android:orderInCategory="71"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/enable_notifications"/> android:title="@string/enable_notifications"/>
<item <item
android:id="@+id/action_accounts" android:id="@+id/action_accounts"
android:orderInCategory="90" android:orderInCategory="90"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_accounts"/> android:title="@string/action_accounts"/>
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings"/> android:title="@string/action_settings"/>
</menu> </menu>

View File

@ -1,9 +1,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_share" android:id="@+id/action_share"
android:icon="?attr/icon_share" android:icon="?attr/icon_share"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/share_uri_with"> android:title="@string/share_uri_with">
<menu> <menu>
<item <item
@ -24,17 +25,17 @@
<item <item
android:id="@+id/action_change_presence" android:id="@+id/action_change_presence"
android:icon="@drawable/ic_announcement_white_24dp" android:icon="@drawable/ic_announcement_white_24dp"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/change_presence"/> android:title="@string/change_presence"/>
<item <item
android:id="@+id/action_show_block_list" android:id="@+id/action_show_block_list"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/show_block_list"/> android:title="@string/show_block_list"/>
<item <item
android:id="@+id/action_renew_certificate" android:id="@+id/action_renew_certificate"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_renew_certificate" android:title="@string/action_renew_certificate"
android:visible="false"/> android:visible="false"/>
@ -42,7 +43,7 @@
android:id="@+id/action_server_info_show_more" android:id="@+id/action_server_info_show_more"
android:checkable="true" android:checkable="true"
android:checked="false" android:checked="false"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/server_info_show_more"/> android:title="@string/server_info_show_more"/>
<item <item
@ -51,12 +52,12 @@
<item <item
android:id="@+id/action_change_password_on_server" android:id="@+id/action_change_password_on_server"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/change_password"/> android:title="@string/change_password"/>
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings"/> android:title="@string/action_settings"/>
</menu> </menu>

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_add_account" android:id="@+id/action_add_account"
android:icon="?attr/icon_add_person" android:icon="?attr/icon_add_person"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/action_add_account"/> android:title="@string/action_add_account"/>
<item <item
android:id="@+id/action_add_account_with_cert" android:id="@+id/action_add_account_with_cert"
android:showAsAction="never" app:showAsAction="never"
android:icon="?attr/icon_add_person" android:icon="?attr/icon_add_person"
android:title="@string/action_add_account_with_certificate" android:title="@string/action_add_account_with_certificate"
android:visible="true"/> android:visible="true"/>
@ -21,7 +22,7 @@
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings"/> android:title="@string/action_settings"/>
</menu> </menu>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/mgmt_account_enable" android:id="@+id/mgmt_account_enable"
@ -15,7 +16,7 @@
android:title="@string/mgmt_account_publish_pgp"/> android:title="@string/mgmt_account_publish_pgp"/>
<item <item
android:id="@+id/mgmt_account_disable" android:id="@+id/mgmt_account_disable"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/mgmt_account_disable"/> android:title="@string/mgmt_account_disable"/>
<item <item
android:id="@+id/mgmt_account_delete" android:id="@+id/mgmt_account_delete"

View File

@ -1,18 +1,19 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_edit_subject" android:id="@+id/action_edit_subject"
android:icon="?attr/icon_edit" android:icon="?attr/icon_edit"
android:orderInCategory="10" android:orderInCategory="10"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/action_edit_subject"/> android:title="@string/action_edit_subject"/>
<item <item
android:id="@+id/action_share" android:id="@+id/action_share"
android:icon="?attr/icon_share" android:icon="?attr/icon_share"
android:orderInCategory="15" android:orderInCategory="15"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/share_uri_with"> android:title="@string/share_uri_with">
<menu> <menu>
<item <item
@ -30,29 +31,29 @@
<item <item
android:id="@+id/action_save_as_bookmark" android:id="@+id/action_save_as_bookmark"
android:orderInCategory="80" android:orderInCategory="80"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/save_as_bookmark"/> android:title="@string/save_as_bookmark"/>
<item <item
android:id="@+id/action_delete_bookmark" android:id="@+id/action_delete_bookmark"
android:orderInCategory="80" android:orderInCategory="80"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/delete_bookmark"/> android:title="@string/delete_bookmark"/>
<item <item
android:id="@+id/action_advanced_mode" android:id="@+id/action_advanced_mode"
android:checkable="true" android:checkable="true"
android:checked="false" android:checked="false"
android:orderInCategory="85" android:orderInCategory="85"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/advanced_mode"/> android:title="@string/advanced_mode"/>
<item <item
android:id="@+id/action_accounts" android:id="@+id/action_accounts"
android:orderInCategory="90" android:orderInCategory="90"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_accounts"/> android:title="@string/action_accounts"/>
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings"/> android:title="@string/action_settings"/>
</menu> </menu>

View File

@ -1,8 +1,9 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_crop_image" android:id="@+id/action_crop_image"
android:showAsAction="always" app:showAsAction="always"
android:icon="@drawable/ic_crop_white_24dp" android:icon="@drawable/ic_crop_white_24dp"
android:title="@string/select_image_and_crop"/> android:title="@string/select_image_and_crop"/>
</menu> </menu>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/selection_submit" android:id="@+id/selection_submit"
android:title="@string/invite_contact" android:title="@string/invite_contact"
android:showAsAction="always" /> app:showAsAction="always" />
</menu> </menu>

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" > <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_add" android:id="@+id/action_add"
android:icon="?attr/icon_new" android:icon="?attr/icon_new"
android:orderInCategory="10" android:orderInCategory="10"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/action_add"/> android:title="@string/action_add"/>
</menu> </menu>

View File

@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:actionLayout="@layout/actionview_search" app:actionLayout="@layout/actionview_search"
android:icon="?attr/icon_search" android:icon="?attr/icon_search"
android:showAsAction="collapseActionView|always" app:showAsAction="collapseActionView|always"
android:title="@string/search" /> android:title="@string/search" />
<item <item
android:id="@+id/action_create_contact" android:id="@+id/action_create_contact"
android:icon="?attr/icon_add_person" android:icon="?attr/icon_add_person"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/create_contact" /> android:title="@string/create_contact" />
<item <item
android:id="@+id/action_conference" android:id="@+id/action_conference"
android:icon="?attr/icon_add_group" android:icon="?attr/icon_add_group"
android:showAsAction="always" app:showAsAction="always"
android:title="@string/join_or_create_conference"> android:title="@string/join_or_create_conference">
<menu> <menu>
<item <item
@ -29,7 +30,7 @@
</item> </item>
<item <item
android:id="@+id/action_scan_qr_code" android:id="@+id/action_scan_qr_code"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/scan_qr_code" /> android:title="@string/scan_qr_code" />
<item <item
@ -37,17 +38,17 @@
android:checkable="true" android:checkable="true"
android:checked="false" android:checked="false"
android:orderInCategory="85" android:orderInCategory="85"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/hide_offline"/> android:title="@string/hide_offline"/>
<item <item
android:id="@+id/action_accounts" android:id="@+id/action_accounts"
android:orderInCategory="90" android:orderInCategory="90"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_accounts" /> android:title="@string/action_accounts" />
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings" /> android:title="@string/action_settings" />
</menu> </menu>

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_scan_qr_code" android:id="@+id/action_scan_qr_code"
android:title="@string/scan_qr_code" android:title="@string/scan_qr_code"
android:showAsAction="always" app:showAsAction="always"
android:icon="?attr/icon_scan_qr_code"/> android:icon="?attr/icon_scan_qr_code"/>
</menu> </menu>

View File

@ -1,19 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/action_show_qr_code" android:id="@+id/action_show_qr_code"
android:title="@string/show_qr_code" android:title="@string/show_qr_code"
android:showAsAction="never" /> app:showAsAction="never" />
<item <item
android:id="@+id/action_accounts" android:id="@+id/action_accounts"
android:orderInCategory="90" android:orderInCategory="90"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_accounts" /> android:title="@string/action_accounts" />
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:orderInCategory="100" android:orderInCategory="100"
android:showAsAction="never" app:showAsAction="never"
android:title="@string/action_settings" /> android:title="@string/action_settings" />
</menu> </menu>

View File

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="ConversationsTheme" parent="@android:style/Theme.Material.Light.DarkActionBar"> <style name="ConversationsTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:colorPrimary">@color/primary500</item> <item name="colorPrimary">@color/primary500</item>
<item name="android:colorPrimaryDark">@color/primary700</item> <item name="colorPrimaryDark">@color/primary700</item>
<item name="android:colorAccent">@color/accent</item> <item name="colorAccent">@color/accent</item>
<item type="color" name="color_text_primary">@color/black87</item> <item name="color_text_primary">@color/black87</item>
<item type="color" name="color_text_secondary">@color/black54</item> <item name="color_text_secondary">@color/black54</item>
<item type="color" name="color_background_primary">@color/grey50</item> <item name="color_background_primary">@color/grey50</item>
<item type="color" name="color_background_secondary">@color/grey200</item> <item name="color_background_secondary">@color/grey200</item>
<item name="android:windowActionModeOverlay">true</item> <item name="android:windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">@color/accent</item> <item name="android:actionModeBackground">@color/accent</item>
@ -22,7 +22,7 @@
<item name="TextSizeHeadline">20sp</item> <item name="TextSizeHeadline">20sp</item>
<item type="reference" name="infocard_border">@drawable/infocard_border</item> <item type="reference" name="infocard_border">@drawable/infocard_border</item>
<item type="color" name="divider">@color/black12</item> <item name="divider">@color/black12</item>
<item type="reference" name="ic_send_cancel_offline">@drawable/ic_send_cancel_offline</item> <item type="reference" name="ic_send_cancel_offline">@drawable/ic_send_cancel_offline</item>
<item type="reference" name="ic_send_location_offline">@drawable/ic_send_location_offline</item> <item type="reference" name="ic_send_location_offline">@drawable/ic_send_location_offline</item>
@ -43,14 +43,14 @@
<item type="reference" name="message_bubble_sent">@drawable/message_bubble_sent</item> <item type="reference" name="message_bubble_sent">@drawable/message_bubble_sent</item>
<item type="reference" name="message_bubble_received_green">@drawable/message_bubble_received</item> <item type="reference" name="message_bubble_received_green">@drawable/message_bubble_received</item>
<item type="color" name="unread_count">@color/unreadcountlight</item> <item name="unread_count">@color/unreadcountlight</item>
<item type="color" name="conversations_overview_background">@color/primary700</item> <item name="conversations_overview_background">@color/primary700</item>
<item type="float" name="icon_alpha">0.54</item> <item type="float" name="icon_alpha">0.54</item>
<item type="dimen" name="dialog_horizontal_padding">24dp</item> <item name="dialog_horizontal_padding">24dp</item>
<item type="dimen" name="dialog_vertical_padding">16dp</item> <item name="dialog_vertical_padding">16dp</item>
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item> <item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item>
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item> <item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item>
@ -81,16 +81,16 @@
<item type="reference" name="icon_notifications_none">@drawable/ic_notifications_none_black_24dp</item> <item type="reference" name="icon_notifications_none">@drawable/ic_notifications_none_black_24dp</item>
</style> </style>
<style name="ConversationsTheme.Dark" parent="android:Theme.Material"> <style name="ConversationsTheme.Dark" parent="Theme.AppCompat">
<item name="android:colorPrimary">@color/primary800</item> <item name="colorPrimary">@color/primary800</item>
<item name="android:colorPrimaryDark">@color/primary900</item> <item name="colorPrimaryDark">@color/primary900</item>
<item name="android:colorAccent">@color/accent</item> <item name="colorAccent">@color/accent</item>
<item type="color" name="color_text_primary">@color/white</item> <item name="color_text_primary">@color/white</item>
<item type="color" name="color_text_secondary">@color/white70</item> <item name="color_text_secondary">@color/white70</item>
<item type="color" name="color_background_primary">@color/grey800</item> <item name="color_background_primary">@color/grey800</item>
<item type="color" name="color_background_secondary">@color/grey900</item> <item name="color_background_secondary">@color/grey900</item>
<item name="android:windowActionModeOverlay">true</item> <item name="android:windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">@color/accent</item> <item name="android:actionModeBackground">@color/accent</item>
@ -102,7 +102,7 @@
<item name="TextSizeHeadline">20sp</item> <item name="TextSizeHeadline">20sp</item>
<item type="reference" name="infocard_border">@drawable/infocard_border_dark</item> <item type="reference" name="infocard_border">@drawable/infocard_border_dark</item>
<item type="color" name="divider">@color/white12</item> <item name="divider">@color/white12</item>
<item type="reference" name="ic_send_cancel_offline">@drawable/ic_send_cancel_offline_white</item> <item type="reference" name="ic_send_cancel_offline">@drawable/ic_send_cancel_offline_white</item>
<item type="reference" name="ic_send_location_offline">@drawable/ic_send_location_offline_white</item> <item type="reference" name="ic_send_location_offline">@drawable/ic_send_location_offline_white</item>
@ -123,14 +123,14 @@
<item type="reference" name="message_bubble_sent">@drawable/message_bubble_sent_grey</item> <item type="reference" name="message_bubble_sent">@drawable/message_bubble_sent_grey</item>
<item type="reference" name="message_bubble_received_green">@drawable/message_bubble_received_dark</item> <item type="reference" name="message_bubble_received_green">@drawable/message_bubble_received_dark</item>
<item type="color" name="unread_count">@color/unreadcountdark</item> <item name="unread_count">@color/unreadcountdark</item>
<item type="color" name="conversations_overview_background">@color/primary900</item> <item name="conversations_overview_background">@color/primary900</item>
<item type="float" name="icon_alpha">0.7</item> <item type="float" name="icon_alpha">0.7</item>
<item type="dimen" name="dialog_horizontal_padding">24dp</item> <item name="dialog_horizontal_padding">24dp</item>
<item type="dimen" name="dialog_vertical_padding">16dp</item> <item name="dialog_vertical_padding">16dp</item>
<item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item> <item type="reference" name="icon_add_group">@drawable/ic_group_add_white_24dp</item>
<item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item> <item type="reference" name="icon_add_person">@drawable/ic_person_add_white_24dp</item>