Issue
I have inherited some code and I'm working on it, however, when I try to build it I get the following issue:
activity_login.xml:26: error: No resource identifier found for attribute 'login_text' in package
My button xml is as follows:
<com.facebook.widget.LoginButton
xmlns:fb="http://schemas.android.com/apk/res-auto"
android:id="@+id/facebookBtn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:textColor="@color/white"
android:textAppearance="@android:style/TextAppearance.Small"
android:gravity="center"
android:onClick="facebookBtnClick"
android:paddingLeft="30dp"
fb:login_text="@string/loginWithFacebook"
/>
I have also tried putting in xmlns:fb="http://schemas.android.com/apk/res/com.facebook.widget"
but this didn't work for me either, if anyone has any suggestions I'd greatly appreciate it
Solution
You can find info here https://developers.facebook.com/docs/android/upgrading-4.x
Style attr tags are now namespaced to avoid conflicts. Apps will need to add the namespace "com_facebook_" to their existing facebook sdk style attrs.
So, use fb:com_facebook_login_text
now.
Answered By - Artem
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.