Skip to content

Commit 0114dd5

Browse files
committed
[SEViewFragment] Resolved Scrolling Issue in UI
Fixed a critical issue that was preventing scrolling in the user interface, restoring smooth navigation and enhancing user experience. (cherry picked from commit ccf479f)
1 parent 2fe34a5 commit 0114dd5

File tree

3 files changed

+360
-13
lines changed

3 files changed

+360
-13
lines changed

app/src/main/java/de/davis/passwordmanager/ui/elements/ViewSecureElementFragment.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package de.davis.passwordmanager.ui.elements;
22

33
import android.content.res.Configuration;
4+
import android.content.res.Resources;
45
import android.os.Bundle;
6+
import android.util.TypedValue;
57
import android.view.View;
68

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

2931
ActivityResultManager arm = ActivityResultManager.getOrCreateManager(getClass(), this);
3032
arm.registerEdit(this::setElement);
33+
34+
float screenWidthDp = getResources().getConfiguration().screenWidthDp;
35+
if(screenWidthDp >= 600)
36+
return;
37+
38+
float dip = 56+16*2;
39+
Resources r = requireContext().getResources();
40+
float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, r.getDisplayMetrics());
41+
view.setPadding(view.getPaddingLeft(), view.getPaddingTop(), view.getPaddingRight(), (int) px);
3142
}
3243

3344
@Override

0 commit comments

Comments
 (0)