проблемы с подключением через Facebook - PullRequest
0 голосов
/ 02 марта 2011

Я использую eclipse и эмулятор Android для приложения FBconnect (работает на версии 2.2).

Проблема, с которой я сталкиваюсь, заключается в том, что при запуске приложения я не вижу никаких функций, таких как кнопка входа в систему, кнопка доступа ....

все, что отображается, это пустое диалоговое окно «подключиться к Facebook». Я посмотрел на класс main.xml и в графическом представлении кнопки существуют, но кажутся мне прозрачными.

XML-код выглядит следующим образом:

<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>

все кнопки входа в систему, accessButton и feedButton вызываются в моем классе MainActivity.

Может кто-нибудь помочь?

1 Ответ

0 голосов
/ 13 августа 2011

Вы забыли начальный тег <LinearLayout> поэтому для его завершения необходимо:

<?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>
...