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:
parent
83a4cb8a11
commit
f2885575ba
|
@ -6,6 +6,8 @@ import android.support.v7.app.AppCompatActivity;
|
|||
|
||||
import eu.siacs.conversations.R;
|
||||
|
||||
import static eu.siacs.conversations.ui.XmppActivity.configureActionBar;
|
||||
|
||||
public class AboutActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
|
@ -18,5 +20,7 @@ public class AboutActivity extends AppCompatActivity {
|
|||
setTheme(mTheme);
|
||||
|
||||
setContentView(R.layout.activity_about);
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.siacs.conversations.ui;
|
|||
import android.content.Context;
|
||||
import android.databinding.DataBindingUtil;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.Menu;
|
||||
|
@ -95,6 +96,8 @@ public abstract class AbstractSearchableListItemActivity extends XmppActivity {
|
|||
public void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.binding = DataBindingUtil.setContentView(this,R.layout.activity_choose_contact);
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
this.binding.chooseContactList.setFastScrollEnabled(true);
|
||||
mListItemsAdapter = new ListItemAdapter(this, listItems);
|
||||
this.binding.chooseContactList.setAdapter(mListItemsAdapter);
|
||||
|
|
|
@ -60,6 +60,8 @@ public class ChangePasswordActivity extends XmppActivity implements XmppConnecti
|
|||
protected void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_change_password);
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
Button mCancelButton = findViewById(R.id.left_button);
|
||||
mCancelButton.setOnClickListener(view -> finish());
|
||||
this.mChangePasswordButton = findViewById(R.id.right_button);
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.graphics.drawable.BitmapDrawable;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -226,10 +227,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
|||
this.binding.mucMoreDetails.setVisibility(View.GONE);
|
||||
this.binding.changeConferenceButton.setOnClickListener(this.mChangeConferenceSettings);
|
||||
this.binding.invite.setOnClickListener(inviteListener);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
this.binding.editNickButton.setOnClickListener(v -> quickEdit(mConversation.getMucOptions().getActualNick(),
|
||||
0,
|
||||
value -> {
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.provider.ContactsContract.CommonDataKinds;
|
|||
import android.provider.ContactsContract.Contacts;
|
||||
import android.provider.ContactsContract.Intents;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -190,10 +191,8 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
|||
this.messageFingerprint = getIntent().getStringExtra("fingerprint");
|
||||
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_contact_details);
|
||||
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
binding.showInactiveDevices.setOnClickListener(v -> {
|
||||
showInactiveOmemo = !showInactiveOmemo;
|
||||
populateView();
|
||||
|
|
|
@ -48,6 +48,7 @@ import android.support.annotation.IdRes;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
@ -364,6 +365,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
|||
super.onCreate(savedInstanceState);
|
||||
new EmojiService(this).init();
|
||||
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations);
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
this.getFragmentManager().addOnBackStackChangedListener(this::invalidateActionBarTitle);
|
||||
this.getFragmentManager().addOnBackStackChangedListener(this::showDialogsIfMainIsOverview);
|
||||
this.initializeFragments();
|
||||
|
|
|
@ -20,6 +20,7 @@ import android.support.design.widget.TextInputLayout;
|
|||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AlertDialog.Builder;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
|
@ -536,6 +537,8 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
|
|||
this.mSavedInstanceInit = savedInstanceState.getBoolean("initMode", false);
|
||||
}
|
||||
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_edit_account);
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
binding.accountJid.addTextChangedListener(this.mTextWatcher);
|
||||
binding.accountJid.setOnFocusChangeListener(this.mEditTextFocusListener);
|
||||
this.mAccountJidLayout = (TextInputLayout) findViewById(R.id.account_jid_layout);
|
||||
|
|
|
@ -53,6 +53,8 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher {
|
|||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.magic_create);
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
mFullJidDisplay = findViewById(R.id.full_jid);
|
||||
mUsername = findViewById(R.id.username);
|
||||
mRandom = new SecureRandom();
|
||||
|
|
|
@ -74,7 +74,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
|||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_manage_accounts);
|
||||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
if (savedInstanceState != null) {
|
||||
String jid = savedInstanceState.getString(STATE_SELECTED_ACCOUNT);
|
||||
if (jid != null) {
|
||||
|
|
|
@ -41,7 +41,7 @@ import eu.siacs.conversations.R;
|
|||
import eu.siacs.conversations.entities.MTMDecision;
|
||||
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());
|
||||
|
||||
|
@ -54,6 +54,8 @@ public class MemorizingActivity extends AppCompatActivity implements OnClickList
|
|||
LOGGER.log(Level.FINE, "onCreate");
|
||||
setTheme(findTheme());
|
||||
super.onCreate(savedInstanceState);
|
||||
getLayoutInflater().inflate(R.layout.toolbar, findViewById(android.R.id.content));
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -94,6 +94,9 @@ public class PublishProfilePictureActivity extends XmppActivity implements XmppC
|
|||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_publish_profile_picture);
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
|
||||
this.avatar = findViewById(R.id.account_image);
|
||||
this.cancelButton = findViewById(R.id.cancel_button);
|
||||
this.publishButton = findViewById(R.id.publish_button);
|
||||
|
|
|
@ -19,6 +19,8 @@ import android.preference.PreferenceManager;
|
|||
import android.preference.PreferenceScreen;
|
||||
import android.provider.MediaStore;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -57,18 +59,19 @@ public class SettingsActivity extends XmppActivity implements
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_settings);
|
||||
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)) {
|
||||
mSettingsFragment = new SettingsFragment();
|
||||
fm.beginTransaction().replace(android.R.id.content, mSettingsFragment).commit();
|
||||
fm.beginTransaction().replace(R.id.settings_content, mSettingsFragment).commit();
|
||||
}
|
||||
mSettingsFragment.setActivityIntent(getIntent());
|
||||
|
||||
this.mTheme = findTheme();
|
||||
setTheme(this.mTheme);
|
||||
getWindow().getDecorView().setBackgroundColor(Color.get(this, R.attr.color_background_primary));
|
||||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -43,7 +43,8 @@ public class ShareViaAccountActivity extends XmppActivity {
|
|||
super.onCreate(savedInstanceState);
|
||||
|
||||
setContentView(R.layout.activity_manage_accounts);
|
||||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
configureActionBar(getSupportActionBar());
|
||||
accountListView = (ListView) findViewById(R.id.account_list);
|
||||
this.mAccountAdapter = new AccountAdapter(this, accountList, false);
|
||||
accountListView.setAdapter(this.mAccountAdapter);
|
||||
|
|
|
@ -157,12 +157,15 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
new EmojiService(this).init();
|
||||
|
||||
setContentView(R.layout.activity_share_with);
|
||||
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
|
||||
getSupportActionBar().setHomeButtonEnabled(false);
|
||||
}
|
||||
|
||||
setContentView(R.layout.activity_share_with);
|
||||
setTitle(getString(R.string.title_activity_sharewith));
|
||||
|
||||
mListView = findViewById(R.id.choose_conversation_list);
|
||||
|
|
|
@ -9,6 +9,8 @@ import android.graphics.drawable.Drawable;
|
|||
import android.support.annotation.AttrRes;
|
||||
import android.support.annotation.DrawableRes;
|
||||
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.v7.app.AlertDialog;
|
||||
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.ViewPager;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.text.Editable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
|
@ -141,7 +144,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
|||
private TextView.OnEditorActionListener mSearchDone = new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
int pos = getSupportActionBar().getSelectedNavigationIndex();
|
||||
int pos = binding.startConversationViewPager.getCurrentItem();
|
||||
if (pos == 0) {
|
||||
if (contacts.size() == 1) {
|
||||
openConversationForContact((Contact) contacts.get(0));
|
||||
|
@ -193,31 +196,9 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
|||
}
|
||||
};
|
||||
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() {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setSelectedNavigationItem(position);
|
||||
}
|
||||
onTabChanged();
|
||||
}
|
||||
};
|
||||
|
@ -265,8 +246,11 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
|||
super.onCreate(savedInstanceState);
|
||||
new EmojiService(this).init();
|
||||
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation);
|
||||
Toolbar toolbar = (Toolbar) binding.toolbar;
|
||||
setSupportActionBar(toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
this.binding.fab.setOnClickListener((v) -> {
|
||||
if (getSupportActionBar().getSelectedNavigationIndex() == 0) {
|
||||
if (binding.startConversationViewPager.getCurrentItem() == 0) {
|
||||
String searchString = mSearchEditText != null ? mSearchEditText.getText().toString() : null;
|
||||
if (searchString != null && !searchString.trim().isEmpty()) {
|
||||
try {
|
||||
|
@ -284,15 +268,9 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
|||
showCreateConferenceDialog();
|
||||
}
|
||||
});
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
|
||||
|
||||
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);
|
||||
TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
|
||||
tabLayout.setupWithViewPager(binding.startConversationViewPager);
|
||||
binding.startConversationViewPager.addOnPageChangeListener(mOnPageChangeListener);
|
||||
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
|
||||
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 qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code);
|
||||
ActionBar bar = getSupportActionBar();
|
||||
joinGroupChat.setVisible(bar != null && bar.getSelectedNavigationIndex() == 1);
|
||||
joinGroupChat.setVisible(bar != null && binding.startConversationViewPager.getCurrentItem() == 1);
|
||||
qrCodeScanMenuItem.setVisible(isCameraFeatureAvailable());
|
||||
menuHideOffline.setChecked(this.mHideOfflineContacts);
|
||||
mMenuSearchView = menu.findItem(R.id.action_search);
|
||||
|
@ -873,7 +851,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
|||
|
||||
private void onTabChanged() {
|
||||
@DrawableRes final int fabDrawable;
|
||||
if (getSupportActionBar().getSelectedNavigationIndex() == 0) {
|
||||
if (binding.startConversationViewPager.getCurrentItem() == 0) {
|
||||
fabDrawable = R.drawable.ic_person_add_white_24dp;
|
||||
} else {
|
||||
fabDrawable = R.drawable.ic_group_add_white_24dp;
|
||||
|
@ -1091,6 +1069,19 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
|||
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) {
|
||||
assert (0 <= position && position < fragments.length);
|
||||
if (fragments[position] == null) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Intent;
|
|||
import android.databinding.DataBindingUtil;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.Menu;
|
||||
|
@ -80,11 +81,8 @@ public class TrustKeysActivity extends OmemoActivity implements OnKeyStatusUpdat
|
|||
binding.cancelButton.setOnClickListener(mCancelButtonListener);
|
||||
binding.saveButton.setOnClickListener(mSaveButtonListener);
|
||||
|
||||
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
setSupportActionBar((Toolbar) binding.toolbar);
|
||||
configureActionBar(getSupportActionBar());
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
mUseCameraHintShown.set(savedInstanceState.getBoolean("camera_hint_shown", false));
|
||||
|
|
|
@ -54,6 +54,8 @@ public class UriHandlerActivity extends AppCompatActivity {
|
|||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.handled = savedInstanceState != null && savedInstanceState.getBoolean("handled", false);
|
||||
getLayoutInflater().inflate(R.layout.toolbar, findViewById(android.R.id.content));
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -50,6 +50,7 @@ public class WelcomeActivity extends XmppActivity {
|
|||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.welcome);
|
||||
setSupportActionBar(findViewById(R.id.toolbar));
|
||||
final ActionBar ab = getSupportActionBar();
|
||||
if (ab != null) {
|
||||
ab.setDisplayShowHomeEnabled(false);
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.siacs.conversations.ui;
|
|||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.app.AlertDialog.Builder;
|
||||
import android.app.PendingIntent;
|
||||
|
@ -36,7 +37,6 @@ import android.os.PowerManager;
|
|||
import android.os.SystemClock;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.InputType;
|
||||
import android.util.DisplayMetrics;
|
||||
|
@ -420,10 +420,6 @@ public abstract class XmppActivity extends AppCompatActivity {
|
|||
|
||||
this.mUsingEnterKey = usingEnterKey();
|
||||
mUseSubject = getPreferences().getBoolean("use_subject", getResources().getBoolean(R.bool.use_subject));
|
||||
final ActionBar ab = getSupportActionBar();
|
||||
if (ab != null) {
|
||||
ab.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
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() {
|
||||
if (!hasPgp()) {
|
||||
return true;
|
||||
|
|
|
@ -3,20 +3,26 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1000"/>
|
||||
<include android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/secondary_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1618"/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<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>
|
||||
|
||||
</layout>
|
|
@ -1,13 +1,16 @@
|
|||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary"
|
||||
tools:context="eu.siacs.conversations.ui.AboutActivity">
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary"
|
||||
tools:context="eu.siacs.conversations.ui.AboutActivity"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -28,5 +31,5 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
android:typeface="monospace"/>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
|
@ -5,9 +5,12 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_above="@+id/button_bar">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
|
|
|
@ -1,24 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<FrameLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_primary">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/choose_contact_list"
|
||||
<include android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
android:background="?attr/color_background_primary">
|
||||
|
||||
<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>
|
||||
<ListView
|
||||
android:id="@+id/choose_contact_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="0dp"/>
|
||||
|
||||
<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>
|
|
@ -1,165 +1,174 @@
|
|||
<?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
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?attr/color_background_secondary">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/details_main_layout"
|
||||
<include android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_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">
|
||||
|
||||
<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"
|
||||
<LinearLayout
|
||||
android:id="@+id/details_main_layout"
|
||||
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">
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
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
|
||||
android:id="@+id/details_contact_keys"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding_list">
|
||||
</LinearLayout>
|
||||
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_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="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/scan_button"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/details_contact_keys"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:minWidth="0dp"
|
||||
android:text="@string/scan_qr_code"
|
||||
android:textColor="?attr/colorAccent"/>
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding_list">
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/show_inactive_devices"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
<LinearLayout
|
||||
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"/>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<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>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</android.support.v7.widget.CardView>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
|
|
@ -28,8 +28,18 @@
|
|||
~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-->
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<FrameLayout
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="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>
|
|
@ -8,11 +8,14 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary">
|
||||
|
||||
<include android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/button_bar"
|
||||
android:layout_alignParentTop="true">
|
||||
android:layout_below="@id/toolbar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/account_main_layout"
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="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
|
||||
android:id="@+id/account_list"
|
||||
|
|
|
@ -2,233 +2,240 @@
|
|||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="?attr/color_background_secondary">
|
||||
<include android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/muc_main_layout"
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_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"
|
||||
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"
|
||||
<LinearLayout
|
||||
android:id="@+id/muc_main_layout"
|
||||
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">
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<android.support.v7.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
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
|
||||
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>
|
||||
android:padding="@dimen/card_padding_regular">
|
||||
|
||||
<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"
|
||||
<TextView
|
||||
android:id="@+id/muc_jabberid"
|
||||
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"/>
|
||||
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>
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
<android.support.v7.widget.CardView
|
||||
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>
|
|
@ -1,12 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
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:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||
android:layout_marginLeft="@dimen/activity_horizontal_margin"
|
||||
android:layout_marginRight="@dimen/activity_horizontal_margin"
|
||||
|
|
12
src/main/res/layout/activity_settings.xml
Normal file
12
src/main/res/layout/activity_settings.xml
Normal 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>
|
|
@ -2,7 +2,11 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
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
|
||||
android:id="@+id/choose_conversation_list"
|
||||
|
|
|
@ -1,19 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<FrameLayout
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<RelativeLayout
|
||||
android:layout_width="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:id="@+id/start_conversation_view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/tab_layout"
|
||||
android:background="?attr/color_background_primary"/>
|
||||
<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_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:src="?attr/icon_add_person"
|
||||
android:layout_margin="16dp" />
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
</layout>
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
<?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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_secondary">
|
||||
|
||||
<include android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/button_bar"
|
||||
android:layout_alignParentTop="true">
|
||||
android:layout_below="@id/toolbar"
|
||||
android:layout_above="@+id/button_bar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -1,89 +1,97 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_primary">
|
||||
|
||||
<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>
|
||||
android:fillViewport="true">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/linearLayout"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true">
|
||||
<ImageView
|
||||
android:background="?attr/color_background_primary">
|
||||
|
||||
<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
|
||||
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_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/main_logo"/>
|
||||
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>
|
||||
<TextView
|
||||
android:paddingLeft="8dp"
|
||||
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>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
|
11
src/main/res/layout/toolbar.xml
Normal file
11
src/main/res/layout/toolbar.xml
Normal 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" />
|
|
@ -1,82 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_background_primary">
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<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/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>
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<ScrollView android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/linearLayout"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true">
|
||||
<ImageView
|
||||
android:background="?attr/color_background_primary">
|
||||
|
||||
<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/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_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/main_logo"/>
|
||||
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>
|
||||
<TextView
|
||||
android:paddingLeft="8dp"
|
||||
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>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="colorPrimaryDark">@color/primary700</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<item name="color_background_secondary">@color/grey200</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="TextSizeInfo">12sp</item>
|
||||
|
@ -77,7 +77,7 @@
|
|||
<item type="reference" name="icon_enable_undecided_device">@drawable/ic_new_releases_black_24dp</item>
|
||||
</style>
|
||||
|
||||
<style name="ConversationsTheme.Dark" parent="Theme.AppCompat">
|
||||
<style name="ConversationsTheme.Dark" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="colorPrimary">@color/primary800</item>
|
||||
<item name="colorPrimaryDark">@color/primary900</item>
|
||||
<item name="colorAccent">@color/accent</item>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<item name="color_background_secondary">@color/grey900</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="TextSizeInfo">12sp</item>
|
||||
|
|
Loading…
Reference in a new issue