From a9b38bd19c6fa17c632128ac236a86b574512485 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Thu, 22 Apr 2021 16:32:58 +1000 Subject: [PATCH] hide the input panel when editing nicknames --- .../conversation/ConversationActivity.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java index d48bcc893f..daed247f8d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -17,6 +17,8 @@ package org.thoughtcrime.securesms.conversation; import android.Manifest; +import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.content.ActivityNotFoundException; @@ -399,8 +401,20 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity textView.setText(getRecipient().getName()); } imm.hideSoftInputFromWindow(v.getWindowToken(),0); + inputPanel.animate().alpha(1f).setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + inputPanel.setVisibility(View.VISIBLE); + } + }); cancelButtonContainer.setVisibility(View.GONE); } else { + inputPanel.animate().alpha(0f).setListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + inputPanel.setVisibility(View.INVISIBLE); + } + }); String nickname = DatabaseFactory.getStorage(this).getDisplayName(getRecipient().getAddress().serialize()); titleTextView.setText(nickname); titleTextView.setSelection(nickname.length());