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
Bad Dialog size on large screens #30
Comments
A patch: 1/ change the declaration of attributes DEFAULT_LANDSCAPE and DEFAULT_PORTRAIT in FbDialog with: // Patch bug #30 - BEGIN 2/ Add the following code to method FbDialog.onCreate(Bundle savedInstanceState), just after super.onCreate(savedInstanceState); // Patch bug #30 - BEGIN |
I have a slightly different solution than Korriged in my fork of facebook-android-sdk: I scale the pixel values by the resolution density, but Korriged solution which insets the dialog from the screen size is also viable. However, it will be inset differently on high and low resolution screens, since 60px will be a different physical difference on an hdpi screen as opposed to an mdpi screen; probably the best solution would scale those values based on the screen density. |
Hey, sorry for not being able to look into this sooner. I just read up on Android screen configurations, and I think that Pretz's solution is more robust (essentially density independent pixels approach). I'll pull your branch, test it, and try to push a change today. |
I've tested on all the devices I have and it looks alright, so I've push this out. Thanks Alex! Let me know if you have any more problems / fixes. |
Update all Facebook SKDs to 4.18 Reviewed by @Redth and @SotoiGhost
FbDialog (which displays the Facebook login web page) is well displayed on 320x480 "default-size" screens (e.g. HTC Hero and Motorola Dext)... but is very small on larger screens (e.g. 480x800 HTC Desire and 480x854 Motorola Droid/Milestone).
The cause is that sizes are hard-coded in FbDialog:
static final LayoutParams DEFAULT_LANDSCAPE = new LayoutParams(460, 260);
static final LayoutParams DEFAULT_PORTRAIT = new LayoutParams(280, 420);
The text was updated successfully, but these errors were encountered: