Я не могу добавить пользовательскую кнопку в приложение для Android. Когда я запустил ее в консоли, она продолжает показывать следующую ошибку в Logcat и принудительно закрывает. Может кто-нибудь помочь в решении этой проблемы?Пользовательская кнопка в android
04-18 10: 59: 00.785: E/AndroidRuntime (368): java.lang.RuntimeException: не удается запустить активность ComponentInfo {com.bsm.rssreader/com.bsm.rssreader.headlines}: android.view .InflateException: Binary XML файл строка # 75: Ошибка при наполнении класса
вот мой файл XML,
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_weight="14.08"
android:scaleType="fitXY"
android:src="@drawable/logo" />
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</HorizontalScrollView>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="246dp"
android:layout_weight="26.53" >
<ListView
android:id="@+id/listView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#b5b5b5"
android:dividerHeight="1dp"
android:listSelector="@drawable/list_selector" />
</FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="30dp" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
android:src="@drawable/foot" />
<Button
android:id="@+id/about"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/aboutbutton" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/about"
android:background="@drawable/ratebtn" />
</RelativeLayout>
</LinearLayout>
</TabHost>
http://pastebin.com/FgnVBBwj проверить это для полного LogCat. –
опубликуйте свой файл xml ... – 5hssba
эта проблема возникает только при добавлении пользовательской кнопки. –