1

I've a sample Login activity like below. But Why am I getting the Rendering issues? Preview

When I try to refresh the screen, there is a layover like below. Preview

How can I fix this?

Here is my code

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<TextView android:text="Login With Facebook"

    android:id="@+id/btnLogin"
    android:padding="16dp"
    android:layout_centerInParent="true"
    android:background="#494949"
    android:textColor="#fff"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

<com.facebook.login.widget.LoginButton
    android:visibility="gone"
    android:id="@+id/login_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:layout_marginTop="30dp"
    android:layout_marginBottom="30dp" />

</RelativeLayout>
Spark
  • 371
  • 6
  • 15
  • I think this is a duplicate: http://stackoverflow.com/questions/21070890/unable-to-reference-com-facebook-widget-loginbutton (If not, tell us that you've already done all the things in this question, and explain that here too) – Baronz Apr 02 '16 at 21:30
  • Try to build your project. Does the problem persist? It's because that custom button, this happened to me a lot of times. Sometimes I just close it and ignore it. – Jerry Apr 02 '16 at 21:33
  • @Baronz: I've already added my facebook sdk to my gradle build. That doesn't resolve my issue – Spark Apr 02 '16 at 21:48
  • 1
    You have to build the app in order for the Facebook views to be loaded, adding to the Gradle build just says you want to download the dependencies – OneCricketeer Apr 02 '16 at 21:51
  • @cricket_007 : Tried it. Doesn't work!! – Spark Apr 02 '16 at 22:53
  • Possible duplicate of [Android Studio 1.1.0 Facebook SDK Login](http://stackoverflow.com/questions/29268738/android-studio-1-1-0-facebook-sdk-login) – OneCricketeer Apr 02 '16 at 23:00

0 Answers0