开发者

facebook connect api GUI problems

I am using eclipse and the android emulator to a FBconnect application (running on version 2.2).

the problem that I am having is that, when I run my application I cant see any functions such as login button, permission button....

all that is displayed is a empty "connect to facebook" dialogue box. I have looked at the main.xml class and in the graphical view the buttons do exist but seem to me transparent.

the xml code looks as follows:

<Button android:text="@+id/login"
    android:id="@+id/login" 
    android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     />

<TextView android:id="@+id/label" 
    android:textColor="@drawable/black"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="30dp"
    />

<Button android:text="@+id/permissionButton"
    android:id="@+id/permissionButton" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    />

<Button android:text="@+id/feedButton" 
    android:id="@+开发者_StackOverflowid/feedButton" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    />

    </LinearLayout>

the login, permissionButton, and feedButton button are all called withing my MainActivity class.

can anyone help?


You forget the starting tag <LinearLayout> so to complete it should be :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
>
    <Button android:text="@+id/login"
    android:id="@+id/login" 
    android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     />

<TextView android:id="@+id/label" 
    android:textColor="@drawable/black"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="30dp"
    />

<Button android:text="@+id/permissionButton"
    android:id="@+id/permissionButton" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    />

<Button android:text="@+id/feedButton" 
    android:id="@+id/feedButton" 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    />

    </LinearLayout>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜