Browse Source

Removed haptic feedback

main
M66B 5 years ago
parent
commit
ef621f3481
8 changed files with 1 additions and 37 deletions
  1. +0
    -2
      app/src/main/java/eu/faircode/email/AdapterMessage.java
  2. +0
    -2
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  3. +0
    -2
      app/src/main/java/eu/faircode/email/FragmentMessage.java
  4. +0
    -1
      app/src/main/java/eu/faircode/email/FragmentMessages.java
  5. +0
    -10
      app/src/main/java/eu/faircode/email/FragmentOptions.java
  6. +0
    -8
      app/src/main/java/eu/faircode/email/Helper.java
  7. +1
    -11
      app/src/main/res/layout/fragment_options.xml
  8. +0
    -1
      app/src/main/res/values/strings.xml

+ 0
- 2
app/src/main/java/eu/faircode/email/AdapterMessage.java View File

@ -538,8 +538,6 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
}
private void onExpandMessage(int pos, EntityMessage message) {
Helper.hapticFeedback(itemView);
if (expanded.get(message.id) == null)
expanded.put(message.id, true);
else


+ 0
- 2
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -195,8 +195,6 @@ public class FragmentCompose extends FragmentEx {
public void onFocusChange(View view, boolean hasFocus) {
free = hasFocus;
Helper.hapticFeedback(view);
getActivity().invalidateOptionsMenu();
grpHeader.setVisibility(hasFocus ? View.GONE : View.VISIBLE);


+ 0
- 2
app/src/main/java/eu/faircode/email/FragmentMessage.java View File

@ -352,8 +352,6 @@ public class FragmentMessage extends FragmentEx {
public void onClick(View view) {
free = true;
Helper.hapticFeedback(view);
getActivity().invalidateOptionsMenu();
grpHeader.setVisibility(View.GONE);


+ 0
- 1
app/src/main/java/eu/faircode/email/FragmentMessages.java View File

@ -379,7 +379,6 @@ public class FragmentMessages extends FragmentEx {
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Helper.hapticFeedback(view);
startActivity(new Intent(getContext(), ActivityCompose.class)
.putExtra("action", "new")
.putExtra("account", (Long) fab.getTag())


+ 0
- 10
app/src/main/java/eu/faircode/email/FragmentOptions.java View File

@ -37,7 +37,6 @@ public class FragmentOptions extends FragmentEx {
private CheckBox cbLight;
private CheckBox cbBrowse;
private CheckBox cbSwipe;
private CheckBox cbHaptic;
private CheckBox cbDebug;
@Override
@ -53,7 +52,6 @@ public class FragmentOptions extends FragmentEx {
cbLight = view.findViewById(R.id.cbLight);
cbBrowse = view.findViewById(R.id.cbBrowse);
cbSwipe = view.findViewById(R.id.cbSwipe);
cbHaptic = view.findViewById(R.id.cbHaptic);
cbDebug = view.findViewById(R.id.cbDebug);
// Wire controls
@ -104,14 +102,6 @@ public class FragmentOptions extends FragmentEx {
}
});
cbHaptic.setChecked(prefs.getBoolean("haptic", true));
cbHaptic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("haptic", checked).apply();
}
});
cbDebug.setChecked(prefs.getBoolean("debug", false));
cbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override


+ 0
- 8
app/src/main/java/eu/faircode/email/Helper.java View File

@ -23,7 +23,6 @@ import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.TypedArray;
@ -32,7 +31,6 @@ import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
@ -84,12 +82,6 @@ public class Helper {
}
};
static void hapticFeedback(View view) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(view.getContext());
if (prefs.getBoolean("haptic", true))
view.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
}
static void view(Context context, Intent intent) {
Uri uri = intent.getData();
if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme()))


+ 1
- 11
app/src/main/res/layout/fragment_options.xml View File

@ -61,16 +61,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbBrowse" />
<CheckBox
android:id="@+id/cbHaptic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_haptic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbSwipe" />
<CheckBox
android:id="@+id/cbDebug"
android:layout_width="wrap_content"
@ -79,6 +69,6 @@
android:layout_marginTop="12dp"
android:text="@string/title_advanced_debug"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbHaptic" />
app:layout_constraintTop_toBottomOf="@id/cbSwipe" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

+ 0
- 1
app/src/main/res/values/strings.xml View File

@ -84,7 +84,6 @@
<string name="title_advanced_light">Use notification light</string>
<string name="title_advanced_browse">Browse messages on the server</string>
<string name="title_advanced_swipe">Swipe actions</string>
<string name="title_advanced_haptic">Haptic feedback</string>
<string name="title_advanced_debug">Debug mode</string>
<string name="title_select">Select &#8230;</string>


Loading…
Cancel
Save