From ec06414e321d5c25226d7aefac346c901b979818 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 24 Feb 2020 15:00:41 +0100 Subject: [PATCH] Some things just do not work --- .../eu/faircode/email/FixedScrollView.java | 47 ------------------- .../eu/faircode/email/FragmentCompose.java | 7 +++ app/src/main/res/layout/fragment_compose.xml | 4 +- 3 files changed, 9 insertions(+), 49 deletions(-) delete mode 100644 app/src/main/java/eu/faircode/email/FixedScrollView.java diff --git a/app/src/main/java/eu/faircode/email/FixedScrollView.java b/app/src/main/java/eu/faircode/email/FixedScrollView.java deleted file mode 100644 index 0fa0c0e76a..0000000000 --- a/app/src/main/java/eu/faircode/email/FixedScrollView.java +++ /dev/null @@ -1,47 +0,0 @@ -package eu.faircode.email; - -/* - This file is part of FairEmail. - - FairEmail is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - FairEmail is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with FairEmail. If not, see . - - Copyright 2018-2020 by Marcel Bokhorst (M66B) -*/ - -import android.content.Context; -import android.util.AttributeSet; -import android.view.View; -import android.widget.ScrollView; - -public class FixedScrollView extends ScrollView { - public FixedScrollView(Context context) { - super(context); - } - - public FixedScrollView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public FixedScrollView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public FixedScrollView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - @Override - public void requestChildFocus(View child, View focused) { - } -} diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index eb5a1ee94f..b2d084be22 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -47,6 +47,7 @@ import android.net.Network; import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.OperationCanceledException; @@ -576,6 +577,12 @@ public class FragmentCompose extends FragmentBase { etBody.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT); tvReference.setTypeface(monospaced ? Typeface.MONOSPACE : Typeface.DEFAULT); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { + etBody.setRevealOnFocusHint(false); // Doesn't work + tvSignature.setRevealOnFocusHint(false); + tvReference.setRevealOnFocusHint(false); + } + style_bar.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { diff --git a/app/src/main/res/layout/fragment_compose.xml b/app/src/main/res/layout/fragment_compose.xml index b424abf7f2..651f677193 100644 --- a/app/src/main/res/layout/fragment_compose.xml +++ b/app/src/main/res/layout/fragment_compose.xml @@ -11,7 +11,7 @@ android:layout_height="match_parent" app:layout_behavior="eu.faircode.email.BehaviorBottomPadding"> - - +