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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:16:03+00:00 2026-05-16T22:16:03+00:00

I have a widget layout xml which sets the src to the delivered android

  • 0

I have a widget layout xml which sets the src to the delivered android widget 4×1 frame image.Here is the widget layout code.

<?xml version="1.0" encoding="utf-8" ?> 
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"  
 android:id="@+id/tuwidget" android:layout_width="fill_parent" 
 android:layout_height="fill_parent">
<ImageView android:id="@+id/tuwidget_img_btn" 
 android:src="@drawable/widgetinitial" 
 android:layout_width="fill_parent" 
 android:layout_height="wrap_content" /> 
</AbsoluteLayout>

@drawable/widgetinitial holds the widgetinitial.png image example 4×1 at developer.android.com (AppWidget design guidelines).(4x1_Widget_Frame_Portrait.psd) What I am trying to do is display an image inside the delivered frame instead what happens is the frame image goes away and only the image I am trying to display shows up. How can I display the image inside the bounding box or the background?
Any help is much appreciated.

Another question – I think I saw in a couple of forums AbsoluteLayout is a deprecated feature for Android 2.1 and above. Is that correct? and does using AbsoluteLayout throws any force close or other exceptions?

  • 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-16T22:16:04+00:00Added an answer on May 16, 2026 at 10:16 pm

    AbsoluteLayout is deprecated. It doesn’t throw any exceptions, but its generally a bad idea to use it because it is really hard to design a layout that will work on all screen sizes. There is generally a better way to do it using a different layout.

    In your case, I don’t follow exactly, but it sounds like you want to layer two widgets on top of each other? An image with a frame? To do so, I’d use a FrameLayout. This is designed for having multiple layers of images.

    Common layout objects is also a good guide to the basic layout types.

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

Sidebar

Related Questions

I have an xml layout which places an image at the top of the
I have dialog layout xml file which stores button, and I have set android:onClick=doSomething
I have an xml layout file which contains a few widgets including a Spinner
I have a layout file( layout/my_test.xml ): <TextView android:id=@+id/my_title android:gravity=left|center_vertical android:layout_width=wrap_content android:layout_height=fill_parent /> My
I have an android widget which is updated 1 time per day (as stated
I have got the code: package com.finalyearproject.cookmefood; import android.app.Activity; import android.os.Bundle; import android.widget.ListView; import
I have two Android projects, a 'library project' containing a custom layout, and an
I have a layout issue. What I do is this: create TableLayout in xml
I'm working on an Android widget which essentially places a button on the homescreen.
I have one spinner in which few values are there from strings.xml and I

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.