diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-03-04 06:23:50 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-03-04 06:23:50 +0000 |
commit | ae5de1f46b6c971b19abb3bd650ef1143baa17cd (patch) | |
tree | 8385813e6a111dbd64a78ccbcba5a8795263e5e9 /app/src | |
parent | efcfa0ae71c90796b1995737d4feac46fe3542b1 (diff) | |
download | infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.tar infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.tar.gz infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.tar.bz2 infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.tar.lz infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.tar.xz infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.tar.zst infinity-for-reddit-ae5de1f46b6c971b19abb3bd650ef1143baa17cd.zip |
Fix edit text hidden under keyboard in ViewPrivateMessagesActivity.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java index 12f2d4a7..77df7de1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java @@ -7,8 +7,6 @@ import android.os.Bundle; import android.os.Handler; import android.view.MenuItem; import android.view.View; -import android.view.Window; -import android.view.WindowManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; @@ -16,10 +14,6 @@ import android.widget.LinearLayout; import androidx.annotation.NonNull; import androidx.appcompat.widget.Toolbar; import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.graphics.Insets; -import androidx.core.view.ViewCompat; -import androidx.core.view.WindowInsetsAnimationCompat; -import androidx.core.view.WindowInsetsCompat; import androidx.recyclerview.widget.RecyclerView; import androidx.transition.AutoTransition; import androidx.transition.TransitionManager; @@ -33,7 +27,6 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import java.util.ArrayList; -import java.util.List; import java.util.concurrent.Executor; import javax.inject.Inject; @@ -116,7 +109,7 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit protected void onCreate(Bundle savedInstanceState) { ((Infinity) getApplication()).getAppComponent().inject(this); - //setImmersiveModeNotApplicable(); + setImmersiveModeNotApplicable(); super.onCreate(savedInstanceState); @@ -134,30 +127,6 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit addOnOffsetChangedListener(mAppBarLayout); } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - Window window = getWindow(); - - if (isChangeStatusBarIconColor()) { - addOnOffsetChangedListener(mAppBarLayout); - } - - if (isImmersiveInterface()) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - window.setDecorFitsSystemWindows(false); - } else { - window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS); - } - adjustToolbar(mToolbar); - - int navBarHeight = getNavBarHeight(); - if (navBarHeight > 0) { - LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mEditTextLinearLayout.getLayoutParams(); - params.bottomMargin += navBarHeight; - mEditTextLinearLayout.setLayoutParams(params); - } - } - } - setSupportActionBar(mToolbar); setToolbarGoToTop(mToolbar); @@ -176,23 +145,6 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit } else { EventBus.getDefault().post(new PassPrivateMessageIndexEvent(getIntent().getIntExtra(EXTRA_PRIVATE_MESSAGE_INDEX, -1))); } - - ViewCompat.setWindowInsetsAnimationCallback( - mCoordinatorLayout, - new WindowInsetsAnimationCompat.Callback( - WindowInsetsAnimationCompat.Callback.DISPATCH_MODE_CONTINUE_ON_SUBTREE - ) { - @NonNull - @Override - public WindowInsetsCompat onProgress(@NonNull WindowInsetsCompat insets, @NonNull List<WindowInsetsAnimationCompat> runningAnimations) { - Insets typesInset = insets.getInsets(WindowInsetsCompat.Type.ime()); - Insets otherInset = insets.getInsets(WindowInsetsCompat.Type.systemBars()); - Insets diff = Insets.max(Insets.NONE, Insets.subtract(typesInset, otherInset)); - - mCoordinatorLayout.setPadding(0, 0, 0, diff.bottom); - return insets; - } - }); } private void bindView() { |