Commit 2d5c2e87 authored by Grigory Fedorov's avatar Grigory Fedorov

Toolbar is used instead of action bar. Layout toolbar_default included in every activity's layout.

parent a83fa7d7
...@@ -18,6 +18,7 @@ import android.app.Dialog; ...@@ -18,6 +18,7 @@ import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View; import android.view.View;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView; import android.widget.AdapterView;
...@@ -96,6 +97,7 @@ public class AccountAdd extends ManagedActivity implements ...@@ -96,6 +97,7 @@ public class AccountAdd extends ManagedActivity implements
inputManager.hideSoftInputFromWindow(findViewById(R.id.ok) inputManager.hideSoftInputFromWindow(findViewById(R.id.ok)
.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); .getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} }
......
...@@ -22,6 +22,7 @@ import android.content.DialogInterface; ...@@ -22,6 +22,7 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
...@@ -128,6 +129,9 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -128,6 +129,9 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
exitOnSend = savedInstanceState.getBoolean(SAVED_EXIT_ON_SEND); exitOnSend = savedInstanceState.getBoolean(SAVED_EXIT_ON_SEND);
} }
setContentView(R.layout.activity_chat_viewer);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
contactTitleActionBarInflater = new ContactTitleActionBarInflater(this); contactTitleActionBarInflater = new ContactTitleActionBarInflater(this);
contactTitleActionBarInflater.setUpActionBarView(); contactTitleActionBarInflater.setUpActionBarView();
...@@ -140,8 +144,6 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener ...@@ -140,8 +144,6 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
contactTitleActionBarInflater.setOnAvatarClickListener(this); contactTitleActionBarInflater.setOnAvatarClickListener(this);
setContentView(R.layout.activity_chat_viewer);
if (account != null && user != null) { if (account != null && user != null) {
chatViewerAdapter = new ChatViewerAdapter(getFragmentManager(), account, user, this); chatViewerAdapter = new ChatViewerAdapter(getFragmentManager(), account, user, this);
isChatSelected = true; isChatSelected = true;
......
...@@ -21,6 +21,7 @@ import java.util.HashSet; ...@@ -21,6 +21,7 @@ import java.util.HashSet;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
...@@ -62,12 +63,15 @@ public class ContactAdd extends GroupListActivity implements ...@@ -62,12 +63,15 @@ public class ContactAdd extends GroupListActivity implements
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
} }
@Override @Override
protected void onInflate(Bundle savedInstanceState) { protected void onInflate(Bundle savedInstanceState) {
setContentView(R.layout.contact_add); setContentView(R.layout.contact_add);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
ListView listView = getListView(); ListView listView = getListView();
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
......
...@@ -17,6 +17,7 @@ package com.xabber.android.ui; ...@@ -17,6 +17,7 @@ package com.xabber.android.ui;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.EditText; import android.widget.EditText;
...@@ -45,16 +46,12 @@ public class ContactEditor extends GroupListActivity implements ...@@ -45,16 +46,12 @@ public class ContactEditor extends GroupListActivity implements
ContactTitleActionBarInflater contactTitleActionBarInflater; ContactTitleActionBarInflater contactTitleActionBarInflater;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onInflate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.contact_editor);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
contactTitleActionBarInflater = new ContactTitleActionBarInflater(this); contactTitleActionBarInflater = new ContactTitleActionBarInflater(this);
contactTitleActionBarInflater.setUpActionBarView(); contactTitleActionBarInflater.setUpActionBarView();
}
@Override
protected void onInflate(Bundle savedInstanceState) {
setContentView(R.layout.contact_editor);
Intent intent = getIntent(); Intent intent = getIntent();
account = ContactEditor.getAccount(intent); account = ContactEditor.getAccount(intent);
......
...@@ -27,6 +27,7 @@ import android.os.Handler; ...@@ -27,6 +27,7 @@ import android.os.Handler;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.view.MenuItemCompat; import android.support.v4.view.MenuItemCompat;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo; import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater; import android.view.LayoutInflater;
...@@ -125,6 +126,7 @@ public class ContactList extends ManagedActivity implements OnAccountChangedList ...@@ -125,6 +126,7 @@ public class ContactList extends ManagedActivity implements OnAccountChangedList
} }
setContentView(R.layout.contact_list); setContentView(R.layout.contact_list);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(getString(R.string.production_title)); setTitle(getString(R.string.production_title));
......
...@@ -21,6 +21,7 @@ import android.content.Context; ...@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.text.ClipboardManager; import android.text.ClipboardManager;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
...@@ -92,6 +93,8 @@ public class FingerprintViewer extends ManagedActivity implements ...@@ -92,6 +93,8 @@ public class FingerprintViewer extends ManagedActivity implements
} }
setContentView(R.layout.fingerprint_viewer); setContentView(R.layout.fingerprint_viewer);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
integrator = new IntentIntegrator(this); integrator = new IntentIntegrator(this);
Intent intent = getIntent(); Intent intent = getIntent();
account = getAccount(intent); account = getAccount(intent);
......
...@@ -21,6 +21,7 @@ import org.jivesoftware.smack.util.StringUtils; ...@@ -21,6 +21,7 @@ import org.jivesoftware.smack.util.StringUtils;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View; import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener;
...@@ -71,6 +72,7 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener, ...@@ -71,6 +72,7 @@ public class MUCEditor extends ManagedActivity implements View.OnClickListener,
return; return;
setContentView(R.layout.muc_editor); setContentView(R.layout.muc_editor);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
......
...@@ -19,6 +19,7 @@ import java.util.Collection; ...@@ -19,6 +19,7 @@ import java.util.Collection;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.account.OnAccountChangedListener; import com.xabber.android.data.account.OnAccountChangedListener;
...@@ -59,6 +60,8 @@ public class OccupantList extends ManagedListActivity implements ...@@ -59,6 +60,8 @@ public class OccupantList extends ManagedListActivity implements
return; return;
} }
setContentView(R.layout.list); setContentView(R.layout.list);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
listAdapter = new OccupantListAdapter(this, account, room); listAdapter = new OccupantListAdapter(this, account, room);
setListAdapter(listAdapter); setListAdapter(listAdapter);
......
...@@ -17,6 +17,7 @@ package com.xabber.android.ui; ...@@ -17,6 +17,7 @@ package com.xabber.android.ui;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.EditText; import android.widget.EditText;
...@@ -88,6 +89,7 @@ public class QuestionViewer extends ManagedActivity implements ...@@ -88,6 +89,7 @@ public class QuestionViewer extends ManagedActivity implements
answerRequest = intent.getBooleanExtra(EXTRA_FIELD_ANSWER_REQUEST, false); answerRequest = intent.getBooleanExtra(EXTRA_FIELD_ANSWER_REQUEST, false);
if (showQuestion) { if (showQuestion) {
setContentView(R.layout.question_viewer); setContentView(R.layout.question_viewer);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
questionView = (EditText) findViewById(R.id.question); questionView = (EditText) findViewById(R.id.question);
questionView.setEnabled(!answerRequest); questionView.setEnabled(!answerRequest);
if (answerRequest) { if (answerRequest) {
...@@ -97,6 +99,7 @@ public class QuestionViewer extends ManagedActivity implements ...@@ -97,6 +99,7 @@ public class QuestionViewer extends ManagedActivity implements
} }
} else { } else {
setContentView(R.layout.secret_viewer); setContentView(R.layout.secret_viewer);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
} }
findViewById(R.id.cancel).setOnClickListener(this); findViewById(R.id.cancel).setOnClickListener(this);
findViewById(R.id.send).setOnClickListener(this); findViewById(R.id.send).setOnClickListener(this);
......
...@@ -17,6 +17,7 @@ package com.xabber.android.ui; ...@@ -17,6 +17,7 @@ package com.xabber.android.ui;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo; import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater; import android.view.LayoutInflater;
...@@ -68,6 +69,7 @@ public class StatusEditor extends ManagedListActivity implements ...@@ -68,6 +69,7 @@ public class StatusEditor extends ManagedListActivity implements
actionWithItem = null; actionWithItem = null;
setContentView(R.layout.status_editor); setContentView(R.layout.status_editor);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
......
...@@ -20,6 +20,7 @@ import android.content.pm.PackageInfo; ...@@ -20,6 +20,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.NavUtils; import android.support.v4.app.NavUtils;
import android.support.v7.widget.Toolbar;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.view.MenuItem; import android.view.MenuItem;
import android.widget.TextView; import android.widget.TextView;
...@@ -33,6 +34,7 @@ public class AboutViewer extends ManagedActivity { ...@@ -33,6 +34,7 @@ public class AboutViewer extends ManagedActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.about_viewer); setContentView(R.layout.about_viewer);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
((TextView) findViewById(R.id.about_version)) ((TextView) findViewById(R.id.about_version))
.setText(getString(R.string.about_version, getVersionName())); .setText(getString(R.string.about_version, getVersionName()));
......
...@@ -20,6 +20,7 @@ import android.content.Intent; ...@@ -20,6 +20,7 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.preference.Preference; import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener; import android.preference.Preference.OnPreferenceClickListener;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.account.AccountItem; import com.xabber.android.data.account.AccountItem;
...@@ -71,9 +72,10 @@ public class AccountEditor extends ManagedActivity implements ...@@ -71,9 +72,10 @@ public class AccountEditor extends ManagedActivity implements
token = savedInstanceState.getString(SAVED_TOKEN); token = savedInstanceState.getString(SAVED_TOKEN);
} }
setTitle(AccountManager.getInstance().getVerboseName(account));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setTitle(AccountManager.getInstance().getVerboseName(account));
} }
@Override @Override
......
...@@ -19,6 +19,7 @@ import java.util.Collection; ...@@ -19,6 +19,7 @@ import java.util.Collection;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.MenuItem; import android.view.MenuItem;
...@@ -42,6 +43,7 @@ public class AccountList extends BaseListEditor<String> implements ...@@ -42,6 +43,7 @@ public class AccountList extends BaseListEditor<String> implements
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_accounts))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_accounts)));
......
...@@ -17,6 +17,7 @@ package com.xabber.android.ui.preferences; ...@@ -17,6 +17,7 @@ package com.xabber.android.ui.preferences;
import android.app.Dialog; import android.app.Dialog;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.ContextMenu; import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo; import android.view.ContextMenu.ContextMenuInfo;
import android.view.Menu; import android.view.Menu;
...@@ -75,6 +76,7 @@ public abstract class BaseListEditor<T> extends ManagedListActivity implements ...@@ -75,6 +76,7 @@ public abstract class BaseListEditor<T> extends ManagedListActivity implements
*/ */
protected void onInflate(Bundle savedInstanceState) { protected void onInflate(Bundle savedInstanceState) {
setContentView(R.layout.list); setContentView(R.layout.list);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
} }
protected abstract T getSavedValue(Bundle bundle, String key); protected abstract T getSavedValue(Bundle bundle, String key);
......
...@@ -2,6 +2,7 @@ package com.xabber.android.ui.preferences; ...@@ -2,6 +2,7 @@ package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.message.phrase.Phrase; import com.xabber.android.data.message.phrase.Phrase;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
...@@ -16,9 +17,9 @@ public abstract class BasePhrasePreferences extends ManagedActivity ...@@ -16,9 +17,9 @@ public abstract class BasePhrasePreferences extends ManagedActivity
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (savedInstanceState == null) { if (savedInstanceState == null) {
getFragmentManager().beginTransaction() getFragmentManager().beginTransaction()
......
...@@ -17,6 +17,7 @@ package com.xabber.android.ui.preferences; ...@@ -17,6 +17,7 @@ package com.xabber.android.ui.preferences;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.account.AccountItem; import com.xabber.android.data.account.AccountItem;
...@@ -47,6 +48,7 @@ public class ChatEditor extends ManagedActivity ...@@ -47,6 +48,7 @@ public class ChatEditor extends ManagedActivity
} }
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (savedInstanceState == null) { if (savedInstanceState == null) {
......
package com.xabber.android.ui.preferences; package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper; import com.xabber.android.ui.helper.PreferenceSummaryHelper;
...@@ -15,6 +16,7 @@ public class ChatSettings extends ManagedActivity { ...@@ -15,6 +16,7 @@ public class ChatSettings extends ManagedActivity {
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.chat_viewer))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.chat_viewer)));
......
package com.xabber.android.ui.preferences; package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper; import com.xabber.android.ui.helper.PreferenceSummaryHelper;
...@@ -15,6 +16,7 @@ public class ConnectionSettings extends ManagedActivity { ...@@ -15,6 +16,7 @@ public class ConnectionSettings extends ManagedActivity {
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_connection))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_connection)));
......
package com.xabber.android.ui.preferences; package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper; import com.xabber.android.ui.helper.PreferenceSummaryHelper;
...@@ -14,6 +15,7 @@ public class ContactListSettings extends ManagedActivity { ...@@ -14,6 +15,7 @@ public class ContactListSettings extends ManagedActivity {
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_contacts))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_contacts)));
......
...@@ -18,6 +18,7 @@ import android.content.Context; ...@@ -18,6 +18,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.Application; import com.xabber.android.data.Application;
import com.xabber.android.data.LogManager; import com.xabber.android.data.LogManager;
...@@ -187,6 +188,8 @@ public class ContactViewer extends ManagedActivity implements ...@@ -187,6 +188,8 @@ public class ContactViewer extends ManagedActivity implements
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
ContactTitleActionBarInflater contactTitleActionBarInflater = new ContactTitleActionBarInflater(this); ContactTitleActionBarInflater contactTitleActionBarInflater = new ContactTitleActionBarInflater(this);
......
package com.xabber.android.ui.preferences; package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper; import com.xabber.android.ui.helper.PreferenceSummaryHelper;
...@@ -15,6 +16,7 @@ public class DebugSettings extends ManagedActivity { ...@@ -15,6 +16,7 @@ public class DebugSettings extends ManagedActivity {
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_debug))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_debug)));
......
...@@ -2,6 +2,7 @@ package com.xabber.android.ui.preferences; ...@@ -2,6 +2,7 @@ package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper; import com.xabber.android.ui.helper.PreferenceSummaryHelper;
...@@ -16,6 +17,7 @@ public class NotificationsSettings extends ManagedActivity { ...@@ -16,6 +17,7 @@ public class NotificationsSettings extends ManagedActivity {
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_events))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_events)));
......
...@@ -18,6 +18,7 @@ import android.content.Context; ...@@ -18,6 +18,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.SettingsManager; import com.xabber.android.data.SettingsManager;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
...@@ -33,6 +34,7 @@ public class PreferenceEditor extends ManagedActivity ...@@ -33,6 +34,7 @@ public class PreferenceEditor extends ManagedActivity
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
if (savedInstanceState == null) { if (savedInstanceState == null) {
getFragmentManager().beginTransaction() getFragmentManager().beginTransaction()
......
package com.xabber.android.ui.preferences; package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.ui.helper.ManagedActivity; import com.xabber.android.ui.helper.ManagedActivity;
import com.xabber.android.ui.helper.PreferenceSummaryHelper; import com.xabber.android.ui.helper.PreferenceSummaryHelper;
...@@ -15,6 +16,7 @@ public class SecuritySettings extends ManagedActivity { ...@@ -15,6 +16,7 @@ public class SecuritySettings extends ManagedActivity {
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_security))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_security)));
......
package com.xabber.android.ui.preferences; package com.xabber.android.ui.preferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import com.xabber.android.data.ActivityManager; import com.xabber.android.data.ActivityManager;
import com.xabber.android.ui.ContactList; import com.xabber.android.ui.ContactList;
...@@ -18,7 +19,7 @@ public class ThemeSettings extends ManagedActivity ...@@ -18,7 +19,7 @@ public class ThemeSettings extends ManagedActivity
return; return;
setContentView(R.layout.activity_preferences); setContentView(R.layout.activity_preferences);
setSupportActionBar((Toolbar) findViewById(R.id.toolbar_default));
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_interface))); setTitle(PreferenceSummaryHelper.getPreferenceTitle(getString(R.string.preference_interface)));
......
...@@ -18,8 +18,10 @@ ...@@ -18,8 +18,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:padding="4dip"
> >
<include layout="@layout/toolbar_default"/>
<LinearLayout <LinearLayout
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<include layout="@layout/toolbar_default"/>
<TextView android:text="@string/account_type" android:layout_width="match_parent" android:layout_height="wrap_content" /> <TextView android:text="@string/account_type" android:layout_width="match_parent" android:layout_height="wrap_content" />
<Spinner <Spinner
android:id="@+id/account_type" android:id="@+id/account_type"
......
...@@ -4,19 +4,26 @@ ...@@ -4,19 +4,26 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.v4.view.ViewPager <include layout="@layout/toolbar_default"
android:id="@+id/pager" android:id="@+id/toolbar_default"
android:layout_width="match_parent" />
android:layout_height="match_parent"/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/toolbar_default"
/>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:id="@+id/chat_scroll_indicator" android:id="@+id/chat_scroll_indicator"
> android:layout_below="@+id/toolbar_default"
>
</LinearLayout> </LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/preferences_activity_container" android:orientation="vertical"
> >
</RelativeLayout> <include layout="@layout/toolbar_default"/>
\ No newline at end of file
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/preferences_activity_container"
/>
</LinearLayout>
\ No newline at end of file
...@@ -12,9 +12,20 @@ ...@@ -12,9 +12,20 @@
You should have received a copy of the GNU General Public License, You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/. along with this program. If not, see http://www.gnu.org/licenses/.
--> -->
<ListView <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dip" /> android:orientation="vertical"
>
<include layout="@layout/toolbar_default" />
<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dip" />
</LinearLayout>
\ No newline at end of file
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<include layout="@layout/toolbar_default"/>
<TextView <TextView
android:text="@string/contact_name" android:text="@string/contact_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -13,14 +13,17 @@ ...@@ -13,14 +13,17 @@
You should have received a copy of the GNU General Public License, You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/. along with this program. If not, see http://www.gnu.org/licenses/.
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar_default" />
<RelativeLayout <RelativeLayout
android:id="@+id/container" android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@android:id/title" /> />
</RelativeLayout> </LinearLayout>
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent" >
<ListView <ListView
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -19,92 +19,94 @@ ...@@ -19,92 +19,94 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<ScrollView <include layout="@layout/toolbar_default"/>
android:layout_width="match_parent"
android:layout_height="match_parent" <ScrollView
> android:layout_width="match_parent"
android:layout_height="match_parent"
<LinearLayout >
android:orientation="vertical"
android:layout_width="match_parent" <LinearLayout
android:layout_height="match_parent" android:orientation="vertical"
android:paddingTop="8dip" android:layout_width="match_parent"
android:paddingBottom="4dip" android:layout_height="match_parent"
android:paddingLeft="2dip" android:paddingTop="8dip"
android:paddingRight="2dip" android:paddingBottom="4dip"
> android:paddingLeft="2dip"
android:paddingRight="2dip"
<TextView >
android:text="@string/otr_fingerprint_description"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_fingerprint_description"
android:paddingBottom="8dip" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:paddingBottom="8dip"
<TextView />
android:text="@string/otr_remote_fingerprint"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_remote_fingerprint"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<TextView />
android:id="@+id/otr_remote_fingerprint"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:id="@+id/otr_remote_fingerprint"
style="@android:style/TextAppearance.Large" android:layout_width="match_parent"
android:text="12:34:56" android:layout_height="wrap_content"
/> style="@android:style/TextAppearance.Large"
android:text="12:34:56"
<CheckBox />
android:id="@+id/verified"
android:layout_width="match_parent" <CheckBox
android:layout_height="wrap_content" android:id="@+id/verified"
android:text="@string/otr_is_verified" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:text="@string/otr_is_verified"
<Button />
android:id="@+id/scan"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/scan"
android:text="@string/otr_scan_fingerprint" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:text="@string/otr_scan_fingerprint"
<ImageView />
android:layout_width="match_parent"
android:layout_height="wrap_content" <ImageView
android:background="@android:drawable/divider_horizontal_dark" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:background="@android:drawable/divider_horizontal_dark"
<TextView />
android:text="@string/otr_local_fingerprint"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_local_fingerprint"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<TextView />
android:id="@+id/otr_local_fingerprint"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:id="@+id/otr_local_fingerprint"
style="@android:style/TextAppearance.Large" android:layout_width="match_parent"
android:text="12:34:56" android:layout_height="wrap_content"
/> style="@android:style/TextAppearance.Large"
android:text="12:34:56"
<Button />
android:id="@+id/show"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/show"
android:text="@string/otr_show_fingerprint" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:text="@string/otr_show_fingerprint"
<Button />
android:id="@+id/copy"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/copy"
android:text="@string/otr_copy_fingerprint" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:text="@string/otr_copy_fingerprint"
</LinearLayout> />
</ScrollView> </LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -12,9 +12,20 @@ ...@@ -12,9 +12,20 @@
You should have received a copy of the GNU General Public License, You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/. along with this program. If not, see http://www.gnu.org/licenses/.
--> -->
<ListView
xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
/> android:orientation="vertical"
>
<include layout="@layout/toolbar_default"/>
<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
\ No newline at end of file
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<include layout="@layout/toolbar_default"/>
<TextView <TextView
android:text="@string/contact_account" android:text="@string/contact_account"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -19,79 +19,81 @@ ...@@ -19,79 +19,81 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<ScrollView <include layout="@layout/toolbar_default"/>
android:orientation="vertical"
android:layout_width="match_parent" <ScrollView
android:layout_height="match_parent" android:orientation="vertical"
android:paddingTop="8dip" android:layout_width="match_parent"
android:paddingBottom="4dip" android:layout_height="match_parent"
android:paddingLeft="2dip" android:paddingTop="8dip"
android:paddingRight="2dip" android:paddingBottom="4dip"
> android:paddingLeft="2dip"
android:paddingRight="2dip"
<LinearLayout >
android:orientation="vertical"
android:layout_width="match_parent" <LinearLayout
android:layout_height="match_parent" android:orientation="vertical"
> android:layout_width="match_parent"
android:layout_height="match_parent"
<TextView >
android:text="@string/otr_question_description"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_question_description"
android:paddingBottom="8dip" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:paddingBottom="8dip"
<TextView />
android:text="@string/otr_question"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_question"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<EditText />
android:id="@+id/question"
android:layout_width="match_parent" <EditText
android:layout_height="wrap_content" android:id="@+id/question"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<TextView />
android:text="@string/otr_answer"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_answer"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<EditText />
android:id="@+id/answer"
android:layout_width="match_parent" <EditText
android:layout_height="wrap_content" android:id="@+id/answer"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<LinearLayout />
android:orientation="horizontal"
android:layout_width="match_parent" <LinearLayout
android:layout_height="match_parent" android:orientation="horizontal"
> android:layout_width="match_parent"
android:layout_height="match_parent"
<Button >
android:id="@+id/send"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/send"
android:layout_weight="1" android:layout_width="match_parent"
android:text="@string/chat_send" android:layout_height="wrap_content"
/> android:layout_weight="1"
android:text="@string/chat_send"
<Button />
android:id="@+id/cancel"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/cancel"
android:layout_weight="1" android:layout_width="match_parent"
android:text="@android:string/cancel" android:layout_height="wrap_content"
/> android:layout_weight="1"
android:text="@android:string/cancel"
</LinearLayout> />
</LinearLayout> </LinearLayout>
</ScrollView> </LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -19,67 +19,69 @@ ...@@ -19,67 +19,69 @@
android:layout_height="match_parent" android:layout_height="match_parent"
> >
<ScrollView <include layout="@layout/toolbar_default"/>
android:orientation="vertical"
android:layout_width="match_parent" <ScrollView
android:layout_height="match_parent" android:orientation="vertical"
android:paddingTop="8dip" android:layout_width="match_parent"
android:paddingBottom="4dip" android:layout_height="match_parent"
android:paddingLeft="2dip" android:paddingTop="8dip"
android:paddingRight="2dip" android:paddingBottom="4dip"
> android:paddingLeft="2dip"
android:paddingRight="2dip"
<LinearLayout >
android:orientation="vertical"
android:layout_width="match_parent" <LinearLayout
android:layout_height="match_parent" android:orientation="vertical"
> android:layout_width="match_parent"
android:layout_height="match_parent"
<TextView >
android:text="@string/otr_secret_description"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_secret_description"
android:paddingBottom="8dip" android:layout_width="match_parent"
/> android:layout_height="wrap_content"
android:paddingBottom="8dip"
<TextView />
android:text="@string/otr_secret"
android:layout_width="match_parent" <TextView
android:layout_height="wrap_content" android:text="@string/otr_secret"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<EditText />
android:id="@+id/answer"
android:layout_width="match_parent" <EditText
android:layout_height="wrap_content" android:id="@+id/answer"
/> android:layout_width="match_parent"
android:layout_height="wrap_content"
<LinearLayout />
android:orientation="horizontal"
android:layout_width="match_parent" <LinearLayout
android:layout_height="match_parent" android:orientation="horizontal"
> android:layout_width="match_parent"
android:layout_height="match_parent"
<Button >
android:id="@+id/send"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/send"
android:layout_weight="1" android:layout_width="match_parent"
android:text="@string/chat_send" android:layout_height="wrap_content"
/> android:layout_weight="1"
android:text="@string/chat_send"
<Button />
android:id="@+id/cancel"
android:layout_width="match_parent" <Button
android:layout_height="wrap_content" android:id="@+id/cancel"
android:layout_weight="1" android:layout_width="match_parent"
android:text="@android:string/cancel" android:layout_height="wrap_content"
/> android:layout_weight="1"
android:text="@android:string/cancel"
</LinearLayout> />
</LinearLayout> </LinearLayout>
</ScrollView> </LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -12,9 +12,20 @@ ...@@ -12,9 +12,20 @@
You should have received a copy of the GNU General Public License, You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/. along with this program. If not, see http://www.gnu.org/licenses/.
--> -->
<ListView <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="4dip" /> >
<include layout="@layout/toolbar_default"/>
<ListView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="4dip" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/toolbar_default"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:background="@color/background_material_dark"
android:elevation="8dp"
tools:showIn="@layout/contact_list" />
...@@ -17,5 +17,6 @@ ...@@ -17,5 +17,6 @@
<item name="expanderGroupColor">?android:attr/textColorPrimary</item> <item name="expanderGroupColor">?android:attr/textColorPrimary</item>
<item name="expanderAccountColor">?android:attr/textColorPrimaryInverse</item> <item name="expanderAccountColor">?android:attr/textColorPrimaryInverse</item>
<item name="expanderIndicator">@drawable/expander_indicator_dark</item> <item name="expanderIndicator">@drawable/expander_indicator_dark</item>
<item name="windowActionBar">false</item>
</style> </style>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment