Skip to content

Commit

Permalink
[SEViewFragment] Resolved Scrolling Issue in UI
Browse files Browse the repository at this point in the history
Fixed a critical issue that was preventing scrolling in the user interface, restoring smooth navigation and enhancing user experience.
  • Loading branch information
OffRange committed Dec 24, 2023
1 parent f6d6bd4 commit ccf479f
Show file tree
Hide file tree
Showing 3 changed files with 360 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package de.davis.passwordmanager.ui.elements;

import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.TypedValue;
import android.view.View;

import androidx.annotation.NonNull;
Expand All @@ -28,6 +30,15 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

ActivityResultManager arm = ActivityResultManager.getOrCreateManager(getClass(), this);
arm.registerEdit(this::setElement);

float screenWidthDp = getResources().getConfiguration().screenWidthDp;
if(screenWidthDp >= 600)
return;

float dip = 56+16*2;
Resources r = requireContext().getResources();
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, r.getDisplayMetrics());
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), (int) px);
}

@Override
Expand Down
Loading

0 comments on commit ccf479f

Please sign in to comment.