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,78 +1,80 @@
<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_height="match_parent"
tools:context=".ui.ShareLocationActivity">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<android.support.design.widget.CoordinatorLayout
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"
tools:context=".ui.ShareLocationActivity"> android:layout_above="@+id/button_bar"
android:layout_below="@id/toolbar">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar"/>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/snackbar_coordinator"
android:layout_width="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_alignParentEnd="true"
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
android:id="@+id/map" android:id="@+id/map"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent" />
</android.support.design.widget.CoordinatorLayout> <android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
<LinearLayout
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_above="@+id/button_bar"
android:layout_alignParentLeft="true" android:layout_alignParentEnd="true"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
tools:ignore="RtlHardcoded"> 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>
<LinearLayout
android:id="@+id/button_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
tools:ignore="RtlHardcoded">
<Button <Button
android:id="@+id/cancel_button" android:id="@+id/cancel_button"
style="@style/Widget.Conversations.Button.Borderless" style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/cancel"/> android:text="@string/cancel" />
<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
android:id="@+id/share_button" android:id="@+id/share_button"
style="@style/Widget.Conversations.Button.Borderless" style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/share"/> android:text="@string/share" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</layout> </layout>

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"
@ -10,25 +10,26 @@
<include <include
android:id="@+id/toolbar" android:id="@+id/toolbar"
layout="@layout/toolbar"/> layout="@layout/toolbar" />
<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>