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.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;

View File

@ -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());

View File

@ -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));

View File

@ -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);

View File

@ -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);

View File

@ -1,78 +1,80 @@
<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_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_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" />
android:layout_above="@+id/button_bar"
android:layout_below="@id/toolbar">
<org.osmdroid.views.MapView
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent" />
</android.support.design.widget.CoordinatorLayout>
<LinearLayout
android:id="@+id/button_bar"
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_above="@+id/button_bar"
android:layout_alignParentEnd="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
android:id="@+id/cancel_button"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/cancel"/>
<Button
android:id="@+id/cancel_button"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/cancel" />
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:layout_marginBottom="7dp"
android:layout_marginTop="7dp"
android:background="?attr/divider"/>
<View
android:layout_width="1dp"
android:layout_height="fill_parent"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:background="?attr/divider" />
<Button
android:id="@+id/share_button"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/share"/>
</LinearLayout>
<Button
android:id="@+id/share_button"
style="@style/Widget.Conversations.Button.Borderless"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/share" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</layout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<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
android:layout_width="match_parent"
@ -10,25 +10,26 @@
<include
android:id="@+id/toolbar"
layout="@layout/toolbar"/>
layout="@layout/toolbar" />
<org.osmdroid.views.MapView
android:id="@+id/map"
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:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_gravity="end|bottom"
android:layout_margin="16dp"
android:contentDescription="@string/action_unfix_from_location"
android:src="?attr/icon_directions"
app:backgroundTint="?colorPrimary"
app:tint="@color/white"
android:layout_alignParentRight="true" />
app:tint="@color/white" />
</RelativeLayout>
</layout>