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 6902379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:47:26+00:00 2026-05-27T07:47:26+00:00

I have class CalloutView extended from RelativeLayout . Currently has no any methods, it

  • 0

I have class CalloutView extended from RelativeLayout. Currently has no any methods, it just redefines constructors.

I also have an XML layout for it:

<?xml version="1.0" encoding="utf-8"?>
<com.example.CalloutView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="70dp">

    <ImageButton
        android:id="@+id/imageButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginRight="6dp"
        android:layout_marginTop="6dp"
        android:background="@drawable/button_disclose"
        android:src="@drawable/disclose" />

</com.example.CalloutView>

I inflate layout of instance of CalloutView by this code:

this.calloutView = (CalloutView) ((LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.callout_view, null);
this.calloutView.setLayoutParams(new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, 105));
this.calloutView.measure(MeasureSpec.makeMeasureSpec(400, MeasureSpec.AT_MOST),  MeasureSpec.makeMeasureSpec(105, MeasureSpec.EXACTLY));

It renders perfectly. ImageButton appears on the right side of it like it should.

But when I add a background to CalloutView:

<com.example.CalloutView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="70dp"
    android:background="@drawable/callout">
...
</com.example.CalloutView>

It renders only background, but ImageButton doesn’t appear.


Edit

I use NinePatch image as a background. If I replace it with non-NinePatch everything works fine. Bug in Android?


The main question is, why it ImageButton isn’t rendered, if background is set?

  • 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-27T07:47:27+00:00Added an answer on May 27, 2026 at 7:47 am

    It looks like a bug in Android 2.3.3. I use my PNG file as NinePatch as background, I get this issue. If I use another NinePatch, everything works like it should.

    I can’t reproduce this issue on Android 3.1.

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

Sidebar

Related Questions

I have class A that has some primitive attributes and also member of type
I have class A: public class ClassA<T> Class B derives from A: public class
I have class A and class B. class A has a bunch of variables
I have class B that has class A, this is simplified version of class
I have class User that contains protected constructor and class Account that has access
I have class methods like these in a message model: def delete_all_users_messages(user_id, parent_id) message
I have class which has a method that needs to return three DataTables. I
I have class MyForm which inherited from QMainWindow . Here's my code: std::auto_ptr<MyForm> pForm(new
I have class, that has a NSString. @interface AudioManager : NSObject { AudioData *data_;
I have class that has a property that is of type string[]. I need

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.