Giter Site home page Giter Site logo

Comments (20)

soneff avatar soneff commented on April 19, 2024

Ya, this is a known issue -- I've asked our designer for another version of the dialogs that will work on small screens (and to simplify the existing dialogs), but there is no ETA.

from facebook-android-sdk.

skreeky avatar skreeky commented on April 19, 2024

Hi, I got the same problem trying to login from an HTC Tattoo. The screen is too small. Is this an issue with the web page coming from Facebook? I tried changing the portrait size in the SDK code and/or setting display=wap instead. Nothing helped to fully fix the problem. display=wap made the buttons visible but the login was run in the web browser...

from facebook-android-sdk.

dephan avatar dephan commented on April 19, 2024

The issue is actually that the javascript run in the webview asks the phone browser for screen dimensions. The phone browser reports its actual size (full size including the status bar) and then the javascript sizes itself accordingly.

It's not a problem for larger screens as there is slack enough for the items to fit anyway. Thus, the hardcoded values in the dialog have zero effect on the size on screen.

from facebook-android-sdk.

skreeky avatar skreeky commented on April 19, 2024

After some testing I ended up commenting out the line setLayoutParams(FILL) call in setUpWebView(). Now the buttons are shown on an HTC Tattoo with small screen. It is not nice, but it works for now. Time to release our app :-)

from facebook-android-sdk.

lshepard avatar lshepard commented on April 19, 2024

If you migrate your app to the new data permissions, then you should find a much nicer login flow that works on a smaller screen.

from facebook-android-sdk.

skreeky avatar skreeky commented on April 19, 2024

What is involved in migrating to the new data permissions? Can you provide a link or an example?

from facebook-android-sdk.

dephan avatar dephan commented on April 19, 2024

No, that does not help. I'm using the new data permissions already.

from facebook-android-sdk.

dephan avatar dephan commented on April 19, 2024

This issue is solved after the server-side update.

from facebook-android-sdk.

skreeky avatar skreeky commented on April 19, 2024

Server-side update = changes on the facebook.com side?

from facebook-android-sdk.

SteveMil avatar SteveMil commented on April 19, 2024

It is still an issue for us. We are getting reports from customers on phones like the Tattoo and X10 mini. The issue for us is not the sign-in dialog (which now looks really ugly), but the permissions dialog.

We are using the new permissions and are asking for "publish_stream" and "offline_access". The permissions dialog doesn't have enough room to show the "Don't Allow" and "Allow" buttons.

I've tried scrolling down, but scrolling is not supported with the current SDK code and permissions page. I've tried using the keyboard to get to the off-screen "Accept" button, but Android doesn't allow the user to click on off-screen buttons/links. On other devices where I can see the "Allow" button, I can DOWN arrow to the bottom, press RIGHT once, then press ENTER. Doesn't work on the LDPI screens where the button is not visible. I've tried flipping between landscape and portrait as well, but can never get to the "Accept" button.

At this point, we have nothing helpful to tell customers. We'll probably have to make a code change to work around the issue and do another release.

from facebook-android-sdk.

dephan avatar dephan commented on April 19, 2024

skreeky: Yes, they (facebook.com) changed the layout of the login java script we are accessing.
SteveMil: I did a workaround locally for the problem that worked. The problem is tied to the fact that the webview the sdk is using is connected to the browser in the phone (or its user_agent). When the java script runs in the webview and queries for screen size it gets the full pixel size of the screen (and not the size of the webview window). This means that you end up with a javascript that assumes it has the whole screen while it actually doesn't. We have status bar and a frame around the view and so on..

The workaround is to change the dialog into a separate activity instead of extending Dialog. In you manifest.xml you can set this activity to have fullscreen mode (no status bar), and thus the correct size is given to the script and everything will fit on the screen.

from facebook-android-sdk.

SteveMil avatar SteveMil commented on April 19, 2024

Thanks for the tip dephan. I'll look into making the change (I'd still prefer to keep it as a dialog and have Facebook do the work-around on their side :). I need to make a code change anyway since I just realized the Facebook client crashes on OS 1.5, and the only fix to that is a code change.

from facebook-android-sdk.

badmetacoder avatar badmetacoder commented on April 19, 2024

Skip and Publish buttons do not appear on the bottom of the stream.publish dialog. on small screens (QVGA).

from facebook-android-sdk.

 avatar commented on April 19, 2024

When is support for small screens coming?

from facebook-android-sdk.

ChrisDavis8 avatar ChrisDavis8 commented on April 19, 2024

I detected that the screen was small and set the dimensions to 240x320 in fbdialog.java
When the permission page was displayed it was not perfect but the buttons were visible and I could scroll the page, cant work out what it is that allows the scroll though; maybe the page width??

from facebook-android-sdk.

 avatar commented on April 19, 2024

I found that the web view didnt have any focus which prevented the scrolling.
mWebView.requestFocus(); in the setupWebView method seemed to help

from facebook-android-sdk.

SteveMil avatar SteveMil commented on April 19, 2024

Thanks people. There was enough info in this thread for me to fix the issue on my side. Like others have eluded to, the problem is that the SDK has two hard-coded sizes for the content view of the dialog. If the view is larger than the max dialog size (always true on LDPI), then the browser control just gets clipped by the dialog. The reason you cannot scroll is that the web control doesn't think it needs to scroll since it is physically large enough to hold the entire website (even though it is clipped by the dialog).

The quick fix for me was to just change the math for how they compute the size in FbDialog.onCreate(). I'm passing this to the LayoutParams constructor...

display.getWidth() - (int)((float)26 * scale),
display.getHeight() - (int)((float)51 * scale)

Those values generate the largest possible view that a dialog can contain on LDPI, MDPI, and HDPI (both 800 and 854 high screens) for both portrait and landscape modes.

The only other issue I had was screen rotation (my AndroidManifest.xml allows this without a dialog restart). So, whenever I detect the screen rotated, I just call setLayoutParams on the content view again and that fixes the dialog up.

from facebook-android-sdk.

 avatar commented on April 19, 2024

When publishing a wall post does the image associated with the wall post get up-scaled if its too small as that's what appears to happen in my tests.
I generally have an image that is 128x128 for the larger screens and that appears OK on MDPI and HDPI screens but on LDPI that dialog data appeared mangled and when I tried smaller images they appeared much larger than they should be for such a small screen which made me think Facebook might be stretching the images to make them larger.

from facebook-android-sdk.

jimbru avatar jimbru commented on April 19, 2024

This issue should be resolved with my latest commit: 5d44d0c

Hopefully this will be a useful fix. If the issue persists for anyone, feel free to comment here.

from facebook-android-sdk.

skreeky avatar skreeky commented on April 19, 2024

Hi!

Thank you for emailing [email protected].
We will have a look at your email and get back to you when possible.

Regards,
The Skreeky Team

from facebook-android-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.