aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-11 21:43:38 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-11 21:43:38 +0200
commit1046acb3e192c940dc99ebb564ec2756493ec987 (patch)
tree5448f272fd7a0ca261785686ac66dfaf39f1c518 /src
parent551f63b73c170a309108c7d3dc8839e6ada86596 (diff)
replace deprecated action bar with toolbar
* 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
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/AboutActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java7
-rw-r--r--src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java7
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationsActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/LocationActivity.java6
-rw-r--r--src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/MemorizingActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/SettingsActivity.java14
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java101
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareWithActivity.java5
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java122
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java60
-rw-r--r--src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java8
-rw-r--r--src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/WelcomeActivity.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java11
-rw-r--r--src/main/res/layout-w945dp/activity_conversations.xml32
-rw-r--r--src/main/res/layout/activity_about.xml102
-rw-r--r--src/main/res/layout/activity_change_password.xml5
-rw-r--r--src/main/res/layout/activity_choose_contact.xml38
-rw-r--r--src/main/res/layout/activity_contact_details.xml433
-rw-r--r--src/main/res/layout/activity_conversations.xml16
-rw-r--r--src/main/res/layout/activity_edit_account.xml30
-rw-r--r--src/main/res/layout/activity_manage_accounts.xml5
-rw-r--r--src/main/res/layout/activity_muc_details.xml445
-rw-r--r--src/main/res/layout/activity_publish_profile_picture.xml5
-rw-r--r--src/main/res/layout/activity_settings.xml13
-rw-r--r--src/main/res/layout/activity_share_locaction.xml154
-rw-r--r--src/main/res/layout/activity_share_with.xml2
-rw-r--r--src/main/res/layout/activity_show_locaction.xml23
-rw-r--r--src/main/res/layout/activity_start_conversation.xml39
-rw-r--r--src/main/res/layout/activity_trust_keys.xml6
-rw-r--r--src/main/res/layout/magic_create.xml145
-rw-r--r--src/main/res/layout/toolbar.xml11
-rw-r--r--src/main/res/layout/welcome.xml168
-rw-r--r--src/main/res/values/themes.xml8
-rw-r--r--src/main/res/xml/preferences.xml40
43 files changed, 1163 insertions, 927 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/AboutActivity.java b/src/main/java/de/pixart/messenger/ui/AboutActivity.java
index e00707d96..ac8b72ec0 100644
--- a/src/main/java/de/pixart/messenger/ui/AboutActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/AboutActivity.java
@@ -5,11 +5,15 @@ import android.support.v7.app.AppCompatActivity;
import de.pixart.messenger.R;
+import static de.pixart.messenger.ui.XmppActivity.configureActionBar;
+
public class AboutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
+ setSupportActionBar(findViewById(R.id.toolbar));
+ configureActionBar(getSupportActionBar());
}
}
diff --git a/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java b/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java
index 059df9bb8..91dc52ecf 100644
--- a/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/AbstractSearchableListItemActivity.java
@@ -3,6 +3,7 @@ package de.pixart.messenger.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);
diff --git a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java
index cbf9aaec5..ca4c01183 100644
--- a/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ChangePasswordActivity.java
@@ -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);
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
index 119f06fc1..5dab8b9e7 100644
--- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java
@@ -14,6 +14,7 @@ import android.os.AsyncTask;
import android.os.Bundle;
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.ContextMenu;
import android.view.LayoutInflater;
@@ -278,10 +279,8 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
this.binding.destroy.setOnClickListener(destroyListener);
this.binding.destroy.getBackground().setColorFilter(getWarningButtonColor(), PorterDuff.Mode.MULTIPLY);
this.binding.mucMoreDetails.setVisibility(View.GONE);
- 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 -> {
diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
index 841961a14..42d7ab8da 100644
--- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java
@@ -15,6 +15,7 @@ import android.provider.ContactsContract.Intents;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
+import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -254,10 +255,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();
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
index 69deb91e3..cb2bfa807 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java
@@ -50,6 +50,7 @@ import android.provider.Settings;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.v7.app.ActionBar;
+import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -425,6 +426,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
super.onCreate(savedInstanceState);
new EmojiService(this).init(useBundledEmoji());
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();
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 8985c19cf..74e2910c6 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -20,6 +20,7 @@ import android.support.design.widget.TextInputLayout;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
+import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
@@ -544,6 +545,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());
this.binding.accountJid.addTextChangedListener(this.mTextWatcher);
this.binding.accountJid.setOnFocusChangeListener(this.mEditTextFocusListener);
this.mAccountJidLayout = (TextInputLayout) findViewById(R.id.account_jid_layout);
diff --git a/src/main/java/de/pixart/messenger/ui/LocationActivity.java b/src/main/java/de/pixart/messenger/ui/LocationActivity.java
index ccf28bdf2..1e5f2a643 100644
--- a/src/main/java/de/pixart/messenger/ui/LocationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/LocationActivity.java
@@ -9,7 +9,7 @@ import android.support.v7.app.AppCompatActivity;
import de.pixart.messenger.Config;
-public abstract class LocationActivity extends AppCompatActivity implements LocationListener {
+public abstract class LocationActivity extends XmppActivity implements LocationListener {
private LocationManager locationManager;
@Override
@@ -51,13 +51,13 @@ public abstract class LocationActivity extends AppCompatActivity implements Loca
}
@Override
- protected void onPause() {
+ public void onPause() {
super.onPause();
pauseLocationUpdates();
}
@Override
- protected void onResume() {
+ public void onResume() {
super.onResume();
this.setmLastLocation(null);
diff --git a/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java b/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java
index 8c758be6d..90531b0fd 100644
--- a/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/MagicCreateActivity.java
@@ -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();
diff --git a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java
index 9513c2fca..a5ca8a7b6 100644
--- a/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ManageAccountActivity.java
@@ -75,6 +75,8 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
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) {
diff --git a/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java b/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java
index 8172e6f9c..2d9a2b499 100644
--- a/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/MemorizingActivity.java
@@ -53,6 +53,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
diff --git a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
index 1dd23a3de..f59e9b30c 100644
--- a/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/PublishProfilePictureActivity.java
@@ -95,6 +95,8 @@ 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);
diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
index eaefb1fa2..aa7407c32 100644
--- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
@@ -58,29 +58,28 @@ public class SettingsActivity extends XmppActivity implements
public static final String USE_MULTI_ACCOUNTS = "use_multi_accounts";
public static final int REQUEST_WRITE_LOGS = 0xbf8701;
- private SettingsFragment mSettingsFragment;
-
Preference multiAccountPreference;
Preference BundledEmojiPreference;
-
boolean isMultiAccountChecked = false;
boolean isBundledEmojiChecked;
+ private SettingsFragment mSettingsFragment;
@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
@@ -434,7 +433,6 @@ public class SettingsActivity extends XmppActivity implements
}
-
@Override
public void onStop() {
super.onStop();
diff --git a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java
index 510135c5a..9ad877db1 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareLocationActivity.java
@@ -37,14 +37,47 @@ public class ShareLocationActivity extends LocationActivity implements LocationL
private String mLocationName;
private RelativeLayout mSnackbar;
+ private static String getAddress(Context context, Location location) {
+ double longitude = location.getLongitude();
+ double latitude = location.getLatitude();
+ String address = "";
+ if (latitude != 0 && longitude != 0) {
+ Geocoder geoCoder = new Geocoder(context, Locale.getDefault());
+ try {
+ List<Address> addresses = geoCoder.getFromLocation(latitude, longitude, 1);
+ if (addresses != null && addresses.size() > 0) {
+ Address Address = addresses.get(0);
+ StringBuilder strAddress = new StringBuilder("");
+
+ if (Address.getAddressLine(0).length() > 0) {
+ strAddress.append(Address.getAddressLine(0));
+ }
+ address = strAddress.toString().replace(", ", "<br>");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return address;
+ }
+
+ @Override
+ protected void refreshUiReal() {
+
+ }
+
+ @Override
+ void onBackendConnected() {
+
+ }
+
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_share_locaction);
- if (getSupportActionBar() != null) {
- getSupportActionBar().setHomeButtonEnabled(true);
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- }
+ setTitle(getString(R.string.share_location));
+ setSupportActionBar(findViewById(R.id.toolbar));
+ configureActionBar(getSupportActionBar());
locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
mLocationName = getString(R.string.me);
@@ -87,12 +120,12 @@ public class ShareLocationActivity extends LocationActivity implements LocationL
}
@Override
- protected void onPause() {
+ public void onPause() {
super.onPause();
}
@Override
- protected void onResume() {
+ public void onResume() {
super.onResume();
if (isLocationEnabled()) {
this.mSnackbar.setVisibility(View.GONE);
@@ -145,7 +178,7 @@ public class ShareLocationActivity extends LocationActivity implements LocationL
}
private boolean isLocationEnabled() {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return isLocationEnabledKitkat();
} else {
return isLocationEnabledLegacy();
@@ -164,28 +197,22 @@ public class ShareLocationActivity extends LocationActivity implements LocationL
}
}
- private static String getAddress(Context context, Location location) {
- double longitude = location.getLongitude();
- double latitude = location.getLatitude();
- String address = "";
- if (latitude != 0 && longitude != 0) {
- Geocoder geoCoder = new Geocoder(context, Locale.getDefault());
- try {
- List<Address> addresses = geoCoder.getFromLocation(latitude, longitude, 1);
- if (addresses != null && addresses.size() > 0) {
- Address Address = addresses.get(0);
- StringBuilder strAddress = new StringBuilder("");
-
- if (Address.getAddressLine(0).length() > 0) {
- strAddress.append(Address.getAddressLine(0));
- }
- address = strAddress.toString().replace(", ", "<br>");
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
+ private void showLocation(@Nullable Location location, @Nullable String address) {
+ if (location == null && TextUtils.isEmpty(address)) { // no location and no address available
+ final WebView webView = findViewById(R.id.webView);
+ webView.getSettings().setJavaScriptEnabled(true);
+ webView.loadUrl("file:///android_asset/map.html");
+ } else if (location != null && TextUtils.isEmpty(address)) { // location but no address available
+ String LocationName = "<b>" + mLocationName + "</b>";
+ final WebView webView = findViewById(R.id.webView);
+ webView.getSettings().setJavaScriptEnabled(true);
+ webView.loadUrl("file:///android_asset/map.html?lat=" + mLastLocation.getLatitude() + "&lon=" + mLastLocation.getLongitude() + "&name=" + LocationName);
+ } else if (location != null && !TextUtils.isEmpty(address)) { // location and address available
+ String LocationName = "<b>" + mLocationName + "</b><br>" + address;
+ final WebView webView = findViewById(R.id.webView);
+ webView.getSettings().setJavaScriptEnabled(true);
+ webView.loadUrl("file:///android_asset/map.html?lat=" + mLastLocation.getLatitude() + "&lon=" + mLastLocation.getLongitude() + "&name=" + LocationName);
}
- return address;
}
private class getAddressAsync extends AsyncTask<Void, Void, Void> {
@@ -215,22 +242,4 @@ public class ShareLocationActivity extends LocationActivity implements LocationL
showLocation(mLastLocation, address);
}
}
-
- private void showLocation (@Nullable Location location, @Nullable String address) {
- if (location == null && TextUtils.isEmpty(address)) { // no location and no address available
- final WebView webView = findViewById(R.id.webView);
- webView.getSettings().setJavaScriptEnabled(true);
- webView.loadUrl("file:///android_asset/map.html");
- } else if (location != null && TextUtils.isEmpty(address)) { // location but no address available
- String LocationName = "<b>" + mLocationName + "</b>";
- final WebView webView = findViewById(R.id.webView);
- webView.getSettings().setJavaScriptEnabled(true);
- webView.loadUrl("file:///android_asset/map.html?lat=" + mLastLocation.getLatitude() + "&lon=" + mLastLocation.getLongitude() + "&name=" + LocationName);
- } else if (location != null && !TextUtils.isEmpty(address)) { // location and address available
- String LocationName = "<b>" + mLocationName + "</b><br>" + address;
- final WebView webView = findViewById(R.id.webView);
- webView.getSettings().setJavaScriptEnabled(true);
- webView.loadUrl("file:///android_asset/map.html?lat=" + mLastLocation.getLatitude() + "&lon=" + mLastLocation.getLongitude() + "&name=" + LocationName);
- }
- }
}
diff --git a/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
index 74892ed93..7aa0d3f64 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
@@ -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 = findViewById(R.id.account_list);
this.mAccountAdapter = new AccountAdapter(this, accountList);
accountListView.setAdapter(this.mAccountAdapter);
diff --git a/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java b/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java
index 864653052..55b392e97 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareWithActivity.java
@@ -162,12 +162,15 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
super.onCreate(savedInstanceState);
boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
new EmojiService(this).init(useBundledEmoji);
+
+ 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);
diff --git a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
index 2661589d8..7c9318fa5 100644
--- a/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShowLocationActivity.java
@@ -11,7 +11,6 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuInflater;
@@ -30,20 +29,43 @@ import de.pixart.messenger.services.EmojiService;
import static de.pixart.messenger.ui.SettingsActivity.USE_BUNDLED_EMOJIS;
-public class ShowLocationActivity extends AppCompatActivity {
+public class ShowLocationActivity extends XmppActivity {
private Location location;
private String mLocationName;
+ private static String getAddress(Context context, Location location) {
+ double longitude = location.getLongitude();
+ double latitude = location.getLatitude();
+ String address = "";
+ if (latitude != 0 && longitude != 0) {
+ Geocoder geoCoder = new Geocoder(context, Locale.getDefault());
+ try {
+ List<Address> addresses = geoCoder.getFromLocation(latitude, longitude, 1);
+ if (addresses != null && addresses.size() > 0) {
+ Address Address = addresses.get(0);
+ StringBuilder strAddress = new StringBuilder("");
+
+ if (Address.getAddressLine(0).length() > 0) {
+ strAddress.append(Address.getAddressLine(0));
+ }
+ address = strAddress.toString().replace(", ", "<br>");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return address;
+ }
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
boolean useBundledEmoji = getPreferences().getBoolean(USE_BUNDLED_EMOJIS, getResources().getBoolean(R.bool.use_bundled_emoji));
new EmojiService(this).init(useBundledEmoji);
- if (getSupportActionBar() != null) {
- getSupportActionBar().setHomeButtonEnabled(true);
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- }
setContentView(R.layout.activity_show_locaction);
+ setTitle(getString(R.string.show_location));
+ setSupportActionBar(findViewById(R.id.toolbar));
+ configureActionBar(getSupportActionBar());
Intent intent = getIntent();
@@ -66,61 +88,21 @@ public class ShowLocationActivity extends AppCompatActivity {
new getAddressAsync(this).execute();
}
}
- private class getAddressAsync extends AsyncTask<Void, Void, Void> {
- String address = null;
- private WeakReference<ShowLocationActivity> activityReference;
-
- getAddressAsync(ShowLocationActivity context) {
- activityReference = new WeakReference<>(context);
- }
-
- @Override
- protected void onPreExecute() {
- super.onPreExecute();
- showLocation(location, null);
- }
-
- @Override
- protected Void doInBackground(Void... params) {
- address = getAddress(ShowLocationActivity.this, location);
- return null;
- }
+ ;
- @Override
- protected void onPostExecute(Void result) {
- super.onPostExecute(result);
- showLocation(location, address);
- }
- };
+ protected SharedPreferences getPreferences() {
+ return PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
+ }
- private static String getAddress(Context context, Location location) {
- double longitude = location.getLongitude();
- double latitude = location.getLatitude();
- String address = "";
- if (latitude != 0 && longitude != 0) {
- Geocoder geoCoder = new Geocoder(context, Locale.getDefault());
- try {
- List<Address> addresses = geoCoder.getFromLocation(latitude, longitude, 1);
- if (addresses != null && addresses.size() > 0) {
- Address Address = addresses.get(0);
- StringBuilder strAddress = new StringBuilder("");
+ @Override
+ protected void refreshUiReal() {
- if (Address.getAddressLine(0).length() > 0) {
- strAddress.append(Address.getAddressLine(0));
- }
- address = strAddress.toString().replace(", ", "<br>");
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return address;
}
+ @Override
+ void onBackendConnected() {
- protected SharedPreferences getPreferences() {
- return PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
}
@Override
@@ -155,7 +137,7 @@ public class ShowLocationActivity extends AppCompatActivity {
super.onSaveInstanceState(outState);
}
- private void showLocation (@Nullable Location location, @Nullable String address) {
+ private void showLocation(@Nullable Location location, @Nullable String address) {
if (location == null && TextUtils.isEmpty(address)) { // no location and no address available
final WebView webView = findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
@@ -164,7 +146,7 @@ public class ShowLocationActivity extends AppCompatActivity {
String LocationName = "<b>" + mLocationName + "</b>";
final WebView webView = findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
- webView.loadUrl("file:///android_asset/map.html?lat=" + location.getLatitude() + "&lon=" + location.getLongitude()+ "&name=" + LocationName);
+ webView.loadUrl("file:///android_asset/map.html?lat=" + location.getLatitude() + "&lon=" + location.getLongitude() + "&name=" + LocationName);
} else if (location != null && !TextUtils.isEmpty(address)) { // location and address available
String LocationName = "<b>" + mLocationName + "</b><br>" + address;
final WebView webView = findViewById(R.id.webView);
@@ -172,4 +154,32 @@ public class ShowLocationActivity extends AppCompatActivity {
webView.loadUrl("file:///android_asset/map.html?lat=" + location.getLatitude() + "&lon=" + location.getLongitude() + "&name=" + LocationName);
}
}
+
+ private class getAddressAsync extends AsyncTask<Void, Void, Void> {
+ String address = null;
+
+ private WeakReference<ShowLocationActivity> activityReference;
+
+ getAddressAsync(ShowLocationActivity context) {
+ activityReference = new WeakReference<>(context);
+ }
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ showLocation(location, null);
+ }
+
+ @Override
+ protected Void doInBackground(Void... params) {
+ address = getAddress(ShowLocationActivity.this, location);
+ return null;
+ }
+
+ @Override
+ protected void onPostExecute(Void result) {
+ super.onPostExecute(result);
+ showLocation(location, address);
+ }
+ }
} \ No newline at end of file
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index f5abf2239..526d9275f 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -16,6 +16,8 @@ import android.os.Build;
import android.os.Bundle;
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.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
@@ -24,6 +26,7 @@ import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
+import android.support.v7.widget.Toolbar;
import android.text.Editable;
import android.text.SpannableString;
import android.text.Spanned;
@@ -132,7 +135,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));
@@ -184,31 +187,10 @@ 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();
}
};
@@ -256,8 +238,11 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
super.onCreate(savedInstanceState);
new EmojiService(this).init(useBundledEmoji());
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 {
@@ -275,15 +260,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);
@@ -537,7 +516,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);
@@ -871,7 +850,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;
@@ -1093,6 +1072,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) {
diff --git a/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java b/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java
index 0a2dade8d..c1938aef9 100644
--- a/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/TrustKeysActivity.java
@@ -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;
@@ -79,11 +80,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));
diff --git a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
index b2d7e1064..a77303d85 100644
--- a/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/UriHandlerActivity.java
@@ -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
diff --git a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
index 07c6e1ff7..84a14c7c0 100644
--- a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java
@@ -79,6 +79,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);
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index 48ddf8fdf..112c01cee 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -421,10 +421,6 @@ public abstract class XmppActivity extends AppCompatActivity {
setTheme(this.mTheme);
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() {
@@ -609,6 +605,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;
diff --git a/src/main/res/layout-w945dp/activity_conversations.xml b/src/main/res/layout-w945dp/activity_conversations.xml
index cb5f2ccad..7cd5b36c4 100644
--- a/src/main/res/layout-w945dp/activity_conversations.xml
+++ b/src/main/res/layout-w945dp/activity_conversations.xml
@@ -3,20 +3,28 @@
<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">
- </LinearLayout>
+ <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> \ No newline at end of file
diff --git a/src/main/res/layout/activity_about.xml b/src/main/res/layout/activity_about.xml
index b4f022726..2ff11dc00 100644
--- a/src/main/res/layout/activity_about.xml
+++ b/src/main/res/layout/activity_about.xml
@@ -1,61 +1,67 @@
-<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/color_background_secondary"
+ android:orientation="vertical"
tools:context="${applicationId}.ui.AboutActivity">
+ <include layout="@layout/toolbar" />
- <RelativeLayout
+ <ScrollView
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="match_parent">
- <android.support.v7.widget.CardView
- android:id="@+id/LogoLayout"
+ <RelativeLayout
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">
-
- <ImageView
- android:id="@+id/logo"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_gravity="center_horizontal"
- android:padding="8dp"
- android:src="@drawable/main_logo" />
- </android.support.v7.widget.CardView>
-
- <android.support.v7.widget.CardView
- android:id="@+id/aboutLayout"
- android:layout_below="@+id/LogoLayout"
- 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">
-
- <TextView
- android:id="@+id/aboutmessage"
- android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+ <android.support.v7.widget.CardView
+ android:id="@+id/LogoLayout"
+ 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"
- android:autoLink="web"
- android:fontFamily="monospace"
- android:linksClickable="true"
- android:paddingBottom="@dimen/activity_vertical_margin"
- android:text="@string/pref_about_message"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
-
- </android.support.v7.widget.CardView>
- </RelativeLayout>
-
-</ScrollView>
+ android:layout_marginTop="@dimen/activity_vertical_margin">
+
+ <ImageView
+ android:id="@+id/logo"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_gravity="center_horizontal"
+ android:padding="8dp"
+ android:src="@drawable/main_logo" />
+ </android.support.v7.widget.CardView>
+
+ <android.support.v7.widget.CardView
+ android:id="@+id/aboutLayout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/LogoLayout"
+ 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">
+
+ <TextView
+ android:id="@+id/aboutmessage"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/activity_horizontal_margin"
+ android:layout_marginRight="@dimen/activity_horizontal_margin"
+ android:layout_marginTop="@dimen/activity_vertical_margin"
+ android:autoLink="web"
+ android:fontFamily="monospace"
+ android:linksClickable="true"
+ android:paddingBottom="@dimen/activity_vertical_margin"
+ android:text="@string/pref_about_message"
+ android:textColor="@color/black87"
+ android:textSize="?attr/TextSizeBody"
+ android:typeface="monospace" />
+
+ </android.support.v7.widget.CardView>
+ </RelativeLayout>
+ </ScrollView>
+</LinearLayout>
diff --git a/src/main/res/layout/activity_change_password.xml b/src/main/res/layout/activity_change_password.xml
index af1dcd271..26fa2cef4 100644
--- a/src/main/res/layout/activity_change_password.xml
+++ b/src/main/res/layout/activity_change_password.xml
@@ -5,10 +5,13 @@
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_above="@+id/button_bar">
+ android:layout_above="@+id/button_bar"
+ android:layout_below="@id/toolbar">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
diff --git a/src/main/res/layout/activity_choose_contact.xml b/src/main/res/layout/activity_choose_contact.xml
index 5767def46..f720864a3 100644
--- a/src/main/res/layout/activity_choose_contact.xml
+++ b/src/main/res/layout/activity_choose_contact.xml
@@ -1,24 +1,34 @@
<?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">
+
+ <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>
+ <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> \ No newline at end of file
diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml
index 88797b14a..191694b7e 100644
--- a/src/main/res/layout/activity_contact_details.xml
+++ b/src/main/res/layout/activity_contact_details.xml
@@ -1,261 +1,272 @@
<?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"
+ <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">
- <RelativeLayout
+ <android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="@dimen/card_padding_regular">
-
- <android.support.text.emoji.widget.EmojiTextView
- android:id="@+id/contact_display_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center_horizontal"
- android:paddingBottom="5dp"
- android:text="@string/contact"
- android:textAlignment="center"
- android:textColor="@color/black87"
- android:textIsSelectable="false"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold" />
-
- <QuickContactBadge
- android:id="@+id/details_contact_badge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/contact_display_name"
- android:layout_centerHorizontal="true"
- android:adjustViewBounds="true"
- android:background="@drawable/message_border"
- android:maxHeight="384dp"
- android:maxWidth="384dp"
- android:padding="1dp"
- android:scaleType="centerCrop" />
+ 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_jidbox"
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentStart="true"
- android:layout_below="@+id/details_contact_badge"
- android:layout_marginTop="16dp"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/details_contactjid"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="@string/account_settings_example_jabber_id"
- android:textAppearance="@style/TextAppearance.AppCompat.Title"
- android:textIsSelectable="true"
- android:visibility="gone" />
-
- <com.wefika.flowlayout.FlowLayout
- android:id="@+id/tags"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- 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_gravity="center_horizontal"
- android:layout_marginBottom="4dp"
- android:layout_marginTop="4dp"
- android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
+ android:padding="@dimen/card_padding_regular">
<android.support.text.emoji.widget.EmojiTextView
- android:id="@+id/status_message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="4dp"
- android:layout_marginTop="4dp"
- android:gravity="center_horizontal"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
-
- <android.support.text.emoji.widget.EmojiTextView
- android:id="@+id/resource"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="4dp"
- android:layout_marginTop="4dp"
- android:gravity="center_horizontal"
- android:textSize="?attr/TextSizeBody"
- android:textStyle="italic" />
-
- <Button
- android:id="@+id/add_contact_button"
+ android:id="@+id/contact_display_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
- android:layout_marginBottom="4dp"
- android:layout_marginTop="4dp"
- android:text="@string/add_contact" />
+ android:paddingBottom="5dp"
+ android:text="@string/contact"
+ android:textAlignment="center"
+ android:textColor="@color/black87"
+ android:textIsSelectable="false"
+ android:textSize="?attr/TextSizeHeadline"
+ android:textStyle="bold" />
- <CheckBox
- android:id="@+id/details_send_presence"
+ <QuickContactBadge
+ android:id="@+id/details_contact_badge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:layout_below="@+id/add_contact_button"
- android:layout_marginTop="4dp"
- android:text="@string/send_presence_updates"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
+ android:layout_below="@+id/contact_display_name"
+ android:layout_centerHorizontal="true"
+ android:adjustViewBounds="true"
+ android:background="@drawable/message_border"
+ android:maxHeight="384dp"
+ android:maxWidth="384dp"
+ android:padding="1dp"
+ android:scaleType="centerCrop" />
- <CheckBox
- android:id="@+id/details_receive_presence"
+ <LinearLayout
+ android:id="@+id/details_jidbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
+ android:layout_alignParentRight="true"
android:layout_alignParentStart="true"
- android:layout_below="@+id/details_send_presence"
- android:text="@string/receive_presence_updates"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
+ android:layout_below="@+id/details_contact_badge"
+ android:layout_marginTop="16dp"
+ android:orientation="vertical">
- </LinearLayout>
+ <TextView
+ android:id="@+id/details_contactjid"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/account_settings_example_jabber_id"
+ android:textAppearance="@style/TextAppearance.AppCompat.Title"
+ android:textIsSelectable="true"
+ android:visibility="gone" />
- <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"
- android:visibility="gone" />
- </RelativeLayout>
- </android.support.v7.widget.CardView>
+ <com.wefika.flowlayout.FlowLayout
+ android:id="@+id/tags"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="4dp"
+ android:layout_marginLeft="-2dp"
+ android:layout_marginTop="4dp"
+ android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout>
- <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">
+ <TextView
+ android:id="@+id/details_lastseen"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="4dp"
+ android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
+
+ <android.support.text.emoji.widget.EmojiTextView
+ android:id="@+id/status_message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="4dp"
+ android:gravity="center_horizontal"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
+
+ <android.support.text.emoji.widget.EmojiTextView
+ android:id="@+id/resource"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="4dp"
+ android:gravity="center_horizontal"
+ android:textSize="?attr/TextSizeBody"
+ android:textStyle="italic" />
+
+ <Button
+ android:id="@+id/add_contact_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="4dp"
+ android:text="@string/add_contact" />
+
+ <CheckBox
+ android:id="@+id/details_send_presence"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@+id/add_contact_button"
+ android:layout_marginTop="4dp"
+ android:text="@string/send_presence_updates"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
- <RelativeLayout
- android:layout_width="fill_parent"
+ <CheckBox
+ android:id="@+id/details_receive_presence"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_below="@+id/details_send_presence"
+ 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"
+ android:visibility="gone" />
+ </RelativeLayout>
+ </android.support.v7.widget.CardView>
+
+ <android.support.v7.widget.CardView
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentStart="true"
- android:padding="@dimen/card_padding_regular"
- android:touchscreenBlocksFocus="true">
+ 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">
- <TextView
- android:id="@+id/notification_status_text"
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:layout_width="fill_parent"
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:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ android:layout_alignParentStart="true"
+ android:padding="@dimen/card_padding_regular"
+ android:touchscreenBlocksFocus="true">
- <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:background="?attr/selectableItemBackgroundBorderless"
- android:padding="@dimen/image_button_padding"
- android:src="@drawable/ic_notifications_grey600_24dp" />
- </RelativeLayout>
+ <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:textColor="@color/black87"
+ android:textSize="?attr/TextSizeBody" />
- </android.support.v7.widget.CardView>
+ <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:background="?attr/selectableItemBackgroundBorderless"
+ android:padding="@dimen/image_button_padding"
+ android:src="@drawable/ic_notifications_grey600_24dp" />
+ </RelativeLayout>
- <android.support.v7.widget.CardView
- android:id="@+id/keys_wrapper"
- 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">
+ </android.support.v7.widget.CardView>
- <LinearLayout
+ <android.support.v7.widget.CardView
+ android:id="@+id/keys_wrapper"
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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:divider="?android:dividerHorizontal"
- android:orientation="vertical"
- android:padding="@dimen/card_padding_list"></LinearLayout>
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginTop="8dp"
- android:orientation="horizontal">
+ 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:minWidth="0dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- android:text="@string/scan_qr_code"
- android:textColor="?attr/colorAccent" />
+ android:divider="?android:dividerHorizontal"
+ 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:minWidth="0dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp"
- 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:minWidth="0dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ 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:minWidth="0dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ 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> \ No newline at end of file
diff --git a/src/main/res/layout/activity_conversations.xml b/src/main/res/layout/activity_conversations.xml
index 567b17ac9..62352683a 100644
--- a/src/main/res/layout/activity_conversations.xml
+++ b/src/main/res/layout/activity_conversations.xml
@@ -28,8 +28,18 @@
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
- <FrameLayout
- android:id="@+id/main_fragment"
+ <LinearLayout
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> \ No newline at end of file
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 0c64832f5..6050a72ab 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -8,11 +8,15 @@
android:layout_height="wrap_content"
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"
@@ -612,19 +616,19 @@
android:orientation="vertical"
android:padding="@dimen/card_padding_list">
- <TextView
- android:id="@+id/other_device_keys_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="@dimen/list_padding"
- android:text="@string/other_devices"
- android:textAppearance="@style/TextAppearance.AppCompat.Title" />
+ <TextView
+ android:id="@+id/other_device_keys_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/list_padding"
+ android:text="@string/other_devices"
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
- <LinearLayout
- android:id="@+id/other_device_keys"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"/>
+ <LinearLayout
+ android:id="@+id/other_device_keys"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" />
<Button
android:id="@+id/clear_devices"
diff --git a/src/main/res/layout/activity_manage_accounts.xml b/src/main/res/layout/activity_manage_accounts.xml
index 99b6ad920..e80aa01e0 100644
--- a/src/main/res/layout/activity_manage_accounts.xml
+++ b/src/main/res/layout/activity_manage_accounts.xml
@@ -2,7 +2,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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"
diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml
index 1da4660fe..4a74883ad 100644
--- a/src/main/res/layout/activity_muc_details.xml
+++ b/src/main/res/layout/activity_muc_details.xml
@@ -2,268 +2,279 @@
<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="@color/grey200">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="?attr/color_background_secondary"
+ android:orientation="vertical">
- <LinearLayout
- android:id="@+id/muc_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:background="@color/grey200">
- <android.support.v7.widget.CardView
- android:layout_width="match_parent"
+ <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:padding="@dimen/card_padding_regular">
+ 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">
- <android.support.text.emoji.widget.EmojiTextView
- android:id="@+id/conference_name"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center_horizontal"
- android:paddingBottom="5dp"
- android:text="@string/conference_subject"
- android:textAlignment="center"
- android:textColor="@color/black87"
- android:textIsSelectable="false"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold" />
-
- <RelativeLayout
- android:id="@+id/muc_settings"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ android:orientation="vertical"
+ android:padding="@dimen/card_padding_regular">
- <TextView
- android:id="@+id/muc_conference_type"
+ <android.support.text.emoji.widget.EmojiTextView
+ android:id="@+id/conference_name"
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_alignParentTop="true"
+ android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:padding="@dimen/image_button_padding"
- android:src="?attr/icon_settings" />
- </RelativeLayout>
+ android:paddingBottom="5dp"
+ android:text="@string/conference_subject"
+ android:textAlignment="center"
+ android:textColor="@color/black87"
+ android:textIsSelectable="false"
+ android:textSize="?attr/TextSizeHeadline"
+ android:textStyle="bold" />
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
+ <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: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="@drawable/ic_notifications_black_24dp" />
+ </RelativeLayout>
<TextView
- android:id="@+id/notification_status_text"
+ android:id="@+id/muc_jabberid"
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_marginBottom="16dp"
+ android:text="@string/account_settings_example_jabber_id"
+ android:textAppearance="@style/TextAppearance.AppCompat.Title"
+ android:textIsSelectable="true"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/details_account"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_gravity="center_horizontal"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:padding="@dimen/image_button_padding"
- android:alpha="?attr/icon_alpha"
- android:src="@drawable/ic_notifications_black_24dp" />
- </RelativeLayout>
-
- <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"
- android:textIsSelectable="true"
- android:visibility="gone" />
-
- <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"
- android:visibility="gone" />
- </LinearLayout>
- </android.support.v7.widget.CardView>
-
- <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"
- android:orientation="vertical">
+ android:layout_gravity="right"
+ android:layout_marginTop="32dp"
+ android:text="@string/using_account"
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption"
+ android:visibility="gone" />
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
- <LinearLayout
- android:layout_width="match_parent"
+ <android.support.v7.widget.CardView
+ android:id="@+id/muc_more_details"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="@dimen/card_padding_list">
+ 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">
- <RelativeLayout
- android:layout_width="fill_parent"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="32dp">
-
- <com.makeramen.roundedimageview.RoundedImageView
- android:id="@+id/your_photo"
- android:layout_width="72dp"
- android:layout_height="72dp"
- android:layout_alignParentEnd="false"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="false"
- android:padding="1dp"
- app:riv_border_color="@color/grey500"
- app:riv_border_width="1dp"
- app:riv_corner_radius="36dp" />
+ android:orientation="vertical"
+ android:padding="@dimen/card_padding_list">
- <LinearLayout
+ <RelativeLayout
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">
+ android:layout_marginBottom="32dp">
- <android.support.text.emoji.widget.EmojiTextView
- android:id="@+id/muc_your_nick"
- android:layout_width="wrap_content"
+ <com.makeramen.roundedimageview.RoundedImageView
+ android:id="@+id/your_photo"
+ android:layout_width="72dp"
+ android:layout_height="72dp"
+ android:layout_alignParentEnd="false"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentRight="false"
+ android:padding="1dp"
+ app:riv_border_color="@color/grey500"
+ app:riv_border_width="1dp"
+ app:riv_corner_radius="36dp" />
+
+ <LinearLayout
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
+ android:layout_centerVertical="true"
+ android:layout_toRightOf="@+id/your_photo"
+ android:orientation="vertical"
+ android:paddingLeft="@dimen/avatar_item_distance">
- <TextView
- android:id="@+id/muc_role"
+ <android.support.text.emoji.widget.EmojiTextView
+ 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:singleLine="true"
- android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary" />
- </LinearLayout>
+ 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>
+
+ <LinearLayout
+ android:id="@+id/muc_members"
+ android:layout_width="fill_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:divider="?android:dividerHorizontal"
+ android:orientation="vertical"
+ android:showDividers="middle"></LinearLayout>
- <ImageButton
- android:id="@+id/edit_nick_button"
+ <Button
+ android:id="@+id/invite"
+ style="?android:attr/buttonStyleSmall"
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>
-
- <LinearLayout
- android:id="@+id/muc_members"
- android:layout_width="fill_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:divider="?android:dividerHorizontal"
- android:orientation="vertical"
- android:showDividers="middle"></LinearLayout>
-
- <Button
- android:id="@+id/invite"
- style="?android:attr/buttonStyleSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginTop="24dp"
- android:text="@string/invite_contact" />
-
- <Button
- android:id="@+id/destroy"
- style="?android:attr/buttonStyleSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginTop="24dp"
- android:text="@string/destroy_muc" />
- </LinearLayout>
- </android.support.v7.widget.CardView>
-
- <android.support.v7.widget.CardView
- android:id="@+id/muc_info_more"
- 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"
- android:orientation="vertical"
- android:visibility="gone">
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="24dp"
+ android:text="@string/invite_contact" />
+ <Button
+ android:id="@+id/destroy"
+ style="?android:attr/buttonStyleSmall"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginTop="24dp"
+ android:text="@string/destroy_muc" />
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
- <LinearLayout
+ <android.support.v7.widget.CardView
+ android:id="@+id/muc_info_more"
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"
android:orientation="vertical"
- android:padding="@dimen/card_padding_list">
+ android:visibility="gone">
+
- <TableLayout
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:stretchColumns="1">
+ android:orientation="vertical"
+ android:padding="@dimen/card_padding_list">
- <TableRow
- android:layout_width="fill_parent"
- android:layout_height="match_parent">
+ <TableLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:stretchColumns="1">
- <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" />
+ <TableRow
+ android:layout_width="fill_parent"
+ android:layout_height="match_parent">
- <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>
- </LinearLayout>
- </android.support.v7.widget.CardView>
- </LinearLayout>
- </ScrollView>
+ <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>
+ </LinearLayout>
+ </android.support.v7.widget.CardView>
+ </LinearLayout>
+ </ScrollView>
+ </LinearLayout>
</layout> \ No newline at end of file
diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml
index e0b33929d..0fce24346 100644
--- a/src/main/res/layout/activity_publish_profile_picture.xml
+++ b/src/main/res/layout/activity_publish_profile_picture.xml
@@ -5,11 +5,14 @@
android:layout_height="match_parent"
android:background="?attr/color_background_secondary">
+ <include 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_alignParentTop="true"
+ android:layout_below="@id/toolbar">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
diff --git a/src/main/res/layout/activity_settings.xml b/src/main/res/layout/activity_settings.xml
new file mode 100644
index 000000000..1793bab82
--- /dev/null
+++ b/src/main/res/layout/activity_settings.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<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" />
+
+ <FrameLayout
+ android:id="@+id/settings_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/activity_share_locaction.xml b/src/main/res/layout/activity_share_locaction.xml
index 2185ddc29..c6f811997 100644
--- a/src/main/res/layout/activity_share_locaction.xml
+++ b/src/main/res/layout/activity_share_locaction.xml
@@ -1,88 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
- tools:context="ui.ShareLocationActivity">
+ android:layout_height="wrap_content"
+ android:background="?attr/color_background_secondary">
- <WebView
- android:id="@+id/webView"
+ <include
+ android:id="@+id/toolbar"
+ layout="@layout/toolbar" />
+
+ <RelativeLayout 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_above="@+id/snackbar"></WebView>
+ tools:context="ui.ShareLocationActivity">
- <RelativeLayout
- android:id="@+id/snackbar"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_above="@+id/button_bar"
- android:layout_marginBottom="4dp"
- android:layout_marginLeft="8dp"
- android:layout_marginRight="8dp"
- android:layout_marginTop="4dp"
- android:background="@drawable/snackbar"
- android:minHeight="48dp"
- android:visibility="visible">
+ <WebView
+ android:id="@+id/webView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_above="@+id/snackbar"></WebView>
- <TextView
- android:layout_width="wrap_content"
+ <RelativeLayout
+ android:id="@+id/snackbar"
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_toLeftOf="@+id/snackbar_action"
- android:paddingLeft="24dp"
- android:text="@string/location_sharing_disabled"
- android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" />
+ android:layout_above="@+id/button_bar"
+ android:layout_marginBottom="4dp"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:layout_marginTop="4dp"
+ android:background="@drawable/snackbar"
+ android:minHeight="48dp"
+ android:visibility="visible">
- <TextView
- android:id="@+id/snackbar_action"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
- android:paddingBottom="16dp"
- android:paddingLeft="24dp"
- android:paddingRight="24dp"
- android:paddingTop="16dp"
- android:text="@string/enable"
- android:textAllCaps="true"
- android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"
- android:textStyle="bold" />
- </RelativeLayout>
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_toLeftOf="@+id/snackbar_action"
+ android:paddingLeft="24dp"
+ android:text="@string/location_sharing_disabled"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" />
- <LinearLayout
- android:id="@+id/button_bar"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="true"
- android:layout_alignParentRight="true">
+ <TextView
+ android:id="@+id/snackbar_action"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
+ android:paddingBottom="16dp"
+ android:paddingLeft="24dp"
+ android:paddingRight="24dp"
+ android:paddingTop="16dp"
+ android:text="@string/enable"
+ android:textAllCaps="true"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"
+ android:textStyle="bold" />
+ </RelativeLayout>
- <Button
- android:id="@+id/cancel_button"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="0dp"
+ <LinearLayout
+ android:id="@+id/button_bar"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/cancel"
- android:textColor="@color/primary" />
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentRight="true">
- <View
- android:layout_width="1dp"
- android:layout_height="fill_parent"
- android:layout_marginBottom="7dp"
- android:layout_marginTop="7dp"
- android:background="@color/primary" />
+ <Button
+ android:id="@+id/cancel_button"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/cancel"
+ android:textColor="@color/primary" />
- <Button
- android:id="@+id/share_button"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:enabled="false"
- android:text="@string/share"
- android:textColor="@color/primary" />
- </LinearLayout>
+ <View
+ android:layout_width="1dp"
+ android:layout_height="fill_parent"
+ android:layout_marginBottom="7dp"
+ android:layout_marginTop="7dp"
+ android:background="@color/primary" />
+
+ <Button
+ android:id="@+id/share_button"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:enabled="false"
+ android:text="@string/share"
+ android:textColor="@color/primary" />
+ </LinearLayout>
+ </RelativeLayout>
</RelativeLayout> \ No newline at end of file
diff --git a/src/main/res/layout/activity_share_with.xml b/src/main/res/layout/activity_share_with.xml
index 0b0e11f54..c4908cbfe 100644
--- a/src/main/res/layout/activity_share_with.xml
+++ b/src/main/res/layout/activity_share_with.xml
@@ -4,6 +4,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
+ <include layout="@layout/toolbar" />
+
<ListView
android:id="@+id/choose_conversation_list"
android:layout_width="match_parent"
diff --git a/src/main/res/layout/activity_show_locaction.xml b/src/main/res/layout/activity_show_locaction.xml
index 5e164b407..d6b26e6f4 100644
--- a/src/main/res/layout/activity_show_locaction.xml
+++ b/src/main/res/layout/activity_show_locaction.xml
@@ -1,13 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
- tools:context="ui.ShowLocationActivity">
+ android:layout_height="wrap_content"
+ android:background="?attr/color_background_secondary">
- <WebView
- android:id="@+id/webView"
+ <include
+ android:id="@+id/toolbar"
+ layout="@layout/toolbar" />
+
+ <RelativeLayout 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">
- </WebView>
+ android:layout_height="match_parent"
+ tools:context="ui.ShowLocationActivity">
+
+ <WebView
+ android:id="@+id/webView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"></WebView>
+ </RelativeLayout>
</RelativeLayout> \ No newline at end of file
diff --git a/src/main/res/layout/activity_start_conversation.xml b/src/main/res/layout/activity_start_conversation.xml
index c95dc3678..963f3d547 100644
--- a/src/main/res/layout/activity_start_conversation.xml
+++ b/src/main/res/layout/activity_start_conversation.xml
@@ -1,19 +1,44 @@
<?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_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/toolbar"
+ android:background="?attr/colorPrimary"
+ android:elevation="6dp"
+ android:minHeight="?attr/actionBarSize"
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+ app:tabGravity="fill"
+ app:tabMode="fixed"
+ app:tabSelectedTextColor="@color/white"
+ app:tabTextColor="@color/white70" />
+
<android.support.v4.view.ViewPager
android:id="@+id/start_conversation_view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="?attr/color_background_primary"/>
+ 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:src="?attr/icon_add_person"
- android:layout_margin="16dp" />
- </FrameLayout>
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_margin="16dp"
+ android:src="?attr/icon_add_person" />
+ </RelativeLayout>
</layout> \ No newline at end of file
diff --git a/src/main/res/layout/activity_trust_keys.xml b/src/main/res/layout/activity_trust_keys.xml
index 431348f19..b2c03ed8e 100644
--- a/src/main/res/layout/activity_trust_keys.xml
+++ b/src/main/res/layout/activity_trust_keys.xml
@@ -6,11 +6,15 @@
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:layout_width="match_parent"
diff --git a/src/main/res/layout/magic_create.xml b/src/main/res/layout/magic_create.xml
index 9d3dd9322..5fb080368 100644
--- a/src/main/res/layout/magic_create.xml
+++ b/src/main/res/layout/magic_create.xml
@@ -1,87 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:fillViewport="true">
+ android:orientation="vertical">
- <RelativeLayout
+ <include layout="@layout/toolbar" />
+
+ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/grey50">
+ android:fillViewport="true">
- <LinearLayout
- android:id="@+id/linearLayout"
+ <RelativeLayout
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="8dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp">
+ android:layout_height="match_parent"
+ android:background="?attr/color_background_primary">
- <Space
+ <LinearLayout
+ android:id="@+id/linearLayout"
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" />
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:minHeight="256dp"
+ android:orientation="vertical"
+ android:paddingBottom="8dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp">
- <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" />
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- <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:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/pick_your_username"
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
- <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" />
+ <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" />
- <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>
+ <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" />
- <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">
+ <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" />
- <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" />
+ <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>
</RelativeLayout>
- </RelativeLayout>
-</ScrollView> \ No newline at end of file
+ </ScrollView>
+</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/toolbar.xml b/src/main/res/layout/toolbar.xml
new file mode 100644
index 000000000..932252873
--- /dev/null
+++ b/src/main/res/layout/toolbar.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/colorPrimary"
+ android:elevation="6dp"
+ android:minHeight="?attr/actionBarSize"
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+ app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> \ No newline at end of file
diff --git a/src/main/res/layout/welcome.xml b/src/main/res/layout/welcome.xml
index e81e1f95d..bbe98e90b 100644
--- a/src/main/res/layout/welcome.xml
+++ b/src/main/res/layout/welcome.xml
@@ -1,99 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:fillViewport="true">
+ android:orientation="vertical">
- <RelativeLayout
+ <include layout="@layout/toolbar" />
+
+ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/grey50">
+ android:fillViewport="true">
- <LinearLayout
- android:id="@+id/linearLayout"
+ <RelativeLayout
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="8dp"
- android:paddingLeft="16dp"
- android:paddingRight="16dp">
+ android:layout_height="match_parent"
+ android:background="@color/grey50">
- <Space
+ <LinearLayout
+ android:id="@+id/linearLayout"
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" />
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:minHeight="256dp"
+ android:orientation="vertical"
+ android:paddingBottom="8dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp">
- <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" />
+ <Space
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
- <TextView
- android:id="@id/import_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:text="@string/import_text"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody"
- android:visibility="gone" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/welcome_header"
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
- <Button
- android:id="@+id/import_database"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:text="@string/import_database"
- android:textColor="@color/accent"
- android:visibility="gone" />
+ <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" />
+ <TextView
+ android:id="@id/import_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
+ android:text="@string/import_text"
+ android:textColor="@color/black87"
+ android:textSize="?attr/TextSizeBody"
+ android:visibility="gone" />
- <Button
- android:id="@+id/use_existing_account"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="right"
- android:text="@string/use_existing_accout"
- android:textColor="@color/black54" />
- </LinearLayout>
+ <Button
+ android:id="@+id/import_database"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:text="@string/import_database"
+ android:textColor="@color/accent"
+ android:visibility="gone" />
- <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">
+ <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" />
- <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" />
+ <Button
+ android:id="@+id/use_existing_account"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:text="@string/use_existing_accout"
+ android:textColor="@color/black54" />
+ </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"
+ android:layout_alignParentTop="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>
</RelativeLayout>
- </RelativeLayout>
-</ScrollView> \ No newline at end of file
+ </ScrollView>
+</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml
index f2e3460bd..180ba0eeb 100644
--- a/src/main/res/values/themes.xml
+++ b/src/main/res/values/themes.xml
@@ -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/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</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 type="reference" name="android:homeAsUpIndicator">@drawable/ic_arrow_back_white_24dp</item>
@@ -72,7 +72,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/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>
@@ -82,7 +82,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>
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index 220a66cb4..68a25d3b0 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -7,6 +7,14 @@
android:icon="@drawable/ic_image_black_24dp"
android:key="userinterface"
android:title="@string/pref_ui_options">
+ <intent
+ android:action="android.intent.action.VIEW"
+ android:targetClass="de.pixart.messenger.ui.SettingsActivity"
+ android:targetPackage="@string/applicationId">
+ <extra
+ android:name="page"
+ android:value="userinterface" />
+ </intent>
<CheckBoxPreference
android:defaultValue="@bool/use_white_background"
android:key="use_white_background"
@@ -56,6 +64,14 @@
android:icon="@drawable/ic_notifications_black_24dp"
android:key="notifications"
android:title="@string/pref_notification_settings">
+ <intent
+ android:action="android.intent.action.VIEW"
+ android:targetClass="de.pixart.messenger.ui.SettingsActivity"
+ android:targetPackage="@string/applicationId">
+ <extra
+ android:name="page"
+ android:value="notifications" />
+ </intent>
<CheckBoxPreference
android:defaultValue="@bool/show_notification"
android:key="show_notification"
@@ -129,6 +145,14 @@
android:icon="@drawable/ic_attachment_black_24dp"
android:key="attachments"
android:title="@string/pref_attachments">
+ <intent
+ android:action="android.intent.action.VIEW"
+ android:targetClass="de.pixart.messenger.ui.SettingsActivity"
+ android:targetPackage="@string/applicationId">
+ <extra
+ android:name="page"
+ android:value="attachments" />
+ </intent>
<ListPreference
android:defaultValue="@integer/auto_accept_filesize_wifi"
android:entries="@array/filesizes"
@@ -175,6 +199,14 @@
android:icon="@drawable/ic_new_releases_black_24dp"
android:key="presence"
android:title="@string/pref_presence_settings">
+ <intent
+ android:action="android.intent.action.VIEW"
+ android:targetClass="de.pixart.messenger.ui.SettingsActivity"
+ android:targetPackage="@string/applicationId">
+ <extra
+ android:name="page"
+ android:value="presence" />
+ </intent>
<CheckBoxPreference
android:defaultValue="@bool/manually_change_presence"
android:disableDependentsState="true"
@@ -205,6 +237,14 @@
android:icon="@drawable/ic_security_black_24dp"
android:key="security"
android:title="@string/pref_security_settings">
+ <intent
+ android:action="android.intent.action.VIEW"
+ android:targetClass="de.pixart.messenger.ui.SettingsActivity"
+ android:targetPackage="@string/applicationId">
+ <extra
+ android:name="page"
+ android:value="security" />
+ </intent>
<CheckBoxPreference
android:defaultValue="@bool/confirm_messages"
android:key="confirm_messages"