From 67fddd1654192441d4e9a79aa319f51214dceefd Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 12 Jan 2019 21:08:13 +0100 Subject: [PATCH] fix manual location correcting / fab not showing up on 4.4 fixes #3097 --- .../ui/ConferenceDetailsActivity.java | 1 + .../ui/ConversationsActivity.java | 1 - .../conversations/ui/ShareWithActivity.java | 2 - .../ui/StartConversationActivity.java | 1 - .../siacs/conversations/ui/XmppActivity.java | 2 + .../res/layout/activity_share_location.xml | 118 +++++++++--------- .../res/layout/activity_show_location.xml | 15 +-- 7 files changed, 71 insertions(+), 69 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 882b8f364..dfa5f7471 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -53,6 +53,7 @@ import eu.siacs.conversations.services.XmppConnectionService.OnConversationUpdat import eu.siacs.conversations.services.XmppConnectionService.OnMucRosterUpdate; import eu.siacs.conversations.ui.adapter.MediaAdapter; import eu.siacs.conversations.ui.interfaces.OnMediaLoaded; +import eu.siacs.conversations.ui.service.EmojiService; import eu.siacs.conversations.ui.util.Attachment; import eu.siacs.conversations.ui.util.GridManager; import eu.siacs.conversations.ui.util.MenuDoubleTabUtil; diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java index 937406d24..bcd586d3f 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java @@ -358,7 +358,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio super.onCreate(savedInstanceState); ConversationMenuConfigurator.reloadFeatures(this); OmemoSetting.load(this); - new EmojiService(this).init(); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations); setSupportActionBar((Toolbar) binding.toolbar); configureActionBar(getSupportActionBar()); diff --git a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java index 5daf9933c..40ac1599c 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java @@ -81,8 +81,6 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - new EmojiService(this).init(); - setContentView(R.layout.activity_share_with); setSupportActionBar(findViewById(R.id.toolbar)); diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index de526fc9c..66af744a8 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -268,7 +268,6 @@ public class StartConversationActivity extends XmppActivity implements XmppConne @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - new EmojiService(this).init(); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation); Toolbar toolbar = (Toolbar) binding.toolbar; setSupportActionBar(toolbar); diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 03c60d959..60f5d5a71 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -69,6 +69,7 @@ import eu.siacs.conversations.services.AvatarService; import eu.siacs.conversations.services.BarcodeProvider; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; +import eu.siacs.conversations.ui.service.EmojiService; import eu.siacs.conversations.ui.util.MenuDoubleTabUtil; import eu.siacs.conversations.ui.util.PresenceSelector; import eu.siacs.conversations.ui.util.SoftKeyboardUtils; @@ -395,6 +396,7 @@ public abstract class XmppActivity extends ActionBarActivity { setVolumeControlStream(AudioManager.STREAM_NOTIFICATION); metrics = getResources().getDisplayMetrics(); ExceptionHelper.init(getApplicationContext()); + new EmojiService(this).init(); this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); mColorRed = ContextCompat.getColor(this, R.color.red800); diff --git a/src/main/res/layout/activity_share_location.xml b/src/main/res/layout/activity_share_location.xml index d5f993bf6..01249da55 100644 --- a/src/main/res/layout/activity_share_location.xml +++ b/src/main/res/layout/activity_share_location.xml @@ -1,78 +1,80 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools"> - + + + + - - - - - - + android:layout_above="@+id/button_bar" + android:layout_below="@id/toolbar"> + android:layout_height="match_parent" /> - - - + android:layout_gravity="end|bottom" + android:layout_margin="16dp" + app:elevation="4dp" + android:contentDescription="@string/action_unfix_from_location" + android:src="?attr/icon_gps_fixed" + app:backgroundTint="?colorPrimary" /> + + + + -