fix manual location correcting / fab not showing up on 4.4

fixes #3097
This commit is contained in:
Daniel Gultsch 2019-01-12 21:08:13 +01:00
parent ba34561235
commit 67fddd1654
7 changed files with 71 additions and 69 deletions

View file

@ -53,6 +53,7 @@ import eu.siacs.conversations.services.XmppConnectionService.OnConversationUpdat
import eu.siacs.conversations.services.XmppConnectionService.OnMucRosterUpdate; import eu.siacs.conversations.services.XmppConnectionService.OnMucRosterUpdate;
import eu.siacs.conversations.ui.adapter.MediaAdapter; import eu.siacs.conversations.ui.adapter.MediaAdapter;
import eu.siacs.conversations.ui.interfaces.OnMediaLoaded; 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.Attachment;
import eu.siacs.conversations.ui.util.GridManager; import eu.siacs.conversations.ui.util.GridManager;
import eu.siacs.conversations.ui.util.MenuDoubleTabUtil; import eu.siacs.conversations.ui.util.MenuDoubleTabUtil;

View file

@ -358,7 +358,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
ConversationMenuConfigurator.reloadFeatures(this); ConversationMenuConfigurator.reloadFeatures(this);
OmemoSetting.load(this); OmemoSetting.load(this);
new EmojiService(this).init();
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_conversations);
setSupportActionBar((Toolbar) binding.toolbar); setSupportActionBar((Toolbar) binding.toolbar);
configureActionBar(getSupportActionBar()); configureActionBar(getSupportActionBar());

View file

@ -81,8 +81,6 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
new EmojiService(this).init();
setContentView(R.layout.activity_share_with); setContentView(R.layout.activity_share_with);
setSupportActionBar(findViewById(R.id.toolbar)); setSupportActionBar(findViewById(R.id.toolbar));

View file

@ -268,7 +268,6 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
new EmojiService(this).init();
this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation); this.binding = DataBindingUtil.setContentView(this, R.layout.activity_start_conversation);
Toolbar toolbar = (Toolbar) binding.toolbar; Toolbar toolbar = (Toolbar) binding.toolbar;
setSupportActionBar(toolbar); setSupportActionBar(toolbar);

View file

@ -69,6 +69,7 @@ import eu.siacs.conversations.services.AvatarService;
import eu.siacs.conversations.services.BarcodeProvider; import eu.siacs.conversations.services.BarcodeProvider;
import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; 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.MenuDoubleTabUtil;
import eu.siacs.conversations.ui.util.PresenceSelector; import eu.siacs.conversations.ui.util.PresenceSelector;
import eu.siacs.conversations.ui.util.SoftKeyboardUtils; import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
@ -395,6 +396,7 @@ public abstract class XmppActivity extends ActionBarActivity {
setVolumeControlStream(AudioManager.STREAM_NOTIFICATION); setVolumeControlStream(AudioManager.STREAM_NOTIFICATION);
metrics = getResources().getDisplayMetrics(); metrics = getResources().getDisplayMetrics();
ExceptionHelper.init(getApplicationContext()); ExceptionHelper.init(getApplicationContext());
new EmojiService(this).init();
this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); this.isCameraFeatureAvailable = getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);
mColorRed = ContextCompat.getColor(this, R.color.red800); mColorRed = ContextCompat.getColor(this, R.color.red800);

View file

@ -1,6 +1,6 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<RelativeLayout <RelativeLayout
@ -17,20 +17,8 @@
android:id="@+id/snackbar_coordinator" android:id="@+id/snackbar_coordinator"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_above="@+id/button_bar" >
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/button_bar" android:layout_above="@+id/button_bar"
android:layout_alignParentEnd="true" android:layout_below="@id/toolbar">
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
app:backgroundTint="?colorPrimary"
android:contentDescription="@string/action_unfix_from_location"
android:src="?attr/icon_gps_fixed"
android:layout_alignParentRight="true" />
<org.osmdroid.views.MapView <org.osmdroid.views.MapView
@ -38,15 +26,29 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/button_bar"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
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" />
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>
<LinearLayout <LinearLayout
android:id="@+id/button_bar" android:id="@+id/button_bar"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
tools:ignore="RtlHardcoded"> tools:ignore="RtlHardcoded">
@ -61,8 +63,8 @@
<View <View
android:layout_width="1dp" android:layout_width="1dp"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:layout_marginBottom="7dp"
android:layout_marginTop="7dp" android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:background="?attr/divider" /> android:background="?attr/divider" />
<Button <Button

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -15,20 +15,21 @@
<org.osmdroid.views.MapView <org.osmdroid.views.MapView
android:id="@+id/map" android:id="@+id/map"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"/> android:layout_height="fill_parent"
android:layout_below="@id/toolbar" />
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_gravity="end|bottom" android:layout_gravity="end|bottom"
android:layout_margin="16dp" android:layout_margin="16dp"
android:contentDescription="@string/action_unfix_from_location" android:contentDescription="@string/action_unfix_from_location"
android:src="?attr/icon_directions" android:src="?attr/icon_directions"
app:backgroundTint="?colorPrimary" app:backgroundTint="?colorPrimary"
app:tint="@color/white" app:tint="@color/white" />
android:layout_alignParentRight="true" />
</RelativeLayout> </RelativeLayout>
</layout> </layout>