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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:02:56+00:00 2026-06-03T05:02:56+00:00

I have a layout which has an adview under an imageview.In some conditions i

  • 0

I have a layout which has an adview under an imageview.In some conditions i am making the imageview invisible which makes my adview to not adjust properly since(android:layout_below attribute i have given to my adview).

`

<ImageView
    android:id="@+id/previous"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_marginLeft="5dp"
    android:layout_marginTop="10dp"
    android:background="@drawable/le"
    android:clickable="true"
    android:contentDescription="@string/app_name"
    android:onClick="previous"
    android:paddingBottom="3dp" >
</ImageView>

<ImageView
    android:id="@+id/next"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_marginRight="5dp"
    android:layout_marginTop="10dp"
    android:background="@drawable/ri"
    android:clickable="true"
    android:contentDescription="@string/app_name"
    android:onClick="next"
    android:paddingBottom="3dp" >
</ImageView>

<com.google.ads.AdView
        android:id="@+id/adView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        ads:adSize="BANNER"
        ads:adUnitId="PUB ID"
        android:layout_below="@+id/next"
        ads:loadAdOnCreate="true" />

<TextView
    android:id="@+id/tv"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="18dp"
    android:layout_below="@+id/adView"
    android:textColor="@color/red"
    android:textSize="20dp"
    android:textStyle="bold" />

<ListView
    android:id="@+id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_below="@+id/tv"
    android:layout_marginTop="6dp"
    android:cacheColorHint="#00000000"
    android:clickable="false"
    android:dividerHeight="30.0dp"
    android:fadingEdge="none"
    android:focusable="false"
    android:focusableInTouchMode="false"
    android:scrollbars="none" >
</ListView>

`

I have used Layout_above attribute for adview to place it above textview since the textview is always visible.But when i do that i got an error saying circular dependencies are not possible in releative layout .Below is the image for better understanding.

enter image description here

How can i solve this.Any suggestions are appreciated.

  • 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-06-03T05:02:57+00:00Added an answer on June 3, 2026 at 5:02 am

    How are you making the ImageView invisible? If you are using imgView.setVisibility(View.INVISIBLE), the adView should retain its position.

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

Sidebar

Related Questions

I have a panel layout which has some text fields that require validation. What
I have a layout which has and ImageView to the left, and TextView to
I have in my layout a button, which is has to change image when
I have an alternate homepage template, homepage.pt, which has a different layout. When I
I have a layout which looks like this: <LinearLayout> <ImageView> android:width=wrap_content android:height:wrap_content ... </ImageView>
Help needed.. I have a organization layout which have rectangular shapes not in an
I have a layout which has one large EditText view at the top +
Say I have a main screen Layout which has to move up, to reveal
I have a Relative Layout. Which has 2 buttons, side by side and it
I have a Tab that has a custom layout which contains a TextView .

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.