Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: logo getting cropped in landscape mode of login page #6106

Conversation

QuantumPineapple68
Copy link
Contributor

@QuantumPineapple68 QuantumPineapple68 commented Jan 5, 2025

Description
Type of change: Bug fix (non-breaking change which fixes an issue)
Fixed logo getting cropped when the device is in landscape mode.
The login frame is moved to the center for better visuals in vertical mode.

What changes did I made and why?

  1. Added android:layout_gravity="center_vertical" to ScrollView and LinearLayout
  2. The Login FrameLayout will always appear at the centre of the screen for better visuals irrespective of screen size.
  3. After rotating the screen, the logo will not get cropped irrespective of screen size.

Tests performed (required)

  • Code is Tested and Verified by myself.
  • Testing Devices:
  • Samsung A21s
  • Samsung M14

Screenshots (for UI changes only)
BEFORE:
36306482-ebe0c0d8-133d-11e8-8873-9a1b751d273e

AFTER:
Screenshot_20250105-174440_Commons
Screenshot_20250105-174434_Commons

@QuantumPineapple68
Copy link
Contributor Author

Thanks for noticing. it has been fixed!

Copy link
Contributor

@Sujal-Gupta-SG Sujal-Gupta-SG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by GSoC applicant

I don't think this is needed , i've run both without change and after change both are correct may be in some device there can be issue But i think this change is Better

The login card is in center which looks Good and better than before

**Tests performed **

Tested on:

  • Build variant: ProdDebug
  • Device: Realme Narzo 20
  • API Level: 30-ext15

@QuantumPineapple68
Copy link
Contributor Author

Thanks for the review! 😊

@misaochan
Copy link
Member

Thanks @QuantumPineapple68 !

@misaochan misaochan merged commit fdbe504 into commons-app:main Jan 7, 2025
@QuantumPineapple68 QuantumPineapple68 deleted the fix/login-logo-getting-cropped-#1159 branch January 8, 2025 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icon is getting cropped in LoginPage, while using the app in Landscape mode
3 participants