2012-04-18 6 views
0

アンドロイドアプリケーションにカスタムボタンを追加できません。コンソールで実行すると、Logcatで次のエラーが表示され、強制的に閉じることができます。誰でもこの問題を解決できますか?アンドロイドのカスタムボタン

04-18 10:59:00.785:E/AndroidRuntime(368):java.lang.RuntimeException:アクティビティを開始できませんでした。ComponentInfo {com.bsm.rssreader/com.bsm.rssreader.headlines}:android.view .InflateException:バイナリ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> 
+0

http://pastebin.com/FgnVBBwjが完了Logcatのためにこれを確認することができます。 –

+0

あなたのxmlファイルを投稿してください... – 5hssba

+0

この問題は、カスタムボタンを追加した場合にのみ発生します。 –

答えて

0

はあなたのlogcatからこの行を確認しましたか?

34行目:4月18日10:59:00.785:E/AndroidRuntime(368):java.lang.OutOfMemoryErrorを::によって発生するビットマップのサイズはVMの予算

を超えるたぶん、あなたは、メモリの問題を抱えていますbutton1の画像のためにリークします。

This postまたはthis post

+0

答えにないコメントにそのようなことを書いてください。 – Bhavin

+0

申し訳ありませんが、私はできません。 – gutiory

+0

しないでください、そうでない場合は、何人かがdownVoteを返すでしょう、答えではないからです... – Bhavin

関連する問題