replace deprecated action bar with toolbar (#2872)

* replace deprecated action bar with toolbar

* add toolbar support in each activity

* remove redundant themes made earlier

* add configure action bar method in xmpp activity

* remove android namespace from actionmodeoverlay

* solve bug of scrolling toolbar
This commit is contained in:
Harshit Bansal 2018-03-18 14:00:22 +05:30 committed by Daniel Gultsch
parent 83a4cb8a11
commit f2885575ba
37 changed files with 772 additions and 627 deletions

View file

@ -6,6 +6,8 @@ import android.support.v7.app.AppCompatActivity;
import eu.siacs.conversations.R; import eu.siacs.conversations.R;
import static eu.siacs.conversations.ui.XmppActivity.configureActionBar;
public class AboutActivity extends AppCompatActivity { public class AboutActivity extends AppCompatActivity {
@Override @Override
@ -18,5 +20,7 @@ public class AboutActivity extends AppCompatActivity {
setTheme(mTheme); setTheme(mTheme);
setContentView(R.layout.activity_about); setContentView(R.layout.activity_about);
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
} }
} }

View file

@ -3,6 +3,7 @@ package eu.siacs.conversations.ui;
import android.content.Context; import android.content.Context;
import android.databinding.DataBindingUtil; import android.databinding.DataBindingUtil;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.Menu; import android.view.Menu;
@ -95,6 +96,8 @@ public abstract class AbstractSearchableListItemActivity extends XmppActivity {
public void onCreate(final Bundle savedInstanceState) { public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
this.binding = DataBindingUtil.setContentView(this,R.layout.activity_choose_contact); this.binding = DataBindingUtil.setContentView(this,R.layout.activity_choose_contact);
setSupportActionBar((Toolbar) binding.toolbar);
configureActionBar(getSupportActionBar());
this.binding.chooseContactList.setFastScrollEnabled(true); this.binding.chooseContactList.setFastScrollEnabled(true);
mListItemsAdapter = new ListItemAdapter(this, listItems); mListItemsAdapter = new ListItemAdapter(this, listItems);
this.binding.chooseContactList.setAdapter(mListItemsAdapter); this.binding.chooseContactList.setAdapter(mListItemsAdapter);

View file

@ -60,6 +60,8 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti
protected void onCreate(final Bundle savedInstanceState) { protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_change_password); setContentView(R.layout.activity_change_password);
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
Button mCancelButton = findViewById(R.id.left_button); Button mCancelButton = findViewById(R.id.left_button);
mCancelButton.setOnClickListener(view -> finish()); mCancelButton.setOnClickListener(view -> finish());
this.mChangePasswordButton = findViewById(R.id.right_button); this.mChangePasswordButton = findViewById(R.id.right_button);

View file

@ -11,6 +11,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.AsyncTask; import android.os.AsyncTask;
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.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -226,10 +227,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
this.binding.mucMoreDetails.setVisibility(View.GONE); this.binding.mucMoreDetails.setVisibility(View.GONE);
this.binding.changeConferenceButton.setOnClickListener(this.mChangeConferenceSettings); this.binding.changeConferenceButton.setOnClickListener(this.mChangeConferenceSettings);
this.binding.invite.setOnClickListener(inviteListener); this.binding.invite.setOnClickListener(inviteListener);
if (getSupportActionBar() != null) { setSupportActionBar((Toolbar) binding.toolbar);
getSupportActionBar().setHomeButtonEnabled(true); configureActionBar(getSupportActionBar());
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
this.binding.editNickButton.setOnClickListener(v -> quickEdit(mConversation.getMucOptions().getActualNick(), this.binding.editNickButton.setOnClickListener(v -> quickEdit(mConversation.getMucOptions().getActualNick(),
0, 0,
value -> { value -> {

View file

@ -12,6 +12,7 @@ import android.provider.ContactsContract.CommonDataKinds;
import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents; import android.provider.ContactsContract.Intents;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -190,10 +191,8 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
this.messageFingerprint = getIntent().getStringExtra("fingerprint"); this.messageFingerprint = getIntent().getStringExtra("fingerprint");
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_contact_details); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_contact_details);
if (getSupportActionBar() != null) { setSupportActionBar((Toolbar) binding.toolbar);
getSupportActionBar().setHomeButtonEnabled(true); configureActionBar(getSupportActionBar());
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
binding.showInactiveDevices.setOnClickListener(v -> { binding.showInactiveDevices.setOnClickListener(v -> {
showInactiveOmemo = !showInactiveOmemo; showInactiveOmemo = !showInactiveOmemo;
populateView(); populateView();

View file

@ -48,6 +48,7 @@ import android.support.annotation.IdRes;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.widget.Toolbar;
import android.util.Log; import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -364,6 +365,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
new EmojiService(this).init(); new EmojiService(this).init();
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations);
setSupportActionBar((Toolbar) binding.toolbar);
configureActionBar(getSupportActionBar());
this.getFragmentManager().addOnBackStackChangedListener(this::invalidateActionBarTitle); this.getFragmentManager().addOnBackStackChangedListener(this::invalidateActionBarTitle);
this.getFragmentManager().addOnBackStackChangedListener(this::showDialogsIfMainIsOverview); this.getFragmentManager().addOnBackStackChangedListener(this::showDialogsIfMainIsOverview);
this.initializeFragments(); this.initializeFragments();

View file

@ -20,6 +20,7 @@ import android.support.design.widget.TextInputLayout;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AlertDialog.Builder; import android.support.v7.app.AlertDialog.Builder;
import android.support.v7.widget.Toolbar;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.Log; import android.util.Log;
@ -536,6 +537,8 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.mSavedInstanceInit = savedInstanceState.getBoolean("initMode", false); this.mSavedInstanceInit = savedInstanceState.getBoolean("initMode", false);
} }
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_edit_account); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_edit_account);
setSupportActionBar((Toolbar) binding.toolbar);
configureActionBar(getSupportActionBar());
binding.accountJid.addTextChangedListener(this.mTextWatcher); binding.accountJid.addTextChangedListener(this.mTextWatcher);
binding.accountJid.setOnFocusChangeListener(this.mEditTextFocusListener); binding.accountJid.setOnFocusChangeListener(this.mEditTextFocusListener);
this.mAccountJidLayout = (TextInputLayout) findViewById(R.id.account_jid_layout); this.mAccountJidLayout = (TextInputLayout) findViewById(R.id.account_jid_layout);

View file

@ -53,6 +53,8 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher {
} }
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.magic_create); setContentView(R.layout.magic_create);
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
mFullJidDisplay = findViewById(R.id.full_jid); mFullJidDisplay = findViewById(R.id.full_jid);
mUsername = findViewById(R.id.username); mUsername = findViewById(R.id.username);
mRandom = new SecureRandom(); mRandom = new SecureRandom();

View file

@ -74,7 +74,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage_accounts); setContentView(R.layout.activity_manage_accounts);
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
if (savedInstanceState != null) { if (savedInstanceState != null) {
String jid = savedInstanceState.getString(STATE_SELECTED_ACCOUNT); String jid = savedInstanceState.getString(STATE_SELECTED_ACCOUNT);
if (jid != null) { if (jid != null) {

View file

@ -41,7 +41,7 @@ import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.MTMDecision; import eu.siacs.conversations.entities.MTMDecision;
import eu.siacs.conversations.services.MemorizingTrustManager; import eu.siacs.conversations.services.MemorizingTrustManager;
public class MemorizingActivity extends AppCompatActivity implements OnClickListener,OnCancelListener { public class MemorizingActivity extends AppCompatActivity implements OnClickListener, OnCancelListener {
private final static Logger LOGGER = Logger.getLogger(MemorizingActivity.class.getName()); private final static Logger LOGGER = Logger.getLogger(MemorizingActivity.class.getName());
@ -54,6 +54,8 @@ public class MemorizingActivity extends AppCompatActivity implements OnClickList
LOGGER.log(Level.FINE, "onCreate"); LOGGER.log(Level.FINE, "onCreate");
setTheme(findTheme()); setTheme(findTheme());
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
getLayoutInflater().inflate(R.layout.toolbar, findViewById(android.R.id.content));
setSupportActionBar(findViewById(R.id.toolbar));
} }
@Override @Override

View file

@ -94,6 +94,9 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_publish_profile_picture); setContentView(R.layout.activity_publish_profile_picture);
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
this.avatar = findViewById(R.id.account_image); this.avatar = findViewById(R.id.account_image);
this.cancelButton = findViewById(R.id.cancel_button); this.cancelButton = findViewById(R.id.cancel_button);
this.publishButton = findViewById(R.id.publish_button); this.publishButton = findViewById(R.id.publish_button);

View file

@ -19,6 +19,8 @@ import android.preference.PreferenceManager;
import android.preference.PreferenceScreen; import android.preference.PreferenceScreen;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.util.Log; import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast; import android.widget.Toast;
import java.io.File; import java.io.File;
@ -57,18 +59,19 @@ public class SettingsActivity extends XmppActivity implements
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
FragmentManager fm = getFragmentManager(); FragmentManager fm = getFragmentManager();
mSettingsFragment = (SettingsFragment) fm.findFragmentById(android.R.id.content); mSettingsFragment = (SettingsFragment) fm.findFragmentById(R.id.settings_content);
if (mSettingsFragment == null || !mSettingsFragment.getClass().equals(SettingsFragment.class)) { if (mSettingsFragment == null || !mSettingsFragment.getClass().equals(SettingsFragment.class)) {
mSettingsFragment = new SettingsFragment(); mSettingsFragment = new SettingsFragment();
fm.beginTransaction().replace(android.R.id.content, mSettingsFragment).commit(); fm.beginTransaction().replace(R.id.settings_content, mSettingsFragment).commit();
} }
mSettingsFragment.setActivityIntent(getIntent()); mSettingsFragment.setActivityIntent(getIntent());
this.mTheme = findTheme(); this.mTheme = findTheme();
setTheme(this.mTheme); setTheme(this.mTheme);
getWindow().getDecorView().setBackgroundColor(Color.get(this, R.attr.color_background_primary)); getWindow().getDecorView().setBackgroundColor(Color.get(this, R.attr.color_background_primary));
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
} }
@Override @Override

View file

@ -43,7 +43,8 @@ public class ShareViaAccountActivity extends XmppActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_manage_accounts); setContentView(R.layout.activity_manage_accounts);
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
accountListView = (ListView) findViewById(R.id.account_list); accountListView = (ListView) findViewById(R.id.account_list);
this.mAccountAdapter = new AccountAdapter(this, accountList, false); this.mAccountAdapter = new AccountAdapter(this, accountList, false);
accountListView.setAdapter(this.mAccountAdapter); accountListView.setAdapter(this.mAccountAdapter);

View file

@ -157,12 +157,15 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
new EmojiService(this).init(); new EmojiService(this).init();
setContentView(R.layout.activity_share_with);
setSupportActionBar(findViewById(R.id.toolbar));
if (getSupportActionBar() != null) { if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false); getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setHomeButtonEnabled(false); getSupportActionBar().setHomeButtonEnabled(false);
} }
setContentView(R.layout.activity_share_with);
setTitle(getString(R.string.title_activity_sharewith)); setTitle(getString(R.string.title_activity_sharewith));
mListView = findViewById(R.id.choose_conversation_list); mListView = findViewById(R.id.choose_conversation_list);

View file

@ -9,6 +9,8 @@ import android.graphics.drawable.Drawable;
import android.support.annotation.AttrRes; import android.support.annotation.AttrRes;
import android.support.annotation.DrawableRes; import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
@ -30,6 +32,7 @@ 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.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.text.Editable; import android.text.Editable;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
@ -141,7 +144,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 = getSupportActionBar().getSelectedNavigationIndex(); int pos = binding.startConversationViewPager.getCurrentItem();
if (pos == 0) { if (pos == 0) {
if (contacts.size() == 1) { if (contacts.size() == 1) {
openConversationForContact((Contact) contacts.get(0)); openConversationForContact((Contact) contacts.get(0));
@ -193,31 +196,9 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
}; };
private ActivityStartConversationBinding binding; private ActivityStartConversationBinding binding;
private ActionBar.TabListener mTabListener = new ActionBar.TabListener() {
@Override
public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
return;
}
@Override
public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
binding.startConversationViewPager.setCurrentItem(tab.getPosition());
onTabChanged();
}
@Override
public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
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) {
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setSelectedNavigationItem(position);
}
onTabChanged(); onTabChanged();
} }
}; };
@ -265,8 +246,11 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
new EmojiService(this).init(); new EmojiService(this).init();
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation);
Toolbar toolbar = (Toolbar) binding.toolbar;
setSupportActionBar(toolbar);
configureActionBar(getSupportActionBar());
this.binding.fab.setOnClickListener((v) -> { this.binding.fab.setOnClickListener((v) -> {
if (getSupportActionBar().getSelectedNavigationIndex() == 0) { if (binding.startConversationViewPager.getCurrentItem() == 0) {
String searchString = mSearchEditText != null ? mSearchEditText.getText().toString() : null; String searchString = mSearchEditText != null ? mSearchEditText.getText().toString() : null;
if (searchString != null && !searchString.trim().isEmpty()) { if (searchString != null && !searchString.trim().isEmpty()) {
try { try {
@ -284,15 +268,9 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
showCreateConferenceDialog(); showCreateConferenceDialog();
} }
}); });
ActionBar actionBar = getSupportActionBar(); TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); tabLayout.setupWithViewPager(binding.startConversationViewPager);
binding.startConversationViewPager.addOnPageChangeListener(mOnPageChangeListener);
ActionBar.Tab mContactsTab = actionBar.newTab().setText(R.string.contacts).setTabListener(mTabListener);
ActionBar.Tab mConferencesTab = actionBar.newTab().setText(R.string.conferences).setTabListener(mTabListener);
actionBar.addTab(mContactsTab);
actionBar.addTab(mConferencesTab);
binding.startConversationViewPager.setOnPageChangeListener(mOnPageChangeListener);
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager()); mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
binding.startConversationViewPager.setAdapter(mListPagerAdapter); binding.startConversationViewPager.setAdapter(mListPagerAdapter);
@ -540,7 +518,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
MenuItem joinGroupChat = menu.findItem(R.id.action_join_conference); MenuItem joinGroupChat = menu.findItem(R.id.action_join_conference);
MenuItem qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code); MenuItem qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code);
ActionBar bar = getSupportActionBar(); ActionBar bar = getSupportActionBar();
joinGroupChat.setVisible(bar != null && bar.getSelectedNavigationIndex() == 1); joinGroupChat.setVisible(bar != null && binding.startConversationViewPager.getCurrentItem() == 1);
qrCodeScanMenuItem.setVisible(isCameraFeatureAvailable()); qrCodeScanMenuItem.setVisible(isCameraFeatureAvailable());
menuHideOffline.setChecked(this.mHideOfflineContacts); menuHideOffline.setChecked(this.mHideOfflineContacts);
mMenuSearchView = menu.findItem(R.id.action_search); mMenuSearchView = menu.findItem(R.id.action_search);
@ -873,7 +851,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
private void onTabChanged() { private void onTabChanged() {
@DrawableRes final int fabDrawable; @DrawableRes final int fabDrawable;
if (getSupportActionBar().getSelectedNavigationIndex() == 0) { if (binding.startConversationViewPager.getCurrentItem() == 0) {
fabDrawable = R.drawable.ic_person_add_white_24dp; fabDrawable = R.drawable.ic_person_add_white_24dp;
} else { } else {
fabDrawable = R.drawable.ic_group_add_white_24dp; fabDrawable = R.drawable.ic_group_add_white_24dp;
@ -1091,6 +1069,19 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
return ((Fragment) fragment).getView() == view; return ((Fragment) fragment).getView() == view;
} }
@Nullable
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return getResources().getString(R.string.contacts);
case 1:
return getResources().getString(R.string.conferences);
default:
return super.getPageTitle(position);
}
}
public Fragment getItem(int position) { public Fragment getItem(int position) {
assert (0 <= position && position < fragments.length); assert (0 <= position && position < fragments.length);
if (fragments[position] == null) { if (fragments[position] == null) {

View file

@ -5,6 +5,7 @@ import android.content.Intent;
import android.databinding.DataBindingUtil; import android.databinding.DataBindingUtil;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.util.Log; import android.util.Log;
import android.view.Gravity; import android.view.Gravity;
import android.view.Menu; import android.view.Menu;
@ -80,11 +81,8 @@ public class TrustKeysActivity extends OmemoActivity implements OnKeyStatusUpdat
binding.cancelButton.setOnClickListener(mCancelButtonListener); binding.cancelButton.setOnClickListener(mCancelButtonListener);
binding.saveButton.setOnClickListener(mSaveButtonListener); binding.saveButton.setOnClickListener(mSaveButtonListener);
setSupportActionBar((Toolbar) binding.toolbar);
if (getSupportActionBar() != null) { configureActionBar(getSupportActionBar());
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
if (savedInstanceState != null) { if (savedInstanceState != null) {
mUseCameraHintShown.set(savedInstanceState.getBoolean("camera_hint_shown", false)); mUseCameraHintShown.set(savedInstanceState.getBoolean("camera_hint_shown", false));

View file

@ -54,6 +54,8 @@ public class UriHandlerActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
this.handled = savedInstanceState != null && savedInstanceState.getBoolean("handled", false); this.handled = savedInstanceState != null && savedInstanceState.getBoolean("handled", false);
getLayoutInflater().inflate(R.layout.toolbar, findViewById(android.R.id.content));
setSupportActionBar(findViewById(R.id.toolbar));
} }
@Override @Override

View file

@ -50,6 +50,7 @@ public class WelcomeActivity extends XmppActivity {
} }
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.welcome); setContentView(R.layout.welcome);
setSupportActionBar(findViewById(R.id.toolbar));
final ActionBar ab = getSupportActionBar(); final ActionBar ab = getSupportActionBar();
if (ab != null) { if (ab != null) {
ab.setDisplayShowHomeEnabled(false); ab.setDisplayShowHomeEnabled(false);

View file

@ -3,6 +3,7 @@ package eu.siacs.conversations.ui;
import android.Manifest; import android.Manifest;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AlertDialog.Builder; import android.support.v7.app.AlertDialog.Builder;
import android.app.PendingIntent; import android.app.PendingIntent;
@ -36,7 +37,6 @@ 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.ActionBar;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.text.InputType; import android.text.InputType;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
@ -420,10 +420,6 @@ public abstract class XmppActivity extends AppCompatActivity {
this.mUsingEnterKey = usingEnterKey(); this.mUsingEnterKey = usingEnterKey();
mUseSubject = getPreferences().getBoolean("use_subject", getResources().getBoolean(R.bool.use_subject)); mUseSubject = getPreferences().getBoolean("use_subject", getResources().getBoolean(R.bool.use_subject));
final ActionBar ab = getSupportActionBar();
if (ab != null) {
ab.setDisplayHomeAsUpEnabled(true);
}
} }
protected boolean isCameraFeatureAvailable() { protected boolean isCameraFeatureAvailable() {
@ -610,6 +606,13 @@ public abstract class XmppActivity extends AppCompatActivity {
} }
} }
public static void configureActionBar(ActionBar actionBar) {
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
protected boolean noAccountUsesPgp() { protected boolean noAccountUsesPgp() {
if (!hasPgp()) { if (!hasPgp()) {
return true; return true;

View file

@ -3,20 +3,26 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="vertical">
<FrameLayout <include android:id="@+id/toolbar"
android:id="@+id/main_fragment" layout="@layout/toolbar" />
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1000"/>
<FrameLayout <LinearLayout
android:id="@+id/secondary_fragment" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="match_parent">
android:layout_height="match_parent"
android:layout_weight="1618"/>
<FrameLayout
android:id="@+id/main_fragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1000"/>
<FrameLayout
android:id="@+id/secondary_fragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1618"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
</layout> </layout>

View file

@ -1,13 +1,16 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_secondary" android:background="?attr/color_background_secondary"
tools:context="eu.siacs.conversations.ui.AboutActivity"> tools:context="eu.siacs.conversations.ui.AboutActivity"
android:orientation="vertical">
<LinearLayout <include layout="@layout/toolbar" />
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="match_parent">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
@ -28,5 +31,5 @@
android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:typeface="monospace"/> android:typeface="monospace"/>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
</LinearLayout> </ScrollView>
</ScrollView> </LinearLayout>

View file

@ -5,9 +5,12 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_secondary"> android:background="?attr/color_background_secondary">
<include layout="@layout/toolbar" />
<ScrollView <ScrollView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_below="@id/toolbar"
android:layout_above="@+id/button_bar"> android:layout_above="@+id/button_bar">
<android.support.v7.widget.CardView <android.support.v7.widget.CardView

View file

@ -1,24 +1,33 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_primary"> android:orientation="vertical">
<ListView <include android:id="@+id/toolbar"
android:id="@+id/choose_contact_list" layout="@layout/toolbar" />
<FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@android:color/transparent" android:background="?attr/color_background_primary">
android:dividerHeight="0dp"/>
<android.support.design.widget.FloatingActionButton <ListView
android:id="@+id/fab" android:id="@+id/choose_contact_list"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="end|bottom" android:divider="@android:color/transparent"
android:layout_margin="16dp" android:dividerHeight="0dp"/>
android:src="@drawable/ic_person_add_white_24dp"/>
</FrameLayout> <android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:src="@drawable/ic_person_add_white_24dp"/>
</FrameLayout>
</LinearLayout>
</layout> </layout>

View file

@ -1,165 +1,174 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ScrollView <LinearLayout
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="fill_parent" android:layout_height="match_parent"
android:background="?attr/color_background_secondary"> android:background="?attr/color_background_secondary"
android:orientation="vertical">
<LinearLayout <include android:id="@+id/toolbar"
android:id="@+id/details_main_layout" layout="@layout/toolbar" />
<ScrollView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="fill_parent">
android:orientation="vertical">
<android.support.v7.widget.CardView <LinearLayout
android:layout_width="match_parent" android:id="@+id/details_main_layout"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/card_padding_regular">
<QuickContactBadge
android:id="@+id/details_contact_badge"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentTop="true"
android:scaleType="centerCrop"/>
<LinearLayout
android:id="@+id/details_jidbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_toRightOf="@+id/details_contact_badge"
android:orientation="vertical">
<TextView
android:id="@+id/details_contactjid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/account_settings_example_jabber_id"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<com.wefika.flowlayout.FlowLayout
android:id="@+id/tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="-2dp"
android:layout_marginTop="4dp"
android:orientation="horizontal">
</com.wefika.flowlayout.FlowLayout>
<TextView
android:id="@+id/details_lastseen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView
android:id="@+id/status_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<Button
android:id="@+id/add_contact_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/add_contact"/>
<CheckBox
android:id="@+id/details_send_presence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/send_presence_updates"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<CheckBox
android:id="@+id/details_receive_presence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/receive_presence_updates"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</LinearLayout>
<TextView
android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/details_jidbox"
android:layout_marginTop="32dp"
android:text="@string/using_account"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/keys_wrapper"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" android:orientation="vertical">
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout <RelativeLayout
android:id="@+id/details_contact_keys"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:padding="@dimen/card_padding_regular">
android:padding="@dimen/card_padding_list">
</LinearLayout> <QuickContactBadge
android:id="@+id/details_contact_badge"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentTop="true"
android:scaleType="centerCrop"/>
<LinearLayout
android:id="@+id/details_jidbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_toRightOf="@+id/details_contact_badge"
android:orientation="vertical">
<TextView
android:id="@+id/details_contactjid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/account_settings_example_jabber_id"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<com.wefika.flowlayout.FlowLayout
android:id="@+id/tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="-2dp"
android:layout_marginTop="4dp"
android:orientation="horizontal">
</com.wefika.flowlayout.FlowLayout>
<TextView
android:id="@+id/details_lastseen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView
android:id="@+id/status_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<Button
android:id="@+id/add_contact_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/add_contact"/>
<CheckBox
android:id="@+id/details_send_presence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/send_presence_updates"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<CheckBox
android:id="@+id/details_receive_presence"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/receive_presence_updates"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</LinearLayout>
<TextView
android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/details_jidbox"
android:layout_marginTop="32dp"
android:text="@string/using_account"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/keys_wrapper"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:orientation="vertical">
android:orientation="horizontal">
<LinearLayout
<Button android:id="@+id/details_contact_keys"
android:id="@+id/scan_button" android:layout_width="match_parent"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="16dp" android:orientation="vertical"
android:paddingRight="16dp" android:padding="@dimen/card_padding_list">
android:minWidth="0dp" </LinearLayout>
android:text="@string/scan_qr_code"
android:textColor="?attr/colorAccent"/>
<Button <LinearLayout
android:id="@+id/show_inactive_devices"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:paddingLeft="16dp" android:layout_marginTop="8dp"
android:paddingRight="16dp" android:orientation="horizontal">
android:minWidth="0dp"
android:text="@string/show_inactive_devices"
android:textColor="?attr/colorAccent"/> <Button
android:id="@+id/scan_button"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:minWidth="0dp"
android:text="@string/scan_qr_code"
android:textColor="?attr/colorAccent"/>
<Button
android:id="@+id/show_inactive_devices"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:minWidth="0dp"
android:text="@string/show_inactive_devices"
android:textColor="?attr/colorAccent"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </android.support.v7.widget.CardView>
</android.support.v7.widget.CardView> </LinearLayout>
</LinearLayout> </ScrollView>
</LinearLayout>
</ScrollView>
</layout> </layout>

View file

@ -28,8 +28,18 @@
~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--> -->
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout
android:id="@+id/main_fragment" <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"
android:orientation="vertical">
<include android:id="@+id/toolbar"
layout="@layout/toolbar" />
<FrameLayout
android:id="@+id/main_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</layout> </layout>

View file

@ -8,11 +8,14 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_secondary"> android:background="?attr/color_background_secondary">
<include android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView <ScrollView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@+id/button_bar" android:layout_above="@+id/button_bar"
android:layout_alignParentTop="true"> android:layout_below="@id/toolbar">
<LinearLayout <LinearLayout
android:id="@+id/account_main_layout" android:id="@+id/account_main_layout"

View file

@ -3,7 +3,10 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:background="?attr/color_background_primary" > android:background="?attr/color_background_primary"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<ListView <ListView
android:id="@+id/account_list" android:id="@+id/account_list"

View file

@ -2,233 +2,240 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<ScrollView <LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_background_secondary"
android:orientation="vertical">
android:layout_width="fill_parent" <include android:id="@+id/toolbar"
android:layout_height="fill_parent" layout="@layout/toolbar" />
android:background="?attr/color_background_secondary">
<LinearLayout <ScrollView
android:id="@+id/muc_main_layout"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="fill_parent">
android:orientation="vertical">
<android.support.v7.widget.CardView <LinearLayout
android:layout_width="match_parent" android:id="@+id/muc_main_layout"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/card_padding_regular">
<TextView
android:id="@+id/muc_jabberid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:text="@string/account_settings_example_jabber_id"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/your_photo"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentLeft="true"
app:riv_corner_radius="2dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/your_photo"
android:orientation="vertical"
android:paddingLeft="@dimen/avatar_item_distance">
<TextView
android:id="@+id/muc_your_nick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView
android:id="@+id/muc_role"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary"/>
</LinearLayout>
<ImageButton
android:id="@+id/edit_nick_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:alpha="?attr/icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_edit_body"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/muc_settings"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/muc_conference_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/change_conference_button"
android:text="@string/private_conference"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
<ImageButton
android:id="@+id/change_conference_button"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="center_horizontal"
android:alpha="?attr/icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_settings"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/notification_status_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/notification_status_button"
android:text="@string/notify_on_all_messages"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
<ImageButton
android:id="@+id/notification_status_button"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="center_horizontal"
android:alpha="?attr/icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_notifications"/>
</RelativeLayout>
<TableLayout
android:id="@+id/muc_info_more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:shrinkColumns="0"
android:stretchColumns="1"
android:visibility="gone">
<TableRow
android:layout_width="fill_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/server_info_mam"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<TextView
android:id="@+id/muc_info_mam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</TableRow>
</TableLayout>
<TextView
android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="32dp"
android:text="@string/using_account"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"/>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:id="@+id/muc_more_details"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin" android:orientation="vertical">
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout <android.support.v7.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout <LinearLayout
android:id="@+id/muc_members"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/card_padding_list"> android:padding="@dimen/card_padding_regular">
</LinearLayout>
<LinearLayout <TextView
android:layout_width="wrap_content" android:id="@+id/muc_jabberid"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/invite"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="0dp" android:layout_marginBottom="16dp"
android:paddingLeft="16dp" android:text="@string/account_settings_example_jabber_id"
android:paddingRight="16dp" android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
android:text="@string/invite_contact"
android:textColor="?attr/colorAccent"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/your_photo"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentLeft="true"
app:riv_corner_radius="2dp"/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/your_photo"
android:orientation="vertical"
android:paddingLeft="@dimen/avatar_item_distance">
<TextView
android:id="@+id/muc_your_nick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<TextView
android:id="@+id/muc_role"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary"/>
</LinearLayout>
<ImageButton
android:id="@+id/edit_nick_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:alpha="?attr/icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_edit_body"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/muc_settings"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/muc_conference_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/change_conference_button"
android:text="@string/private_conference"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
<ImageButton
android:id="@+id/change_conference_button"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="center_horizontal"
android:alpha="?attr/icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_settings"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/notification_status_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/notification_status_button"
android:text="@string/notify_on_all_messages"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
/>
<ImageButton
android:id="@+id/notification_status_button"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_gravity="center_horizontal"
android:alpha="?attr/icon_alpha"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_notifications"/>
</RelativeLayout>
<TableLayout
android:id="@+id/muc_info_more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:shrinkColumns="0"
android:stretchColumns="1"
android:visibility="gone">
<TableRow
android:layout_width="fill_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:text="@string/server_info_mam"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<TextView
android:id="@+id/muc_info_mam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:paddingLeft="4dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</TableRow>
</TableLayout>
<TextView
android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="32dp"
android:text="@string/using_account"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </android.support.v7.widget.CardView>
</android.support.v7.widget.CardView>
</LinearLayout> <android.support.v7.widget.CardView
</ScrollView> android:id="@+id/muc_more_details"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_marginTop="@dimen/activity_vertical_margin">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/muc_members"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/card_padding_list">
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<Button
android:id="@+id/invite"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="0dp"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:text="@string/invite_contact"
android:textColor="?attr/colorAccent"/>
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout> </layout>

View file

@ -1,12 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout 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:background="?attr/color_background_secondary"> xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?attr/color_background_secondary">
<include layout="@layout/toolbar" />
<android.support.v7.widget.CardView <android.support.v7.widget.CardView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:layout_marginBottom="@dimen/activity_vertical_margin" android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginRight="@dimen/activity_horizontal_margin"

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar" />
<FrameLayout
android:id="@+id/settings_content"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>

View file

@ -2,7 +2,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" > android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<ListView <ListView
android:id="@+id/choose_conversation_list" android:id="@+id/choose_conversation_list"

View file

@ -1,19 +1,38 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" > <layout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<include android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_below="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:elevation="6dp"
app:tabMode="fixed"
app:tabGravity="fill"
app:tabTextColor="@color/white70"
app:tabSelectedTextColor="@color/white"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/start_conversation_view_pager" android:id="@+id/start_conversation_view_pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/tab_layout"
android:background="?attr/color_background_primary"/> android:background="?attr/color_background_primary"/>
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end|bottom" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:src="?attr/icon_add_person" android:src="?attr/icon_add_person"
android:layout_margin="16dp" /> android:layout_margin="16dp" />
</FrameLayout> </RelativeLayout>
</layout> </layout>

View file

@ -1,16 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_secondary"> android:background="?attr/color_background_secondary">
<include android:id="@+id/toolbar"
layout="@layout/toolbar" />
<ScrollView <ScrollView
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_above="@+id/button_bar" android:layout_below="@id/toolbar"
android:layout_alignParentTop="true"> android:layout_above="@+id/button_bar">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,89 +1,97 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent" android:layout_width="match_parent"
android:fillViewport="true"> android:layout_height="match_parent"
<RelativeLayout android:orientation="vertical">
<include layout="@layout/toolbar" />
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/color_background_primary"> android:fillViewport="true">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:minHeight="256dp"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pick_your_username"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/magic_create_text"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:hint="@string/username_hint"
android:inputType="textNoSuggestions"/>
<TextView
android:id="@+id/full_jid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/your_full_jid_will_be"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:visibility="invisible"/>
<Button
android:id="@+id/create_account"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/next"
android:textColor="@color/accent"/>
</LinearLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@+id/linearLayout" android:background="?attr/color_background_primary">
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" <LinearLayout
android:layout_alignParentTop="true"> android:id="@+id/linearLayout"
<ImageView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:minHeight="256dp"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pick_your_username"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/magic_create_text"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:hint="@string/username_hint"
android:inputType="textNoSuggestions"/>
<TextView
android:id="@+id/full_jid"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/your_full_jid_will_be"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:visibility="invisible"/>
<Button
android:id="@+id/create_account"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/next"
android:textColor="@color/accent"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linearLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="8dp"
android:src="@drawable/main_logo"/>
</RelativeLayout>
<TextView
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_alignParentBottom="true"
android:layout_centerVertical="true" android:textColor="?android:textColorSecondary"
android:padding="8dp" android:textSize="@dimen/fineprint_size"
android:src="@drawable/main_logo"/> android:maxLines="1"
android:text="@string/free_for_six_month"
android:layout_centerHorizontal="true"/>
</RelativeLayout> </RelativeLayout>
<TextView </ScrollView>
android:paddingLeft="8dp" </LinearLayout>
android:paddingRight="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/fineprint_size"
android:maxLines="1"
android:text="@string/free_for_six_month"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
</ScrollView>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:elevation="6dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" />

View file

@ -1,82 +1,89 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:layout_width="match_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent" android:layout_width="match_parent"
android:fillViewport="true"> android:layout_height="match_parent"
<RelativeLayout android:orientation="vertical">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_background_primary">
<LinearLayout <include layout="@layout/toolbar" />
android:id="@+id/linearLayout"
android:layout_width="match_parent" <ScrollView android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_alignParentBottom="true" android:fillViewport="true">
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:minHeight="256dp"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_header"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/welcome_text"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<Button
android:id="@+id/create_account"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/create_account"
android:textColor="@color/accent"/>
<Button
android:id="@+id/use_own_provider"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/use_own_provider"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@+id/linearLayout" android:background="?attr/color_background_primary">
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" <LinearLayout
android:layout_alignParentTop="true"> android:id="@+id/linearLayout"
<ImageView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:minHeight="256dp"
android:orientation="vertical"
android:paddingBottom="10dp"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_header"
android:textAppearance="@style/TextAppearance.AppCompat.Title"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/welcome_text"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<Button
android:id="@+id/create_account"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/create_account"
android:textColor="@color/accent"/>
<Button
android:id="@+id/use_own_provider"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:text="@string/use_own_provider"
android:textColor="?android:textColorSecondary"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/linearLayout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:padding="8dp"
android:src="@drawable/main_logo"/>
</RelativeLayout>
<TextView
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_alignParentBottom="true"
android:layout_centerVertical="true" android:textColor="?android:attr/textColorSecondary"
android:padding="8dp" android:textSize="@dimen/fineprint_size"
android:src="@drawable/main_logo"/> android:maxLines="1"
android:text="@string/free_for_six_month"
android:layout_centerHorizontal="true"/>
</RelativeLayout> </RelativeLayout>
<TextView </ScrollView>
android:paddingLeft="8dp" </LinearLayout>
android:paddingRight="8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/fineprint_size"
android:maxLines="1"
android:text="@string/free_for_six_month"
android:layout_centerHorizontal="true"/>
</RelativeLayout>
</ScrollView>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="ConversationsTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="ConversationsTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/primary500</item> <item name="colorPrimary">@color/primary500</item>
<item name="colorPrimaryDark">@color/primary700</item> <item name="colorPrimaryDark">@color/primary700</item>
<item name="colorAccent">@color/accent</item> <item name="colorAccent">@color/accent</item>
@ -10,7 +10,7 @@
<item name="color_background_secondary">@color/grey200</item> <item name="color_background_secondary">@color/grey200</item>
<item name="color_warning">@color/red_a700</item> <item name="color_warning">@color/red_a700</item>
<item name="android:windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">@color/accent</item> <item name="android:actionModeBackground">@color/accent</item>
<item name="TextSizeInfo">12sp</item> <item name="TextSizeInfo">12sp</item>
@ -77,7 +77,7 @@
<item type="reference" name="icon_enable_undecided_device">@drawable/ic_new_releases_black_24dp</item> <item type="reference" name="icon_enable_undecided_device">@drawable/ic_new_releases_black_24dp</item>
</style> </style>
<style name="ConversationsTheme.Dark" parent="Theme.AppCompat"> <style name="ConversationsTheme.Dark" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">@color/primary800</item> <item name="colorPrimary">@color/primary800</item>
<item name="colorPrimaryDark">@color/primary900</item> <item name="colorPrimaryDark">@color/primary900</item>
<item name="colorAccent">@color/accent</item> <item name="colorAccent">@color/accent</item>
@ -87,7 +87,7 @@
<item name="color_background_secondary">@color/grey900</item> <item name="color_background_secondary">@color/grey900</item>
<item name="color_warning">@color/red_a100</item> <item name="color_warning">@color/red_a100</item>
<item name="android:windowActionModeOverlay">true</item> <item name="windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">@color/accent</item> <item name="android:actionModeBackground">@color/accent</item>
<item name="TextSizeInfo">12sp</item> <item name="TextSizeInfo">12sp</item>