Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 741121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:35:44+00:00 2026-05-14T08:35:44+00:00

I have a crash (Application Stopped Unexpectedly) problem with this main.xml is a HelloWorld

  • 0

I have a crash (Application Stopped Unexpectedly) problem with this main.xml is a “HelloWorld” type project (while testing and learning features I need for my app) :

I isolated the ImageButton as an issue, but I can’t isolate any of the parameters…

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" >

    <ImageButton android:id="@+id/picture"    
    android:layout_width="240dip"    
    android:layout_height="180dip"
    android:layout_gravity="center_horizontal"
    android:src="@drawable/icon"
    android:adjustViewBounds="true"     
    android:cropToPadding="true"    
    android:clickable="true"    
    android:scaleType="fitCenter" />    

</LinearLayout>

icon.png exists in my resources…
I can see the preview in the Layout tab, even though the image is not centered on the button, but I read that it was normal.

The code below works fine (as a regular Button). I can also do the same as an ImageView.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" >

    <Button android:id="@+id/picture"
    android:layout_width="240dip"
    android:layout_height="180dip"
    android:layout_gravity="center_horizontal" />

</LinearLayout>

I use Eclipse and the AVD, and all my learning is done on 2.1 (SDK level 7).
I can’t test the app on an actual device yet as I don’t have it yet.

Thanks in advance !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:35:44+00:00Added an answer on May 14, 2026 at 8:35 am

    Oh bother !!
    It seems that it was a java error in my MyApp.java, when I was trying to declare the event for the button. Case closed. Sorry.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application and I am analyzing memory crash dumps of this software.
I have a problem with a strange crash on iPad 5.0. This crash only
So i have this crash log from my application. I don't have much experience
I have one application and in beta testing i got my application crash but
any one have any idea why application crash on this place In code I
When I click Settings in my application's menu, app crash instantly. I don't have
I have devoleped an application and the problem with that application is that Its
Is there a way to release com objects at application crash? I have the
I have interesting problem with my UiimageViews. I have an application (game with 2
I have this crash error : * Terminating app due to uncaught exception 'NSInternalInconsistencyException',

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.