我正在尝试创建一个按钮。我之前做过这样的事情,但现在我得到了一个错误,我无法找出它是什么。我想我已经得到了在XML文件中的问题,但无法找到它:SAndroid - 布局错误
因此,有我的XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageButton
android:id="@+id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="115dp"
android:layout_marginTop="80dp"
android:src="@drawable/login_button" />
</RelativeLayout>
我试图实施某种Facebook登录。我正在使用easyfacebook sdk。因此,这里是java的代码,我想实现的登录按钮:
我得到的消息是:
W/WebCore的(29941)后,无法获得viewWidth第一布局
E/SkLayout_wtle(29941):布局错误:106宽度:0 ellipsizedWidth:0
W/InputManagerService(1171):窗口已经聚焦,忽略聚焦增益的:com.android.internal。 view.IInputMethodClient $ S tub $ Proxy @ 405c4e68
你能更具体吗? 什么是ImageButton的父视图。 何时何地发生此错误。 我们可以看到代码片段,因此更易于调试。 – Pankaj 2012-02-25 16:27:21
对不起。当我点击按钮时,我会收到这些消息。 – user1162316 2012-02-25 16:31:06
第5行是否要读取“... 80dp”而不是“... 80sp”? – Jon 2012-02-25 16:34:58