I'm trying to integrate some Facebook stuff (posting on your own "wall") in my TabView. The problem I'm facing is that while I do not have the Facebook app installed, I get a Webview showing the login and posting. It shows nicely, except for the buttons at the bottom. If I scroll down to see the buttons, they just go a little bit lower.
The layout of the tab:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingBottom="40dip">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/Test_Facebook_Layout">
<Button android:id="@+id/facebookButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Login to facebook"/>
</LinearLayout>
</ScrollView>
Got all the code (except the parts I changed and will post below) from here.
public void onClick(View v)
{
if (v == facebookButton)
{
facebookClient = new Facebook("myAwesomeKey");
facebookClient.authorize(this, new String[] {"publish_stream", "read_stream", "offline_access"}, this);
}
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//https://stackoverflow.com/questions/2953146/android-java-post-simple-text-to-facebook-wall
setContentView(R.layout.detailsfacebooktab);
facebookButton = (Button)this.findViewById(R.id.facebookButton);
facebookButton.setOnClickListener(this);
}
What would be nice is either a) Getting the WebView to not fill my screen or b) Keep the buttons from scrolling away.
EDIT: Because a picture says more than a thousend words, here's three thousand words. (if it isn't clear, Picture 1 shows the initial view, Picture 2 shows my scrolling down, Picture 3 shows the buttons getting away)
For the moment I found a c) Getting the buttons a bit higher. The problem is the user can still scroll the WebView, enlarging the View and scrolling the buttons back down again.
I edited these values in com.facebook.android.fbDialog.java
to show the buttons a bit more.
static final float[] DIMENSIONS_LANDSCAPE = {440, 260};
static final float[] DIMENSIONS_PORTRAIT = {280, 380};
Because this does not completely solve my problem, I've edited my OP instead of posting my own "answer".
Thank you,
iarwain01